Hosted Checkout V2

Overview

Hosted Checkout enables you to accept payments by redirecting customers to the secure Peach Payments Checkout page.

Hosted Checkout supports more payment methods than Embedded Checkout.

API endpoints

The API endpoints for the live and sandbox servers are:

ServiceLiveSandbox
Authenticationhttps://dashboard.peachpayments.comhttps://sandbox-dashboard.peachpayments.com
Checkouthttps://secure.peachpayments.comhttps://testsecure.peachpayments.com

Known limitations

Sending a Hosted Checkout link to a customer using WhatsApp or a service that unfurls the link is not supported. You can only load a Hosted Checkout link once, and unfurling the link uses this load event.

Quick links

📝 API playground

Detailed reference to all the Checkout API endpoints and mock calls.

API reference
🚀 Postman collection

Use the sample Checkout calls in Postman. See the collection overview for more information.

Run in Postman
📋 Sample project

Experiment with a Redirect-based Checkout sample integration project.

Node sample project
Python sample project

Integration steps

🚧

Checkout (both Embedded and Hosted) does not support iframing as mentioned on the Checkout overview. If you insist on iframing Hosted Checkout, for Apple Pay, follow the steps described in the known limitations section. Failing to do so results in Apple Pay payments not working. iframing Hosted Checkout could cause payment methods to fail.

  1. Generate an access token by executing a POST {peach-auth-service}/api/oauth/token request with your client ID, client secret, and merchant ID.

    curl --location --request POST '{peach-auth-service}/api/oauth/token' 
    --header 'content-type: application/json' 
    --data-raw 
    '{
        "clientId": "{clientId}",
        "clientSecret": "{clientSecret}",
        "merchantId": "{merchantId}"
    }'
    
  2. Create a checkout by executing a POST {checkout-endpoint}/v2/checkout request with the JWT retrieved from the above call.

  3. Redirect your customer to the redirectUrl.

  4. 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 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.

Run in Postman