Authentication & Tokens
Vixzz uses OAuth 2.0 client credentials. Separate tokens must be requested for C2B collections and B2C disbursements. Tokens expire after 3,600 seconds (1 hour).
POST/v1/oauth2/tokenLive & Sandbox
Request Headers
| Header | Type | Status | Description |
|---|---|---|---|
Authorization | string | Required | Basic <base64(consumer_key:consumer_secret)> |
Content-Type | string | Required | application/json |
Body Parameters (JSON)
| Parameter | Type | Status | Description |
|---|---|---|---|
grantType | string | Required | OAuth grant type. Set to client_credentials. |
businessKey | string | Conditional | Your registered business key (e.g. bz_live_882190). Required for B2C disbursement and float management tokens. |
Request Code Snippets (cURL, Node, Python, PHP, Go)
C2B Token Request
curl -X POST https://developer.vixzz.com/v1/oauth2/token \
-H "Authorization: Basic Base64(C2B_Consumer_Key:C2B_Secret_Key)" \
-H "Content-Type: application/json" \
-d '{
"grantType": "client_credentials"
}'JSON Return Response Body (200 OK)
C2B Token Response
{
"accessToken": "vxz_tok_c2b_8f9k3m9s2a1l",
"tokenType": "Bearer",
"expiresIn": 3600,
"scope": "c2b.collect"
}B2C Token Request
curl -X POST https://developer.vixzz.com/v1/oauth2/token \
-H "Authorization: Basic Base64(B2C_Consumer_Key:B2C_Secret_Key)" \
-H "Content-Type: application/json" \
-d '{
"grantType": "client_credentials",
"businessKey": "bz_live_your_business_key"
}'B2C Token Response
{
"accessToken": "vxz_tok_b2c_0a5l1n3m8x2z",
"tokenType": "Bearer",
"expiresIn": 3600,
"scope": "b2c.payout"
}