Fees
Preview the exact fee on any amount before you move any money.
fees.preview returns the exact total fee (and your net after it) for any amount and payment
type before you transact — no funds move. Use it to show a customer the total, price a payout, or
decide what to charge. Needs the balances:read scope.
Preview a fee
const preview = await ap.fees.preview({
amount: "100.00", // decimal string, ≤ 6 dp
currency: "USDT",
paymentType: "CHECKOUT", // optional, defaults to CHECKOUT
});
console.log(preview.fee, preview.net); // total fee, amount after feepreview = ap.fees.preview(
amount="100.00", # decimal string, ≤ 6 dp
currency="USDT",
payment_type="CHECKOUT", # optional, defaults to CHECKOUT
)
print(preview["fee"], preview["net"]) # total fee, amount after feepreview, err := ap.Fees.Preview(ctx, "100.00", "USDT", absolutepay.PaymentCheckout)
if err != nil {
log.Fatal(err)
}
fmt.Println(preview.Fee, preview.Net) // total fee, amount after feecurl "https://api.absolutepay.io/v1/fees/preview?amount=100.00¤cy=USDT&paymentType=CHECKOUT" \
-H "Authorization: Bearer $APP_TOKEN" \
$(sign GET "/v1/fees/preview?amount=100.00¤cy=USDT&paymentType=CHECKOUT" ""){
"amount": "100.000000",
"currency": "USDT",
"paymentType": "CHECKOUT",
"fee": "0.750000",
"net": "99.250000"
}All values are decimal strings. fee is the total charged on the amount and net = amount − fee — so
you can pass the fee through to your customer or absorb it, either way.
How the fee is computed
- Pricing differs per operation — pass the
paymentTypeyou're about to perform:
paymentType | Prices |
|---|---|
CHECKOUT (default) | a pay-in checkout or invoice |
WITHDRAWAL / PAYOUT | an on-chain payout (PAYOUT is an alias for WITHDRAWAL) |
OFFRAMP | a crypto → fiat bank withdrawal |
GIFTCARD | a gift-card issuance |
Conversions and subscriptions aren't priced here: a conversion's cost is the spread inside its live quote, and subscription cycle fees are settled per cycle. Passing either returns 400 — read the cost from the conversion quote or the subscription plan instead.
A quote, not a lock
The preview reflects your tier and network conditions at call time — it doesn't reserve a rate. Call it right before creating the order so the number you show matches the fee that's actually charged.
Next
- Accept payments — create the checkout you just priced.
- Send payouts —
WITHDRAWALfees also appear inpayouts.options(). - Gift cards · Conversions
- API reference —
GET /v1/fees/previewfull field tables.