Logo
Peach Payments Public API Documentation

Payments [Public]

Number of APIs: 5


The Payments collection allows you to make a payment, check the status of a payment, and refund a payment.

API endpoints

The following are the API endpoints for the live and sandbox servers:

  • Live: https://api-v2.peachpayments.com

  • Sandbox: https://testapi-v2.peachpayments.com

Prerequisites

Retrieve the following credentials from the Payments API section of the Peach Payments Dashboard:

  • apiUsername: It resembles 04ef7406a8b111eba6e102d14de18c0z.

  • apiPassword: It resembles defR87OszyaXEjMlDk92z.

  • entityId: It resembles 8ac7a4c9791c31ee01791f27b739110z.

Ensure that you also have a shopperResultUrl for the Payments API to redirect the user to after they have provided their payment information.

Fork the environment and collection

To fork the environment from the [Peach Payments workspace]

  1. Navigate to Environments, click View more actions next to the Payments-Public environment, and click Create a fork.

  2. Enter a fork label, select the workspace to fork to, and click Fork Environment.

To fork the collection from the [Peach Payments workspace]

  1. Navigate to Collections, click View more actions next to the Payments [Public] collection, and click Create a fork.

  2. Enter a fork label, select the workspace to fork to, ensure that Watch original collection is selected, and click Fork Collection.

Configure the environment

To get started:

  1. In your workspace, navigate to Environments and click the forked Payments-Public environment.

  2. Enter the credentials from the Prerequisites section above into the CURRENT VALUE column. In the shopperResultUrl row, specify the URL to which the Payments API must redirect the user to after processing the payment request.

  3. Select the Payments-Public option from the environment drop-down list in the upper right of the screen.

  4. Click Save in the upper right of the screen.

Use the Payments API

Initiate a debit transaction

Note: At the moment, in sandbox, it's only possible to complete the entire debit flow for EFTsecure (if your account is in test mode).

For more information on testing the Payments API, see the documentation hub.

Payment%20flow.

  1. In your forked collection, navigate to Payments [Public] > payments > POST Payment.

  2. Select the Payments-Public option from the environment drop-down list in the upper right of the screen.

  3. Click Send.

The payment is created and set to pending. Redirect the customer to the URL in the redirect object. Some payment methods use GET requests, for which you must include the parameters as query strings. Others use POST requests, for which you must include the parameters in the request body as x-www-form-urlencoded content. See the documentation hub for example GET and POST redirect requests. 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.

Query a payment's status by merchantTransactionId

Transaction%20status%20flow.

  1. In your forked collection, navigate to Payments [Public] > payments > GET Query transaction by merchantTransactionId.
    Note: The Qodex collection has been configured to carry over the merchantTransactionId from the latest debit transaction.

  2. Select the Payments-Public option from the environment drop-down list in the upper right of the screen.

  3. Click Send.

The response body describes the status of all the transactions related to the merchantTransactionId.

Query a payment's status by transaction ID

Transaction%20status%20flow.

  1. In your forked collection, navigate to Payments [Public] > payments > {transaction id} > GET Query transaction by transaction ID.
    Note: The Qodex collection has been configured to carry over the id from the latest debit transaction.

  2. Select the Payments-Public option from the environment drop-down list in the upper right of the screen.

  3. Click Send.

The response body describes the status of the transaction.

Refund a successful debit transaction

To refund a transaction, you must have completed the entire debit transaction flow, including entering your payment information into the payment method interface so that the payment completes.

Note: Only certain payment methods support refunds. For more information, see the documentation hub.

Refund%20flow.

  1. In your forked collection, navigate to Payments [Public] > payments > {transaction id} > POST Refund transaction.
    Note: The Qodex collection has been configured to carry over the id from the latest debit transaction.

  2. Select the Payments-Public option from the environment drop-down list in the upper right of the screen.

  3. Click Send.

The payment is refunded.


1. payments-{transaction id} - Query transaction by transaction ID

GET {{baseUrl}}/payments/:transactionId?authentication.userId={{apiUsername}}&authentication.password={{apiPassword}}&authentication.entityId={{entityId}}



2. payments-{transaction id} - Refund transaction

POST {{baseUrl}}/payments/:transactionId



3. payments - Payment

ENDPOINTS