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 Access
  • your-user-id in the URI, should be replaced with the identifier of the user that the original payment belonged to
  • your-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

Copy
Copied
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)
id
string
amount
required
number
currency
string
application/json
{
  • "refund": {
    }
}

Response

Success

Response Schema: application/json
object (RefundDto)
id
string
merchantId
string
type
string
Value: "REFUND"
status
string
Enum: "CREATED" "CONFIRMED" "PROCESSING" "AUTHORIZED" "COMPLETE" "CANCELED" "USER_CANCELED" "PAYMENT_FAILED" "TIMEOUT" "SYSTEM_ERROR"
created
string

Created timestamp

cardType
string
Enum: "CARD" "SWISH" "WEBPAY_INVOICE"
amount
number
currency
string
callback
boolean
application/json
{
  • "refund": {
    }
}
Error responses

Please refer to our HTTP response codes and Error codes to learn what error responses you may expect from the API.

Example

Try it

Loading...