Refunds
Guide to integrate against Mode's refund APIs
Mode's Refunds REST APIs allow you to easily create and query refunds.
Endpoint | Description |
---|---|
POST v1/payments/:id/refund | Create a refund. |
GET /v1/payments/:pid/refund/:rid | Get a specific refund against a payment. |
GET /v1/payments/:pid/refund | Get all refunds against a payment. |
Creating a Refund
When creating the refund, you can supply an amount
; this has to be less than the original payment amount. You can also supply a userId
; this will be the user you wish to refund.
If either or no values are supplied, the values default to the original user's account and the original payment amount.
Checkout our Payments Guide to find out how you can get the ID of an existing payment
Querying Refunds
Refunds can be queried in two different ways; by querying against a payment, you can get all refunds for that payment.
It might be that you have multiple refunds against a payment, such as refunding delivery charges and then also refunding the item if the user didn't want it. Using the same endpoint to query a refund and providing a refund id will allow you to filter the results down to that particular refund.
Updated over 3 years ago