Activate Customer

This function allows you to activate a customer currently in draft status.

There are various fields in the JSON payload which are required when activating a draft customer. These options are activateAllSubscriptions , activateAllDraftPurchases and temporarilyDisableAutoPost. All of these fields are required unless preview has been set to true, in which case only the customerID is required.

To include the full invoice object created from the activation , you can include the parameter view=sideeffects in the URL. This will cause the newly created invoice object to be included in the response.

To make sure a customer only activates if their payment succeeds, set rollBackOnFail to true.

Path Params
string
required

When view is set to sideeffects, then Stax Bill will return information about invoices or draft invoices that will result from the activation.

Query Params
boolean

If set to true, then Stax Bill will not actually activate the related content and instead the payload will simulate as if it was going to be activated. If left out, blank, or false, then the activation will follow-through.

boolean

If true, then if any resulting charges are 0 dollars, then they will also be returned alongside any invoice information.

Body Params
int32
required

This is the id of the customer.

boolean
required

If true, draft subscriptions will be activated along with the customer. Not required if preview is also true.

boolean
required

If true, draft purchases will be activated along with the customer. Not required if preview is also true.

boolean

If this is true, then if, while activating, the customer's payment method on file fails to collect, then the entire process will be rolled back and the customer, subscriptions, and purchases will stay in a draft state.

boolean

Override customer's auto post option. If true, any purchases or subscription products activated will generate draft charges in the ready state and draft invoices in the ready state instead of posted invoices. This will not result in charging a customer and those draft ready charges will sit on the customer account until activated separately.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json