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:
Service | Live | Sandbox |
---|---|---|
Authentication | https://dashboard.peachpayments.com | https://sandbox-dashboard.peachpayments.com |
Checkout | https://secure.peachpayments.com | https://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. | 📋 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.
-
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}" }'
-
Create a checkout by executing a POST
{checkout-endpoint}/v2/checkout
request with the JWT retrieved from the above call. -
Redirect your customer to the
redirectUrl
. -
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 thecheckoutId
parameter as a reference to the payment. The webhook notification and the POST redirect to theshopperResultUrl
include thecheckoutId
.
Updated 20 days ago