A Refund transaction will refund an existing settled Sale or Capture, and return the amount back to customer.

A Refund transaction can only work on a transaction that has already been settled. Therefore, a Refund can only be performed as early as next day.

Refunds differ from Void transactions in that Voids cancel a transaction that has not yet settled, and can be performed immediately after an erroneous transaction. In order to perform a Refund, the transaction must be settled - i.e. the transaction has "gone through"- usually as early as the next day.

For transactions that have not yet settled, see Void Transactions.

Partial Refund

In the event that only part of a sale transaction should be refunded, a partial refund should be performed. Specifying an amount less than the original sale transaction as part of your refund request will enure only that amount is refunded. Partial refunds may be repeated, but only to the threshold of the remaining transaction balance.

API Request Example

A Refund transaction can be created by calling our POST /v1/transactions API endpoint and providing refund as the value of the type property. For Partial refunds, also include amountand number value in your request.

Below are Refund and Partial Refund transaction examples with the minimum required request fields, for a previously approved Sale transaction which had the id of h1rn8c9nd81y9bkgzax2k2rax.

{
    "type": "refund",
    "transactionId": "txn_h1rn8c9nd81y9bkgzax2k2rax"
}
{
    "amount": 145,
    "authorization": {
        "approvedAmount": 0,
        "partial": false,
        "processorMessage": "succeeded",
        "processorTransactionId": "re_3MgGVYAzKBz0Hugp0m88OCfq",
        "status": "A"
    },
    "createdOn": "2023-02-22T23:53:31Z",
    "currency": "USD",
    "id": "txn_6v59stftbs837axmpahj21m8jf",
    "merchantId": "mid_2zyd88xrnr90xskmjmqpd0x1vj",
    "message": "Refund Succeeded",
    "originalTransactionId": "txn_h1rn8c9nd81y9bkgzax2k2rax",
    "payment": {
        "bin": "432100",
        "brand": "VISA",
        "last4": "0012",
        "type": "CREDIT"
    },
    "plan": {
        "id": "plan_57jaev7pna8nftrkr6xksaastw",
        "name": "Stripe Only Plan"
    },
    "platformId": "pfm_7aj2pxrrcg8zs8x6cxyyrwmyqe",
    "processor": {
        "id": "midCon_6v59stftbs837axmpahj21m8jf",
        "name": "Stripe"
    },
    "type": "refund"
}
{
    "type": "refund",
  	"amount": 200,
    "transactionId": "txn_h1rn8c9nd81y9bkgzax2k2rax"
}
{
    "amount": 200,
    "authorization": {
        "approvedAmount": 0,
        "partial": true,
        "processorMessage": "succeeded",
        "processorTransactionId": "re_3MgGVYAzKBz0Hugp0m88OCfq",
        "status": "A"
    },
    "createdOn": "2023-02-22T23:53:31Z",
    "currency": "USD",
    "id": "txn_6v59stftbs837axmpahj21m8jf",
    "merchantId": "mid_2zyd88xrnr90xskmjmqpd0x1vj",
    "message": "Refund Succeeded",
    "originalTransactionId": "txn_h1rn8c9nd81y9bkgzax2k2rax",
    "payment": {
        "bin": "432100",
        "brand": "VISA",
        "last4": "0012",
        "type": "CREDIT"
    },
    "plan": {
        "id": "plan_57jaev7pna8nftrkr6xksaastw",
        "name": "Stripe Only Plan"
    },
    "platformId": "pfm_7aj2pxrrcg8zs8x6cxyyrwmyqe",
    "processor": {
        "id": "midCon_6v59stftbs837axmpahj21m8jf",
        "name": "Stripe"
    },
    "type": "refund"
}

What’s Next