Learn how to initiate a refund for a previously completed payment using the SynchPay API.
/payment/refund
endpoint. This enables you to return funds to the consumer in cases such as cancellations, overcharges, or customer service resolutions.
Obtain an Access Token
/payment/refund
, secure an access token by making a POST
request to /auth/token
using your ClientId
and ClientSecret
.Identify the Payment
PaymentRequestId
of the transaction you want to
refund. This ID was returned during the original payment request and is also
included in the payment confirmation webhook.Submit a Refund Request
POST
request to the
/payment/refund
endpoint. You can specify the amount to be refunded,
an optional description, and a PDF attachment to provide documentation.Receive Refund Confirmation
HTTP 200
./payment/refund
endpoint allows you to refund all or part of a previously completed payment by referencing its PaymentRequestId
.
https://api.synchpay.com/payment/refund?paymentRequestId=<GUID>
POST
Bearer <AccessToken>
/auth/token
using your ClientId
and ClientSecret
.Parameter | Type | Description | Required |
---|---|---|---|
paymentRequestId | string | The unique identifier of the original payment request to refund | Yes |
Parameter | Type | Description | Required |
---|---|---|---|
Amount | int | The refund amount in cents. For example, $20.00 should be submitted as 2000 . | Yes |
Description | string | (Optional) Reason for the refund. This will appear in consumer communications if supported. | No |
Attachment | object | (Optional) PDF file with additional refund documentation. | No |
Attachment
object must contain:
Field | Type | Description | Required |
---|---|---|---|
FileName | string | Name of the PDF file (e.g. note.pdf ) | Yes |
FileData | string | Base64-encoded PDF file content | Yes |
FileType | string | MIME type (must be "application/pdf" ) | Yes |