Braintree Client Token
Client tokens allow enrolled partners to create charges directly in one of our merchant accounts.
Request a Braintree client token
A successfully generated client token requires currency, country and underwriter to be provided. This determines the correct merchant account to generate your token for. Generated tokens expire after 24 hours.
Request a client token
POST https://staging.api.xpay.xcover.com/integrations/braintree/client-token
Headers
Name
Type
Description
Authorization*
String
Bearer {{JWT}}
{
"country": "US",
"currency": "USD",
"underwriter": "Asservo"
}{
"client_token": "<Braintree client token / JWT>",
"client_token_expiry": "2023-03-25T05:25:27.000000Z",
"payment_gateway_partner_client_token_id": "<UUID>",
"updated_at": "2023-03-24T05:25:27.000000Z",
"created_at": "2023-03-24T05:25:27.000000Z"
}Failure Scenarios
Invalid country, currency and underwriter combination results in no suitable merchant account being found
{
"country": "CA",
"currency": "USD",
"underwriter": "Invalid underwriter"
}{
"type": "exception",
"message": "[CoverGenius_AU] credentials not found for ClientPaymentProvider [Braintree]"
}Last updated