Skip to main content

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

FieldTypeRequiredMax LengthDescription
companyNamestringNo255Legal company name
billingContactNamestringNo255Name of billing contact person
billingEmailstringNo255Valid email address for billing notifications
billingAddressLine1stringNo255Primary address line
billingAddressLine2stringNo255Secondary address line (optional)
billingCitystringNo100City
billingPostalCodestringNo20Postal or ZIP code
billingStatestringNo100State, province, or region
billingCountrystringNo100Country
vatNumberstringNo50VAT/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 CodeError CodeDescription
400BAD_REQUESTInvalid request body or validation error
401UNAUTHORIZEDMissing or invalid JWT token
403FORBIDDENUser does not have admin privileges
422UNPROCESSABLE_ENTITYInvalid 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 billingEmail will 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.