Topup specifics¶
Top-ups are very similar to payins. The process flow is the same for both. There are some differences in details.
Authorization token should be generated via POST /auth-tokens-by-action
using action ‘WALLET_OPERATION_CREATE’.
There is an attribute idTopUp used instead of idPayin.
Also the three main API methods are different:
GET /topups/{idTopUp}
,
POST /topups/{idTopUp}
,
POST /topups/!availablePaymentOptions
.
While payin needs currency and amount, top-up is more complex in this part. There can be two approaches used.
There is specified the exact amount and currency that the customer wants to pay and the currency that the merchant wants to get. The amount that the merchant will get is calculated by the platform. This is the mode TopUpRequestedMoneyProvided with attributes moneyProvided (amount, currencyCode) and currencyRequired.
There is specified the exact amount and currency that the merchant wants to get and the currency that the merchant wants to pay.The amount that the customer should pay is calculated by the platform. This is the mode TopUpRequestedMoneyRequired with attributes moneyRequired (amount, currencyCode) and currencyProvided.
If the topup amount (with or without a currency conversion applied) should be automatically sent to the merchant’s account then the merchant’s account or crypto address should be identified in the authorization token. There are three values that should be specified:
settlementMethodPaymentMethodCode (currently works only for CRYPTO_TRANSFER),
settlementMethodPaymentOperatorCode (currently works only for TRC20),
settlementMethodAcccountNumber (currently works only for TRON crypto address).