CARD_PREPAID top-up

Topping up your card using cryptocurrency involves a series of steps that ensure a secure and accurate transaction. Below is a detailed guide to execute this process.

Step 1: Check Cryptocurrency Balances

Before initiating a top-up, check the available cryptocurrency balances to ensure you have sufficient funds. Use the Get Wallet Balance API endpoint.

Request:

GET https://api.sandbox-v2.vault.ist/wallet/balance?accountIds=4c8c5075-9cd6-40f3-a301-396cb25a828f&accountIds=7621ee47-036d-456e-adaa-c5eafc299c7b

Response:

[
  {
    "account": "abc12345-6789-def0-1234-56789abcdef0",
    "balance": "0.02567890000000000000",
    "currency": "USDT",
    "lastUpdated": "2025-01-10T10:15:30.000+00:00"
  },
  {
    "account": "xyz98765-4321-fedc-0987-6543210fedcb",
    "balance": "0.00000000000000000000",
    "currency": "USDT",
    "lastUpdated": "2025-01-09T08:45:15.000+00:00"
  }
]

Ensure that the source account has enough balance to cover the transaction amount and fees.


Step 2: Perform a Dry Run

Initiate a dry run to validate the top-up details and calculate fees. Use the Direct Exchange API with dryRun=true.

Request:

POST https://api.sandbox-v2.vault.ist/wallet/direct-exchange?dryRun=true
{
  "fromAccount": "abc12345-6789-def0-1234-56789abcdef0",
  "toAccount": "xyz98765-4321-fedc-0987-6543210fedcb",
  "fromCurrency": "USDT",
  "toCurrency": "USDT",
  "fromAmount": "0.01567823456789012345"
}

Response:

{
  "id": "1234abcd-5678-ef90-1234-56789abcdef0",
  "fromAmount": "0.015678",
  "toAmount": "0.015675",
  "feeAmount": "0.000300",
  "feeCurrency": "USDT",
  "status": "PENDING"
}

Review the response to confirm the fromAmount, toAmount, and applicable fees.


Step 3: Execute the Top-Up

After validating the transaction details, execute the top-up by setting dryRun=false in the API call.

Request:

POST https://api.pre-v2.vault.ist/wallet/direct-exchange?dryRun=false
{
  "fromAccount": "abc12345-6789-def0-1234-56789abcdef0",
  "toAccount": "xyz98765-4321-fedc-0987-6543210fedcb",
  "fromCurrency": "USDT",
  "toCurrency": "USDT",
  "fromAmount": "0.01567823456789012345",
  "id": "1234abcd-5678-ef90-1234-56789abcdef0",
  "feeAmount": "0.000300",
  "feeCurrency": "USDT"
}

Response:

{
  "id": "abcd1234-5678-90ef-1234-56789abcdef0",
  "fromAmount": "0.015678",
  "toAmount": "0.015675",
  "feeAmount": "0.000300",
  "feeCurrency": "USDT",
  "status": "SUCCESS",
  "note": "Reserve Funds Successful;Direct Exchange Success"
}

Step 4: Verify Card Balance

After completing the top-up, confirm the updated card balance using the Get Card Balance API.

Request:

GET https://api.sandbox-v2.vault.ist/card-holder/cardholder/card/abcd5678-1234-90ef-5678-abcdef012345/balance

Response:

{
  "amount": "1.02",
  "currency": "USD"
}

Ensure the card balance reflects the top-up amount accurately.


By following these steps, you can securely and efficiently top-up your card using cryptocurrency. Always verify the details and double-check balances to avoid any discrepancies.