Create a client token
  • 15 Nov 2024
  • 2 Minutes 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

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

401

Invalid Authentication Credentials

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

403

Invalid Authorization Credentials

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

404

Resource Not Found

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

429

Too Many Requests

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

500

Internal Server Error

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

502

Provider Error

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.

504

Provider Unavailable

Expand All
object
message
string

A description of the error.

causes
Array of object

A list of causes for the error.

object
message
string

A description of a problem which led to this error.

metadata

Additional information about the cause of the error.


Was this article helpful?

What's Next