Payment flow summary

Step 1: Generate signature

After you have collected all relevant transaction information, you need to generate and add a signature to your request for authentication. The signature uses the HMAC SHA256 algorithm and all the payment parameters in the request. The secret token provided to you by Peach Payments acts as the key to generate the signature.

For more details on how to generate the signature, see the Authentication and authorisation section.

Step 2: Initialise Checkout and redirect customer

After you have generated the signature, you can initialise Checkout using your request parameters and signature and redirect the user to the payment page using one of the following methods:

  • Redirect
  • Form POST

Redirect-based Checkout

Execute the redirect-based Checkout call and redirect the user to the returned URL.

Form POST Checkout

Execute the Checkout call and use a form POST to redirect the user to the payment page:

<!doctype html>
<form name="form" action="" method="POST" accept-charset="utf-8">
    <input type="hidden" name="amount" value="2" />
    <input type="hidden" name="authentication.entityId" value="8ac7a4ca68c22c4d0168c2caab2e0025" />
    <input type="hidden" name="currency" value="ZAR" />
    <input type="hidden" name="merchantTransactionId" value="TESTING002" />
    <input type="hidden" name="nonce" value="Test1234" />
    <input type="hidden" name="paymentType" value="DB" />
    <input type="hidden" name="shopperResultUrl" value="" />
    <input type="hidden" name="signature" value="311ed8e11e2da00d98c7479ca390a5396fe643e13629d850243dada877963afd" />
    <input type="submit" value="Continue to Payment Method"/></form>

Step 3: Query payment status

After payment processing completes, Checkout redirects the customer to your shopperResultUrl. That redirect is a POST request which has the same structure as that of the webhook. You can make a request to get the status of a Checkout payment request by using the checkoutId parameter as a reference to the payment.

The webhook notification and the POST redirect to the shopperResultUrl include the checkoutId.


API endpoint

The API base URL for querying the payment status differs from that of payment initiation in step 2 above. This API forms part of the Peach Payments back office APIs.

import requests

url = ""

payload = {}
headers= {}

response = requests.request("GET", url, headers=headers, data = payload)

curl --location --request GET ''