POST
/
v1
/
cards
/
{cardId}
/
cancel
JavaScript
import Chron from '@chron/sdk';

const client = new Chron({
  apiKey: 'My API Key',
});

const card = await client.cards.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(card.cardId);
{
  "cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "clientReference": "<string>",
  "status": "WAITING_ACTIVATION",
  "initialBalance": 123,
  "currentBalance": 123,
  "expiryDate": "2023-11-07T05:31:56Z",
  "design": "<string>",
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "activatedAt": "2023-11-07T05:31:56Z",
  "cancelledAt": "2023-11-07T05:31:56Z",
  "cancellationAmount": 123,
  "cancellationAction": "EXPIRY",
  "transactions": [
    {
      "transactionId": "<string>",
      "amount": 123,
      "type": "LOAD",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

cardId
string<uuid>
required

Unique identifier for the card.

Response

200
application/json

Card cancelled successfully.

The response is of type object.