Refund payment
Refunds a previously created payment. Both regular payments and recurring payments are refunded with this method.
your-authorization
should be replaced with your Authorization header, see Accessyour-user-id
in the URI, should be replaced with the identifier of the user that the original payment belonged toyour-payment-id
in the URI, should be replaced with the id for the payment that you want to refund
info
- If id is omitted at it will be generated by the system, if an id is provided it needs to be system unique
- Multiple refunds is supported for one original payment
Request
POST /v1/users/$(your-user-id)/payments/$(your-payment-id)/refund
Content-Type: application/json
Accept: application/json
Authorization: $(your-authorization)
Request Body schema: application/json
Refund
object (RefundCreateDto) | |||||||
|
application/json
{- "refund": {
- "id": "string",
- "amount": -123.12,
- "currency": "SEK"
}
}
Response
Success
Response Schema: application/json
object (RefundDto) | |||||||||||||||||||
|
application/json
{- "refund": {
- "amount": -123.12,
- "merchantId": "sdk-test-merchant",
- "created": "2020-09-04T11:42:18+0200",
- "cardType": "CARD",
- "callback": false,
- "currency": "SEK",
- "id": "id",
- "type": "REFUND",
- "status": "CREATED"
}
}
Error responses
Please refer to our HTTP response codes and Error codes to learn what error responses you may expect from the API.
Example
- curl
- Python
- Java
- C#
- Node.js
Try it
Loading...