Understanding Amounts
It is important to understand the amounts through notifications - what's processed, what is fee, how the conversion works and most important - what you need to add to customer's balance or deduct.
{danger.fa-exclamation} IMPORTANT: The transaction and session amounts may change during processing. Mode details can be found in Notification Amounts section.
As the transaction processing goes, you may notice that sometimes the amount is changed for the approved deposits. This is due to specifics of some PSPs. For example, bank wire and crypto both are the payment methods that require customer to make the actual transfer "offline" - disconnected from the PSP interface, so the customer may change to amount and/or currency.
The transaction amounts appear in three places through the notifications:
.amount
and
session.currency
represent the amount attempted, what you
send in the cashier login request for payment/withdrawal, or what customer submitted in withdrawal request, always
in base currency (same currency as you send in cashier login request)..processed_amount
and
session.processed_currency
represent the total processed amount
of all approved transactions created during cashier session or using Direct API, in base currency..amount
and
transaction.currency
will reflect what the customer submitted
within the cashier, but may change in final notification according to what is received from PSP. Amount received
in final notification is how much you add to - or subtract from customer's balance. .processed_amount
and
transaction.processed_currency
is what the customer will see in
receipt or SMS from bank. Please note that currency may differ if changed within the cashier or after - at PSP.
When currency is changed, transaction.conversion_rate
will
indicate at which rate conversion from amount
to processed_amount
is done.Key points about the amounts:
transaction.currency
will always be the same currency as you sent in the initial API call.transaction.processed_amount
,
either in the same currency, or different - calculated according to transaction.conversion_rate
.transaction.amount
, transaction.processed_amount
and transaction.processed_currency
may change when it gets to final status - according to amount
processed and registered at PSP.transaction.conversion_rate
may change.transaction.processed_currency
different from transaction.currency
, you use
transaction.currency
as base for payout processing, but actual processing at PSP will be in
transaction.processed_currency
In some cases the processing is done with different currency that the one you send initially. This is possible in cases:
Conversion at Praxis side in never applied to refunds and any transactions via Direct API, except the cases when conversion is done at PSP.
If withdrawal request is submitted in currency different from base currency, the actual processing will be done in
currency selected by the customer and reflected in transaction.processed_amount
and transaction.processed_currency
.
If you are using fees, there are certain points to consider. Fee can be added (customer is charged extra on top of the amount intended) or included (fee is deducted from the amount to be delivered). Fee amount can be calculated either as flat fee (fixed amount) or percent (% of transaction amount).
The easies way to illustrate the effect of fee is per example. The example below illustrates the amounts for $10 transaction (deposit, withdrawal) and 7% fee.
deposit, fee included
transaction.amount
= 930transaction.processed_amount
= 1000fee
= 70deposit, fee added
transaction.amount
= 1000transaction.processed_amount
= 1070fee
= 70withdrawal request, fee included
transaction.amount
= 1000transaction.processed_amount
= 930fee
= 70withdrawal request, fee added
transaction.amount
= 1070transaction.processed_amount
= 1000fee
= 70