API flows
Authentication
To authenticate, include the mandatory authentication
object, containing the userId
, password
, and entityId
fields, in the request body. The authentication
object verifies that the request originated from a valid merchant using a valid payment method for a specific currency.
Payment flow
- The merchant initiates the call to create a new transaction by making a request to the Payments API endpoint.
- The Payments API returns a response with a
000.200.000
result code indicating that it has created the transaction, placed it in a pending state, and is now awaiting payment. - The Payments API sends a webhook to the merchant with the same result code, informing them that the transaction moved from processing to pending. The merchant should expect webhooks whenever the transaction changes status.
- The merchant must redirect the user to the URL in the
redirect
object, including the parameters as query strings where relevant. - The payment brand user interface displays to capture the user's payment information.
- The user submits the required information.
- The Payments API redirects back to the URL specified in
shopperResultUrl
. - The merchant executes the transaction status API request to retrieve the final transaction status.
- The Payments API sends a webhook to the merchant notifying them of the outcome of the transaction. For successful transactions, the webhook has the
000.000.000
result code.

Payment flow.
Refund flow
The refund flow uses the same endpoint as the debit flow, but the refund endpoint requires the original transaction ID as a path parameter, for example, /payments/{unique_transaction_id}/
and you must set the payment type to RF
.
-
The merchant makes a request to the refund endpoint with the transaction ID of the original transaction.
-
For asynchronous refunds, the Payments API returns a pending result code (
000.200.000
) and the transaction transitions to a final state when the PSP has processed the refund.For synchronous refunds, the Payments API returns either a successful or failure result code. The merchant receives a webhook for each transaction status change. The merchant can use the transaction status API call to verify the status of a transaction at any time.

Refund flow.
Transaction status flow
- The merchant sends a transaction status request to the Payments API.
- The Payments API responds, with the result code indicating the status of the transaction.

Transaction status flow.
Webhook flow
Webhooks provide updates on any changes in the state of the transaction. The Payments API sends them regardless of whether the transaction succeeded or failed. You must decrypt the encrypted webhook request body to process the transaction data.
- The merchant receives a webhook with a result code indicating the updated transaction status.
- The merchant returns a
200
status code response acknowledging the webhook.

Webhook flow.
To decrypt the webhook, see these examples. Some of the decryption examples are specific to AES 256, you must change these for AES 128 to match the relevant Peach Payments decryption key.
Postman workspace
See the Peach Payments Postman workspace for sample calls.
Updated 16 days ago