API Reference
Virtual Cards
Top up card [POST]

Top Up Card


https://sandboxapi.onbrails.com/api/v1/virtualcards/topup (opens in a new tab)

Add funds to virtual card

Body Parameters

ParametertypeRequired
cardBrand
The amount(in cent) to add to the card
string
cardId
The id of the card
string
referencenumber
amount
Maximum amount is $2,500 and minimum is $3
string

Request

Top Up Card [POST]
curl --request POST \
   --url https://sandboxapi.onbrails.com/api/v1/virtualcards/topup \
   --header 'Authorization: Bearer API-KEY' \
   --header 'accept: application/json' \
   --header 'content-type: application/json' \
   --data '{
      "amount": 0,
      "cardId": "string",
      "reference": "string"
    }'

Responses

🟢 200 - Result example
{
"status": true,
"message": "card topup in progress",
"data": {
  "id": "b549578a-2c23-40fc-a7af-5d1886b9397b",
  "createdAt": "2022-12-16T17:20:31.185Z",
  "updatedAt": "2022-12-16T17:20:31.185Z",
  "amount": 10,
  "centAmount": 1000,
  "type": "credit",
  "method": "topup",
  "status": "pending",
  "currency": "usd",
  "reference": "top up",
  "cardId": "5a866a67-6c7a-4a82-8140-4d480085a54a"
}
}