Billing Portal

Enable Billing Portal for Customer

POST
/portal/customers/{customer_id}/enable.json

Enables Billing Portal access for a customer, with an option to send an invitation email at the same time.

Billing Portal Security

If your customer has been invited to the Billing Portal, they receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. This link changes periodically for security and is only valid for 65 days.

If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, merchants cannot generate the URL without requesting it through the API.

To prevent abuse and overuse, request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), do not make an API request every time.

For more information configuring the Billing Portal, see Billing Portal Overview.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

customer_id*integer

The Chargify id of the customer

Query Parameters

auto_invite?Auto Invite

When set to 1, an Invitation email will be sent to the Customer. When set to 0, or not sent, an email will not be sent. Use in query: auto_invite=1.

Value in

  • 0
  • 1

Response Body

application/json

application/json

curl -X POST "https://example.com/portal/customers/0/enable.json"
{  "customer": {    "first_name": "string",    "last_name": "string",    "email": "string",    "cc_emails": "string",    "organization": "string",    "reference": "string",    "id": 0,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "address": "string",    "address_2": "string",    "city": "string",    "state": "string",    "state_name": "string",    "zip": "string",    "country": "string",    "country_name": "string",    "phone": "string",    "verified": true,    "portal_customer_created_at": "2019-08-24T14:15:22Z",    "portal_invite_last_sent_at": "2019-08-24T14:15:22Z",    "portal_invite_last_accepted_at": "2019-08-24T14:15:22Z",    "tax_exempt": true,    "surcharging": true,    "vat_number": "string",    "vat_country": "string",    "entity_identifier_kind": "vat_eu",    "entity_identifier_value": "string",    "parent_id": 0,    "locale": "string",    "default_subscription_group_uid": "string",    "salesforce_id": "string",    "tax_exempt_reason": "string",    "default_auto_renewal_profile_id": 0,    "maxioid": "string",    "branding_theme_id": 0  }}