Update Billing Details
Update billing contact and address information for the organization. Only specified fields will be updated; omitted fields remain unchanged.
Request
PATCH /organization/billing
Authentication
Requires an Admin Bearer JWT token.
Authorization: Bearer <access_token>
Request Body
All fields are optional. Only include fields you want to update.
{
"companyName": "Example Corp",
"billingContactName": "Jane Smith",
"billingEmail": "[email protected]",
"billingAddressLine1": "123 Main Street",
"billingAddressLine2": "Suite 400",
"billingCity": "San Francisco",
"billingPostalCode": "94105",
"billingState": "California",
"billingCountry": "United States",
"vatNumber": "US123456789"
}
Request Fields
| Field | Type | Required | Max Length | Description |
|---|---|---|---|---|
companyName | string | No | 255 | Legal company name |
billingContactName | string | No | 255 | Name of billing contact person |
billingEmail | string | No | 255 | Valid email address for billing notifications |
billingAddressLine1 | string | No | 255 | Primary address line |
billingAddressLine2 | string | No | 255 | Secondary address line (optional) |
billingCity | string | No | 100 | City |
billingPostalCode | string | No | 20 | Postal or ZIP code |
billingState | string | No | 100 | State, province, or region |
billingCountry | string | No | 100 | Country |
vatNumber | string | No | 50 | VAT/Tax identification number |
Response
Returns the updated billing details object.
Success Response
Status Code: 200 OK
Response Body:
{
"companyName": "Example Corp",
"billingContactName": "Jane Smith",
"billingEmail": "[email protected]",
"billingAddressLine1": "123 Main Street",
"billingAddressLine2": "Suite 400",
"billingCity": "San Francisco",
"billingPostalCode": "94105",
"billingState": "California",
"billingCountry": "United States",
"vatNumber": "US123456789"
}
Response Fields
Same as Get Billing Details response.
Errors
| Status Code | Error Code | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid request body or validation error |
401 | UNAUTHORIZED | Missing or invalid JWT token |
403 | FORBIDDEN | User does not have admin privileges |
422 | UNPROCESSABLE_ENTITY | Invalid field values (e.g., invalid email format, field exceeds max length) |
Example
Request
curl -X PATCH https://api.entryguard.io/api/v1/organization/billing \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{
"companyName": "Example Corp",
"billingContactName": "Jane Smith",
"billingEmail": "[email protected]",
"billingAddressLine1": "123 Main Street",
"billingAddressLine2": "Suite 400",
"billingCity": "San Francisco",
"billingPostalCode": "94105",
"billingState": "California",
"billingCountry": "United States",
"vatNumber": "US123456789"
}'
Response
{
"companyName": "Example Corp",
"billingContactName": "Jane Smith",
"billingEmail": "[email protected]",
"billingAddressLine1": "123 Main Street",
"billingAddressLine2": "Suite 400",
"billingCity": "San Francisco",
"billingPostalCode": "94105",
"billingState": "California",
"billingCountry": "United States",
"vatNumber": "US123456789"
}
Notes
- This is a partial update endpoint (PATCH). Only fields included in the request body will be updated.
- Billing details must be configured before subscribing to a paid plan.
- Changes to
billingEmailwill update where payment notifications and receipts are sent. - The update is logged in the audit trail with event type
BILLING_DETAILS_UPDATE. - VAT number validation is not performed by the API; ensure the format is correct for your jurisdiction.