Looking for ePay classic docs? Go to docs.epay.dk
ePay documentationDocsePay documentation
Transactions

Refund Payment

POST
/public/api/v1/transactions/{transactionId}/refund

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

transactionIdstring
Required

The id of the transaction to refund.

Header Parameters

Idempotency-Keystring

Request Body

application/json

Refund request payload.

TypeScript Definitions

Use the request body type in TypeScript.

amountinteger
Required
Range:
1 <= value

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/transactions/string/refund" \  -H "Idempotency-Key: c4f5e8d2-1234-5678-90ab-cdef12345678" \  -H "Content-Type: application/json" \  -d '{    "amount": 1095  }'
{  "success": false,  "operations": [    {      "operationId": "019248e0-0ff4-7c1e-9438-f7648c9ff0fe",      "success": false,      "errorCode": {        "code": "DECLINED_BY_ISSUER_OR_SCHEME",        "message": "The operation was rejected by either the issuer or schemes."      }    }  ]}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}
{  "errorCode": "VALIDATION_ERROR",  "message": "Input validation errors",  "errors": {    "amount": [      "[required]: Is a required non-nullable field",      "[int]: Must be an integer",      "[min:0]: Must be greater than 0",      "[max:999999999]: Must be less than 999999999"    ]  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}