This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
This endpoint is used to send a merchant's refund requests to a Payment Service Provider (PSP).
Wix calls this endpoint when a merchant initiates a refund from the Wix dashboard. Learn more about implementing this endpoint
You cannot try out this endpoint because it has to be implemented by a payment plugin and can have an arbitrary URL. So please ignore the Authorization and POST sections below as well as the Try It Out button.
Wix transaction ID.
Refund ID.
PSP transaction ID.
Credentials that the PSP provided when the merchant connected their account.
Total amount to refund in a currency’s smallest unit.
Learn more about currency units.
Connection mode. Identifies whether a request is live or for testing purposes.
Reason for refund. Defined by the merchant.
PSP refund ID.
Wix reason code indicating a failed request.
PSP-specific error code.
PSP-specific error message.
This field is ignored, do not send it.
curl -X POST https://psp.example.com/refund \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"wixRefundId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"pluginTransactionId": "e89b-12d3-a456-42665",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"refundAmount": 1000,
"mode": "live",
"reason": "REQUESTED_BY_CUSTOMER"
}'
{
"pluginRefundId": "ce590272-87bf-428f-943a-0ff594059712"
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.