All payments, oldest first
Pre-authorization: blocks the amount on the card without charging it.
Charge it later with capture(), or release it with voidAuthorization().
A success result means the amount is blocked.
Charges (all or part of) a pre-authorized amount
Complete a 3D Secure payment (after the callback)
Direct payment (without 3D Secure)
Deletes a saved card
The next operation fails with code (default CARD_DECLINED), whatever the card
Optionalmessage: stringThe mock bank's record of a payment, for assertions
Pre-authorization with 3D Secure. Complete it with completeThreeDSPayment()
as usual; success then means the amount is blocked.
Initialize a 3D Secure payment
Query installment options
A customer's saved cards
The next operation is processed but its response is lost: it returns PENDING
with NETWORK_ERROR, and getPayment() shows the real outcome.
Clears payments, saved cards and queued outcomes
Saves a card with the provider without charging it
The signed callback the mock bank posts to callbackUrl after the 3D Secure
page. Post it to the handler (/mock/payment/complete-3ds) or pass it to
completeThreeDSPayment(). approve: false simulates a failed or abandoned
authentication.
Releases a pre-authorization; nothing is charged
In-memory payment provider for tests.
Example