Skip to main content

POST Coupon

/api/v1/coupon

Parameters/Body

{"rtrx_limit":0,"usdt_transactions":1,"valid_to":1756462987130}

This call creates a 1-time coupon for transaction processing. Coupon is fee-limited, i.e. it's created with an upper limit of transaction fee that can be covered.

  1. rtrx_limit: coupon fee limit in TFN (former RTRX). I.e. transaction with Transatron fee less than rtrx_limit can be processed with such coupon. This parameter may come from /triggersmartcontract call where Transatron injects transaction fee information. We suggest that a fee returned from transatron is increased by 10-15% when set in a rtrx_limit. The excess amount will be credited back to an account when coupon is spent.
  2. usdt_transactions: Alternatively, if rtrx_limit is not specified, coupon can be issued for a number of USDT transactions.
  3. valid_to: coupons' expiration time.

Response contains the following data:

  1. code: Success or failed.
  2. coupon: a coupon structure with id that needs to be specified in a /broadcasttransaction call.
  3. balance_on_coupons_rtrx: total balance that is currently locked on all issued and not yet spent coupons.
  4. balance_rtrx and balance_rusdt: current Transatron account balances in TFN (former RTRX) and TFU (former RUSDT).

Example of response:

{
"code": "SUCCESS",
"coupon":
{
"valid_to": 1756462987130,
"id": "9cf04de1-1f2a-47b5-9e5c-04b51b0f67a2",
"rtrx_limit": 7925001
},
"balance_on_coupons_rtrx": 7925001,
"balance_rtrx": 120548547,
"balance_rusdt": 69399295
}