💰
XPay API Partner Docs
  • Introduction
  • Quick Start
  • Authentication
  • Tokenization
  • Reference
    • API Reference
      • Credit Card Customer Token
      • Direct Debit Customer Token
      • Braintree Grant Customer Token
      • Braintree Client Token
      • Customer Tokens
Powered by GitBook
On this page
  • Request a Braintree client token
  • Request a client token
  • Failure Scenarios
  1. Reference
  2. API Reference

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"
}
HTTP 200
{
    "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"
}
HTTP 400
{
    "type": "exception",
    "message": "[CoverGenius_AU] credentials not found for ClientPaymentProvider [Braintree]"
}
PreviousBraintree Grant Customer TokenNextCustomer Tokens

Last updated 2 years ago