UPP Docs
Card

Terminate a card

POST
/cards/{cardId}/terminate

Once accepted the card is terminating and the request goes to the card issuer in the background. When the issuer confirms, the card becomes terminated; on failure it returns to active. Both outcomes are sent with the card.status_changed webhook. Termination cannot be undone.

  • Only active cards can be terminated; a frozen card must be unfrozen first (the card issuers reject terminating a frozen card). Rejected while a top-up or withdrawal has no result yet.
  • Rejected when the product's features.terminate is false.
  • The remaining card balance is credited to the merchant's available balance after the issuer returns it, in the amount the issuer reports, with no fee. It appears in GET /transactions as a card_refund transaction (with no order number) and may arrive after the card becomes terminated; no transaction is created when nothing is returned. Once credited, the card.balance_returned webhook is sent and the card's returned_balance shows the amount.
  • Not every issuer supports this.

Authorization

merchantApiKeymerchantTimestampmerchantNoncemerchantSignature
headerX-API-KEY<token>

Merchant API key (starts with upk_, also accepts api-key); signing headers are also required

headerX-Timestamp<token>

Unix timestamp in seconds, within 300 seconds of server time

headerX-Nonce<token>

Unique per request; cannot be reused with the same credential during the timestamp validity window

headerX-Signature<token>

Hex HMAC-SHA256 signature (either letter case) of the method, full path, timestamp, nonce and body digest

Path Parameters

cardId*string

Response Body

Accepted; the card is terminating

application/json
  1. response
id*string

Card ID (starts with card_)

card_product_id*|

Card product ID, same as id in GET /card-products

application_id*|

The card application that issued this card (starts with cap_)

order_no*|

Order number of the card application

cardholder_id*|

Cardholder (starts with chd_); null when the product does not need cardholders

customer_id*|

The cardholder's customer (starts with cus_)

currency*|

Card currency

status*CardStatus
  • pending_active: issued, not yet activated by the issuer
  • active: usable
  • freezing / unfreezing: freeze or unfreeze in progress
  • frozen: frozen
  • terminating: termination in progress
  • terminated: terminated (cards terminated at the issuer or bank also become terminated after a sync)

To freeze, unfreeze or terminate, see POST /cards/{cardId}/freeze, /unfreeze and /terminate.

Value in"pending_active""active""freezing""unfreezing""frozen""terminating""terminated"
created_at*string

Issued at

Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://sandbox.getupp.net/api/v1/cards/string/terminate'
Example Response
{  "id": "string",  "card_product_id": "string",  "application_id": "string",  "order_no": "string",  "cardholder_id": "string",  "customer_id": "string",  "currency": "string",  "status": "pending_active",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}