GET on the same path returns the refunds of that payment, so you check a refund’s state exactly where you requested it.
1. Endpoints
POST creates a refund, GET lists the refunds of that payment.
Headers
POST needs a key with write access, GET with read access. A key without it returns 401; generate the right one in the panel.
The
pay segment in the path selects the payment gateway. Other paymove products have their own segments (go, parking, multi) - refund under the segment of the product the payment belongs to.Where to get orderId
{orderId} is the internal order id assigned by Paymove, for example PAY1784798914400. You get it in two places:
- the
orderIdfield of the webhook payload, - the response of the payment status query.
2. Creating a refund
{} - it refunds the full payment amount.
Body parameters
Mind the field name: the amount is
amountMinor here, while creating a payment calls it price. The unit is the same in both places - grosz as an integer.Response
POST returns one refund, GET an array of exactly the same type - one parser serves both calls.
3. Refund statuses
status takes the same values as a payment status:
A successful refund sets the status of the whole payment to
REFUNDED.
4. Listing a payment’s refunds
[]. This is the endpoint to poll for a refund’s state - call it every few seconds until status is terminal.
The list also contains failed attempts. Every refund is recorded before it is submitted for settlement, so an attempt that is rejected outright is not lost - the
POST answers 400 and the attempt shows up in the list with status: ERROR.5. What cannot be refunded
Each of these returns400:
- An incomplete payment. Only a
COMPLETEDpayment can be refunded. There is nothing to refund onINITIALIZED,PENDING,CANCELEDorERROR. - A payment that already has a refund. An existing refund in
PENDINGorCOMPLETEDblocks further attempts - one refund per payment. - An amount other than the full one. An
amountMinordifferent from the payment amount is rejected; partial refunds are not supported. - Some payments cannot be refunded over the API at all, depending on how they were settled. If you get a
400on a completed payment with the full amount, write to integration@paymove.io - we will issue the refund for you.
PayPo refunds are supported, but the confirmation arrives asynchronously - the
POST response always carries status: "PENDING", never COMPLETED straight away.6. Limitations
7. Status codes
A payment that does not exist and a payment that belongs to another partner both return the same
403. That is intentional - a 404 would confirm which order ids exist in Paymove. Do not infer from a 403 whether a payment exists.orderId and by the partner your key belongs to. There is no way to refund another partner’s payment or to point a refund at their settlement details.
8. Recommended flow
- When you handle the webhook, store the payment’s
orderIdnext to your ownexternalId. - Before refunding, confirm the payment is
COMPLETEDand that you have not refunded it already -GET …/refund. - Send
POST …/refund. Store the refund’sidandorderIdfrom the response. - Poll
GET …/refunduntil the refund’s status is terminal.COMPLETEDmeans settled;ERRORmeans it was rejected. - Mark the refund as done on your side only after
COMPLETED.
What’s next
Payment statuses
Where to get
orderId and how to check a payment’s status.Errors
The error format and the mechanisms this API does not have.
REST API
Creating the payment you later refund.
Support
Contact us when a refund cannot be done over the API.