Two-step payments
With two-step payments, initPayment only approves the amount — it is held on the
payer’s card but not charged. You then deposit it with confirmPayment or release it with
cancelPayment. This suits orders you can only fulfil after checking stock.
import { ameria } from "./client.js";
// With two-step payments enabled on your account, initPayment only// approves (holds) the amount. Later you either deposit it...await ameria.confirmPayment("PAYMENT-ID", 10);
// ...or release the hold.await ameria.cancelPayment("PAYMENT-ID");You can confirm less than the approved amount.
Turning it on
Section titled “Turning it on”Two-step is a setting on your API client, not a request option:
- Test: ask Ameriabank’s technical support to switch your test client to two-step.
- Production: send an application through Ameriabank’s mobile or internet banking.