Skip to main content

Overview

If a payment request no longer needs to be collected, you can cancel it through the /Payment/{paymentRequestId}/Cancel endpoint. Canceling a request stops the payer from completing that payment and moves the payment request to the Canceled status. Use this endpoint for payment requests that are still outstanding, such as requests that are pending payer action, scheduled for a future date, or otherwise not yet completed.

How It Works

1

Obtain an Access Token

Before calling the cancel endpoint, secure an access token by making a POST request to /auth/token using your ClientId and ClientSecret.
2

Identify the Payment Request

Use the PaymentRequestId returned when the payment request was created, or the ID received in a payment status webhook.
3

Submit the Cancellation

Send a POST request to /Payment/{paymentRequestId}/Cancel with the payment request ID in the path.
4

Track the Updated Status

After cancellation, the payment request status becomes Canceled. You can use payment status webhooks to keep your system in sync.

Canceling the Payment Request

The /Payment/{paymentRequestId}/Cancel endpoint cancels an existing payment request by referencing its PaymentRequestId.

Endpoint

  • URL: https://api.synchpay.com/Payment/{paymentRequestId}/Cancel
  • Method: POST
  • Authorization: Bearer <AccessToken>

Path Parameters

ParameterTypeDescriptionRequired
paymentRequestIdstringUnique identifier of the payment request to cancelYes

Request Body

This endpoint does not require a request body.

Example Request

POST /Payment/ce0e3549-a83e-4cf6-bb5c-1d50a21d8af7/Cancel HTTP/1.1
Host: api.synchpay.com
Authorization: Bearer eyJhbGciOi...

Response

A successful request returns 200 OK with no response body.

Error Responses

Status codeCause
400The payment request cannot be canceled from its current status.
401Missing or invalid access token.
404The payment request was not found.

When to Use This Endpoint

Use the cancel endpoint when you want to:
  • Stop an unpaid payment request before the payer completes it.
  • Cancel a scheduled payment request before it is processed.
  • Prevent a duplicate or incorrect request from being paid.

Payment Status

After a successful cancellation, the payment request moves to Canceled, which is a final state. See payment statuses for the full status transition table.
Last modified on April 28, 2026