Mintcash
API reference

Refunds

Issue full or partial refunds against a captured payment, list every refund on a payment, or retrieve a single refund.

A Refund represents money returned to the customer. Refunds are always tied to a parent payment in a terminal-capable state (succeeded or partially_refunded). Partial refunds compose — you can issue several until the payment is fully refunded.

Create a refund

Refund a payment.

Multiple partial refunds are allowed up to the original payment amount. Only one in-flight refund per payment at a time.

Authentication: Basic Auth (public_key:secret_key) with merchant role.

@returns 200 - The refund (terminal or in-flight) @returns 400 - Validation failure (amount, externalId, currency) @returns 401 - Invalid or missing API credentials @returns 403 - Requires merchant access / merchant not active @returns 404 - Payment not found (or not owned by this merchant) @returns 409 - Payment is not refundable, or a previous refund is still in flight @returns 422 - Refund amount exceeds remaining refundable balance @returns 502 - Provider returned an invalid response @returns 503 - Provider temporarily unreachable

POST
/payments/{paymentId}/refund
AuthorizationBasic <token>

In: header

Path Parameters

paymentIdstring
amount?number
externalIdstring

provider verbatim as `reference_id`.

reason?string

Response Body

application/json

application/json

curl -X POST "https://sandbox.mintcash.me/payments/string/refund" \  -H "Content-Type: application/json" \  -d '{    "externalId": "string"  }'
{
  "amount": 0,
  "createdAt": "string",
  "currency": "string",
  "externalId": "string",
  "failureCode": "string",
  "failureMessage": "string",
  "id": "string",
  "paymentAmountRefundable": 0,
  "paymentAmountRefunded": 0,
  "paymentId": "string",
  "providerRefundId": "string",
  "status": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}

List refunds for a payment

List all refunds for a payment, newest first.

Authentication: Basic Auth (public_key:secret_key) with merchant role.

@returns 200 - The list of refunds (possibly empty) @returns 401 - Invalid or missing API credentials @returns 403 - Requires merchant access / merchant not active @returns 404 - Payment not found (or not owned by this merchant)

GET
/payments/{paymentId}/refunds
AuthorizationBasic <token>

In: header

Path Parameters

paymentIdstring

Response Body

application/json

application/json

curl -X GET "https://sandbox.mintcash.me/payments/string/refunds"
{
  "refunds": [
    {
      "amount": 0,
      "createdAt": "string",
      "currency": "string",
      "externalId": "string",
      "failureCode": "string",
      "failureMessage": "string",
      "id": "string",
      "paymentAmountRefundable": 0,
      "paymentAmountRefunded": 0,
      "paymentId": "string",
      "providerRefundId": "string",
      "status": "string"
    }
  ]
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}

Retrieve a refund

Get a refund by ID.

Authentication: Basic Auth (public_key:secret_key) with merchant role.

@returns 200 - The refund @returns 401 - Invalid or missing API credentials @returns 403 - Requires merchant access / merchant not active @returns 404 - Refund not found (or not owned by this merchant)

GET
/refunds/{refundId}
AuthorizationBasic <token>

In: header

Path Parameters

refundIdstring

Response Body

application/json

application/json

curl -X GET "https://sandbox.mintcash.me/refunds/string"
{
  "amount": 0,
  "createdAt": "string",
  "currency": "string",
  "externalId": "string",
  "failureCode": "string",
  "failureMessage": "string",
  "id": "string",
  "paymentAmountRefundable": 0,
  "paymentAmountRefunded": 0,
  "paymentId": "string",
  "providerRefundId": "string",
  "status": "string"
}
{
  "code": "not_found",
  "details": {},
  "message": "string"
}