UPP Docs
Card

Withdraw from a card

POST
/cards/{cardId}/withdraw

Moves card balance back to the merchant. Acceptance does not touch the merchant balance (status: pending); once the issuer returns the funds, the amount minus the fee is credited to the merchant's available balance. Nothing is booked on failure. The result is sent with the card_funding.status_changed webhook.

  • Only active cards can be withdrawn from; rejected when the product's features.withdraw is false.
  • The amount must be within limits.withdraw; otherwise 422.
  • The fee is pricing.withdraw_fee_rate plus withdraw_fee_fixed; the amount must be greater than the fee.
  • Returns 422 (insufficient_balance) when the amount exceeds the card's most recently synced balance minus withdrawals still in progress. When the balance has never been synced or has changed since, the issuer decides; if the card balance is too low the result is failed.
  • Some issuers do not support withdrawals and return 422.

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

Request Body

application/json
  1. body
amount*|

Amount in the card currency, greater than 0, with no more decimals than the currency allows

order_no*string

Your order number, unique across the merchant's top-ups and withdrawals

Lengthlength <= 64

Response Body

Accepted

application/json
  1. response
id*string

Top-up / withdrawal ID (starts with cfd_)

card_id*string|null
type*string

top_up or withdraw

Value in"top_up""withdraw"
order_no*string

Your order number

amount*string

Amount moved into or out of the card

fee*string

Fee; charged on top of a top-up, deducted from the returned amount for a withdrawal

currency*string
status*CardFundingStatus
  • pending: accepted, being processed by the issuer
  • succeeded: succeeded and booked
  • failed: failed, see failure_reason; a held top-up amount has been released
Value in"pending""succeeded""failed"
failure_reason*string|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://sandbox.getupp.net/api/v1/cards/string/withdraw' \  -H 'Content-Type: application/json' \  -d '{  "amount": "50.00",  "order_no": "WITHDRAW-1001"}'
Example Response
{  "id": "string",  "card_id": "string",  "type": "top_up",  "order_no": "string",  "amount": "string",  "fee": "string",  "currency": "string",  "status": "pending",  "failure_reason": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}