POST
/api/Transactions/{id}/refund
const url = 'https://example.com/api/Transactions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refund';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","amount":1,"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/Transactions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refund \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "amount": 1, "reason": "example" }'Issues a full or partial refund for an approved transaction. A new (negative-amount) refund transaction is created and the original is marked Refunded.
POST /api/transactions/{id}/refund
{
"amount": 12.50,
"reason": "Customer cancelled within trial"
}Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
The transaction’s identifier.
Request Body
Section titled “Request Body ”Refund payload.
object
id
string format: uuid
amount
number format: double
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "amount": 1, "reason": "example"}object
id
string format: uuid
amount
number format: double
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "amount": 1, "reason": "example"}object
id
string format: uuid
amount
number format: double
reason
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "amount": 1, "reason": "example"}Responses
Section titled “ Responses ”Refund recorded.
Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
memberId
string format: uuid
memberName
string
subscriptionId
string format: uuid
invoiceId
string format: uuid
paymentMethodId
string format: uuid
status
string
amount
number format: double
currency
string
reference
string
description
string
declineCode
string
cardInfo
string
processedAt
string format: date-time
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "status": "Processing"}Validation failed — check the errors object.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}No transaction with the given ID exists.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}