Create a client token
  • 06 Sep 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Create a client token

  • Dark
    Light

Article summary

Post
/payments/v1/providers/{provider}/client-token

Create a single use client token for payment providers that support this operation.

Security
HTTP
Type bearer
Path parameters
provider
stringRequired
Valid values[ "\"braintree\"", "\"test\"" ]
Body parameters
object
customerId
string

A unique identifier for the customer to whom the payment method belongs. A customer can have multiple payments methods. The customerId here should be the same as the one used when adding a new payment method.

Min length1
Responses
201

Created Client Token

Expand All
object
data
object
clientToken
string

A provider specific client token.

400

Invalid Request

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
401

Invalid Authentication Credentials

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
403

Invalid Authorization Credentials

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
404

Resource Not Found

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
429

Too Many Requests

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
500

Internal Server Error

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
502

Provider Error

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value
504

Provider Unavailable

Expand All
object
message
string
causes
Array of object
object
message
string
metadata
Array of object
object
key
string
value

Was this article helpful?