Build Customer Profile Setup
Generate a hosted URL for customer self-service billing onboarding
Creates a pending billing customer record and returns a hosted setup URL. The customer visits this URL to enter their payment method (Stripe card or PayPal). Optionally auto-enrolls the customer in a trigger billable item after setup completes.
Requires a valid `api_key` in the JSON request body
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
api_key |
body | string |
Yes | Your API key. |
org_id |
body | string |
Yes | Organization UUID. |
brand_id |
body | string |
Yes | Used for branding on the hosted setup page. |
contact_id |
body | string |
Yes | The CRM contact UUID. |
bc_meta |
body | object |
No | Consumer's back-office references. Stored on the billing customer record. Example: `{"org_id":"xxx","wallet_id":"abc","wallet_type":"member"}`. |
bi_id |
body | string |
No | Billable item ID for auto-enrollment after setup. Must be a trigger-type item with status active. Stored in `bc_meta._bi_id`. |
gateway |
body | string |
No | `stripe` or `paypal`. Default: `stripe`. Stored in `bc_meta._gateway`. |
Code Samples
bash
curl -s -X POST "https://app.zyntrohq.com/public/edge/buildCustomerProfileSetup" \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"org_id": "org_xxx",
"brand_id": "brand_xxx",
"contact_id": "cont_xxx",
"bi_id": "bi_xxx",
"bc_meta": {"wallet_id": "abc"}
}'
Response
200
Setup URL generated
json
{
"data": {
"existing": false,
"setup_url": "https://app.zyntrohq.com/public/edge/setup-billing/32/org_xxx/bc_xxx",
"billing_customer_id": "bc_xxx"
},
"status": "success"
}
Tip:
Use this endpoint to onboard customers without building your own payment form. Send the `setup_url` to the customer via email or embed it in your application. The hosted page handles Stripe Elements or PayPal authorization, initial charge, and auto-enrollment.
Info:
The billing customer is created with status `pending` and `allow_trigger: 1`. It activates automatically when the customer completes payment method setup on the hosted page. If `bi_id` is provided, the customer is auto-enrolled in that trigger item after activation.