Query a payment status

Overview

After creating a payment link, you can query the status of the payment transaction. The query transaction status object takes the paymentId and the bearer token and returns the payment details and status.

Querying the payment can return one of the following statuses:

Webhook eventDescription
initiatedTriggered when you create the payment link.
processingTriggered when a customer attempts the payment.
completedTriggered when a customer completes the payment.
cancelledTriggered when a customer cancels the payment.
expiredTriggered when the payment link expires.

Flow

To learn more about the required and optional parameters, see the API reference section.

The query payment status flow works as follows:

Query payment status flow.

Query payment status flow.

  1. The merchant queries the payment status by making a request to the /api/payments/{paymentId} endpoint.
  2. The Payment Links API responds with the payment status.

Example requests and responses

For sample requests and responses, see the interactive API playground or use the Peach Payments Postman collection:

Run in Postman