Topping up cards

This page will show you how to top up cards

Not all Yordex cards need to be topped up. Cards can be linked directly to the Account in which case they do not need to be topped up. Enabling top up increases control over how much can be spent on a card so we recommend you do use top ups.

There are two ways to top up cards:

One-time top ups

Cards can be topped up like this

curl {baseURL}/cards/:card-id/topup  
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X POST 
-d '{ 
{ 
  "topUpAmountInCents": 1000,
  "customerTransactionId": "123456" // Optional
}'

card-id is the id of the card you are topping up. The topUpAmountInCents is the amount you want to top up the card by in the currency of the card. As the name suggests, that amount is in cents so if this is a GBP card, we are topping up by £10 in this example.

customerTransactionId is an optional field that will store a transaction ID of your choosing against a top-up transaction. When retrieving your transactions later, this ID will be returned to you.

Auto top ups

Auto top ups can be triggered at a specified frequency or when the card is below a certain balance. You can auto top up by or to a specified amount.

Auto top ups can be enabled like this:

curl {baseURL}/cards/:card-id/balances  
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X PATCH 
-d '{ 
  "targetBalanceInCents": 20000,
  "autoTopUpFrequency": null,
  "minimumBalanceInCents": 10000
  "autoTopUpType": "AMOUNT",
}'

The targetBalanceInCents is the amount to top up. autoTopUpType defines it you to up by or to that amount

  • AMOUNT: the targetBalanceInCents is the amount to top up by. In this example, we top up the card by £20, so if the balance was £10 than after the auto top up it will be £30
  • TARGET: the targetBalanceInCents is the amount to top up to. If that had been set, we would top up the card to £20, so if the balance was £10 than after the auto top up it would be £20

autoTopUpFrequency and minimumBalanceInCents define when to auto top up:

When to auto top upautoTopUpFrequencyautoTopUpFrequencyminimumBalanceInCents
Nevernullnullnull
Auto top up the card on the set frequencyAMOUNT / TARGETDAILY / WEEKLY / MONTHLYnull
Auto top up the card when the balance is below the minimumBalanceInCents (£100 in this example)AMOUNT / TARGETnull10000

To disable auto top ups, just set all fields to null


What’s Next