Create Merchant
August 3, 2026 · View on GitHub
Use case
Creates a merchant account record used by routing, analytics, and account-level flags.
Authentication
Admin-bootstrap route. Send the deployment's admin secret as x-admin-secret: <admin_secret> — not a JWT or API key. (The dashboard onboarding route /onboarding/merchant is the JWT-authenticated alternative.)
For local development, start with:
export BASE_URL=http://localhost:8080
export ADMIN_SECRET="x-admin-secret: <admin_secret>"
Request
- Method and path:
POST /merchant-account/create - Parameters: none.
- Body: JSON body with
merchant_id(keep it stable — it scopes analytics and routing config) and optionalgateway_success_rate_based_decider_input.
Example
Create merchant
curl --location "$BASE_URL/merchant-account/create" \
--header "$ADMIN_SECRET" \
--header "Content-Type: application/json" \
--data '{
"merchant_id": "merchant_demo",
"gateway_success_rate_based_decider_input": null
}'
Response
{
"message": "Merchant account created successfully",
"merchant_id": "merchant_demo",
"gateway_success_rate_based_decider_input": null,
"api_key": "DE_..."
}
Notes
- Dashboard onboarding usually wraps this flow.
- Create the merchant before attaching routing algorithms or API keys.