Skip to content
payrocdevelopers

Refunds

Explains referenced refunds, unreferenced refunds, and reversals, and when to use each one to return funds to a customer

Prerequisites: Authentication

When a customer returns an item or requests money back, the merchant can run a

refund

to return a payment to the customer’s account if it is in a

closed batch

or cancel the payment if it is in an open batch.

Our gateway supports two types of refund:

  • Referenced refund
  • Unreferenced refund

Refund types

The refund type you use depends on whether you still have the original payment. If you do, the gateway's action depends on whether the payment is in an open or a closed batch.

Mermaid diagram
Mermaid source
flowchart TD
    A([Customer requests a refund]):::blue
    B{Do you have the original payment,<br />with valid payment details?}:::yellow
    U([Unreferenced refund<br />Send the customer's new payment details]):::green
    R[Referenced refund<br />Send the refund with the original paymentId]:::neutral
    C{Is the payment in an open batch?}:::yellow
    CANCEL([Gateway cancels the payment.]):::green
    REFUND([Gateway returns the funds to the customer]):::green

    A --> B
    B -->|No, or the details have expired| U
    B -->|Yes| R
    R --> C
    C -->|Yes, open batch| CANCEL
    C -->|No, closed batch| REFUND

    classDef blue fill:#0051C2,stroke:#001D4E,color:#FFFFFF
    classDef green fill:#00E0B8,stroke:#001D4E,color:#001D4E
    classDef yellow fill:#F4F7FE,stroke:#0051C2,color:#0051C2,font-size:15px
    classDef neutral fill:#E5E5E5,stroke:#636363,color:#001D4E

Referenced refund

Our gateway uses the payment details from the original payment to return the payment to the customer. If the payment is in an open batch, the gateway automatically cancels the payment. If the payment is in a closed batch, the gateway refunds the payment.

Example

A customer returns an item to the merchant and wants a refund. The merchant uses their POS to look up the original sale and run a refund against the sale.

Unreferenced refund

If there is no previous payment or the customer payment details have expired, you need to provide our gateway with the customer’s new payment details so that we know where to send the funds to.

Example

A customer returns an item to the merchant and wants a refund. However, their original payment details have expired. The merchant uses their new payment details to run an unreferenced refund.

Reversal

If the customer’s payment is in an open batch, the merchant can cancel the payment before we process it. This is known as a

reversal

.

Note: Although there is a discrete endpoint to reverse a payment, if you send a refund request to our refund endpoint, our gateway automatically cancels the payment if it is in an open batch.

Guides

Send a referenced refund to a bank account

Return funds to a customer’s bank account with a paymentId.

Reverse a bank transfer payment

Cancel a bank transfer payment that’s in an open batch.

Send an unreferenced refund to a customer’s bank account

Return funds to a customer’s bank account without a paymentId.

Run a referenced refund for a card payment

Return funds to a customer’s account with a paymentId.

Run an unreferenced refund for a card payment

Return funds to a customer’s account without a paymentId.

Reverse a card sale or a pre-authorization

Cancel a card sale or a pre-authorization that's in an open batch.

Browse guides

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer