Skip to main content
A test payment transaction goes through the same API as a live one, and moves no real money. There are no separate credentials: any credential that can create a payment transaction can create a test one, before the merchant goes live too. The merchant does need an active bank account in the payment transaction’s currency, as in Onboard a merchant.

1. Create a Test Payment Transaction

Send the same body as a live payment transaction, with is_test: true:
The answer is 201, with is_test: true, and checkout once, as for a live payment transaction. Without is_test, a payment transaction is live, and a merchant that isn’t live yet answers 409 LIVE_PAYMENTS_NOT_ALLOWED.

2. Complete the Checkout

Open checkout.url and choose the test bank. Approve the payment transaction on its page. Person.

3. Read the Payment Transaction

A test payment transaction reads like any other, with is_test: true. POST /transactions/{id}:issueCheckout works on it too.

4. Receive Its Event

An event for a test payment transaction names one whose is_test is true. A webhook endpoint created through the API receives test events as well as live ones.

5. List Test Payment Transactions

A list holds one kind: without is_test=true, it lists live records only. The same goes for POST /merchants/{id}/transactions:search and GET /merchants/{id}/payment-links. A test payment link is created with is_test: true too. Bank accounts, balances and payouts show live records only, so a test payment transaction’s payout is always null.

6. Simulate an Outcome

A USD test payment transaction can choose how it ends, with simulation:
  • simulation needs is_test: true, or it answers 400 SIMULATION_REQUIRES_TEST.
  • A payment transaction whose route can’t honour it, such as one in another currency, answers 422 SIMULATION_NOT_SUPPORTED. The merchant also needs to be set up for USD test payment transactions.
  • simulation isn’t read back on the payment transaction.

7. Complete Its Checkout

Follow checkout.url and complete the page, as in step 2. Person.

8. Read It Until It Reaches the Outcome

Poll until the payment transaction reads the status you simulated, such as failed for failed_insufficient_funds.