Create a Card details token

Create a short-lived token that authorizes Card Elements to render the details of a Card in your frontend. Mint the token on your server and pass it to the browser; the token is valid for one hour and is scoped to a single Card.

post/cards/{card_id}/create_details_token

Path parameters

card_idstring required

The identifier of the Card to mint a details token for.

Response

Card details token

expires_atstring date-time required

The time the token will expire. Tokens are valid for one hour.

tokenstring required

The token. Pass this to the @increasebank/card-elements library in your frontend. Treat it as a credential: it authorizes anyone holding it to read the Card's details until it expires.

type'card_details_token' required

A constant representing the object's type. For this resource it will always be card_details_token.

Example response

{
  "expires_at": "2020-01-31T23:59:59Z",
  "token": "0f3d2a1b4c5e6f708192a3b4c5d6e7f8",
  "type": "card_details_token"
}

Changes

Changed in 1 of the 34 revisions of this API.1