Manage test orders with the REST Admin API
You can use the REST Admin API to create test orders and transactions to validate your app's behavior.
To avoid platform fees, follow this recommended workflow for testing orders:
- Create an order with an authorized transaction.
- Get a transaction ID to use as a parent ID when capturing the transaction.
- Capture the transaction and set the
trueon the order.
Other methods, such as using a manual payment gateway and the cash on delivery payment method, don't create a test order and are subject to platform fees.
Before you begin
To best understand this guide, you can familiarize yourself with the concepts of orders and transactions. Transactions are associated to orders and occur each time there is an exchange of money. Transactions are processed by payment providers, and involve the transfer of money from the issuer account (the customer's credit card) to the acquirer (the merchant's bank account). For more information, see Getting paid.
Create an order
To test orders, create an order with an authorization transaction by sending a POST request to the Order resource. Include the
transactions object in the body of the request:
Get a transaction ID
After you create the order, the returned Order object includes an ID. You can then use the order ID to return the transaction and its ID. To retrieve the transaction, send a GET request to the Order Transaction resource:
Capture the transaction
After you return the transaction, you can use its ID to create a capture transaction to capture payment. To create the capture transaction, send a Transaction object in the body of a POST request to the Order Transaction resource with the transaction ID of the authorization as the
parent_id and the
test property set to true:
Confirm the test order
After you've followed the steps above, you can retrieve the order to verify that it is in test mode. If the order is a test order, then the response includes the
test property set to