Process an Unlinked Refund

Link to section

Requirements and limitations

The ability to process an unlinked refund has the following limitations:

  • Unlinked refunds aren't supported in Japan.

  • Refunds cannot be processed by a Square account that hasn't been enabled for payment processing.

  • The unlinked refund feature is only available for sellers who've been authorized to use it. A seller using your application needs to contact their Square account manager for authorization. When authorized, all of the seller's locations can take unlinked refunds.

    The following example is the 400 response that your application receives if used by a seller who isn't authorized to make unlinked refunds:

    { "errors": [ { "code": "BAD_REQUEST", "detail": "Unlinked refund processing is not enabled for this merchant.", "category": "INVALID_REQUEST_ERROR" } ] }
Link to section

Refund a non-Square payment

Non-Square payments exist when a seller is transitioning their payment processing from another service to Square. During the transition period, the seller might want to issue a refund through Square for a payment taken before they started with Square. The refund request is unlinked because there's no Square Payment object to represent the original payment.

This unlinked refund is processed the same way as a standard refund. The seller's Square account is the source of the funds for the refund. If there are insufficient funds in the seller's Square account, the seller's linked bank account is the refund's source.

Link to section

Create an unlinked refund

Use the RefundPayment endpoint to process an unlinked refund to a card. In the request, don't provide a payment ID. Instead, provide values for the following unlinked refund types before processing the refund.

Link to section

Create an unlinked refund to a card

Add the following values to the RefundPayment request for the card refund:

  • destination_id - Identifies the refund destination by setting the value to a payment card (or Square gift card) token or card-on-file ID. Specify one of the following:
    • A payment token.
    • A Square gift card or card-on-file ID.
  • location_id - Where the refund occurred.
  • customer_id - Required for card-on-file destinations.
  • unlinked - Must be true.

A payment token is generated by your application using the Web Payments SDK. When testing, use a Sandbox test token such as cnon:card-nonce-ok.

The following RefundPayment request specifies a test payment card on file that Square provides for Sandbox testing. You can test the same request with any of the card test values that Square provides.

Refund payment

After receiving the request, Square processes the refund and returns money to the buyer. In response, Square returns a Refund object, as shown in the following example:

The order_id in this example is the unlinked return order ID. Square creates a refund order while processing the refund request and returns the new order ID in this response.

The destination_details field contains the details of the refund destination. Card refunds have a card_details field, which contains the refund destination's payment card details that you can use to confirm with the buyer that the funds were refunded to the intended card.

Link to section

Create a cash unlinked refund

Add the following values to the RefundPayment request for the cash refund:

  • destination_id - Must be CASH.
  • location_id - Where the refund occurred.
  • unlinked - Must be true.
  • cash_details - Must include the amount of cash the seller provided as seller_supplied_money.

The following is an example RefundPayment request:

Refund payment

After receiving the request, Square makes a record of the refund and returns a Refund object, as shown in the following example:

Link to section

Create an unlinked refund to an external source

Add the following values to the RefundPayment request for the external refund:

  • destination_id - Must be EXTERNAL.
  • location_id - Where the refund occurred.
  • unlinked - Must be true.
  • external_details - Must include:
    • source - A description of the external refund source.
    • type - See accepted options.

The following is an example RefundPayment request:

Refund payment

After receiving the request, Square makes a record of the refund and returns a Refund object, as shown in the following example: