• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Create terminal refund

POST /v2/terminals/refunds

Creates a request to refund an Interac payment completed on a Square Terminal.


Permissions
PAYMENTS_WRITE
Guide
Create a Terminal refund
Try in API Explorer
Name Description
idempotency_key
string

Required

A unique string that identifies this CreateRefund request. Keys can be any valid string but must be unique for every CreateRefund request.

See Idempotency keys for more information.

Min Length 1
refund
TerminalRefund

The refund to create.

Response Fields

Name Description
errors
Error [ ]

Information about errors encountered during the request.

refund
TerminalRefund

The created TerminalRefund.

Examples

You are viewing an old version of the API
POST /v2/terminals/refunds
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/terminals/refunds \
  -X POST \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "402a640b-b26f-401f-b406-46f839590c04",
    "refund": {
      "amount_money": {
        "amount": 111,
        "currency": "CAD"
      },
      "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291",
      "reason": "Returning items",
      "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY"
    }
  }'
Response JSON
{
  "refund": {
    "id": "009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY",
    "payment_id": "5O5OvgkcNUhl7JBuINflcjKqUzXZY",
    "amount_money": {
      "amount": 111,
      "currency": "CAD"
    },
    "reason": "Returning items",
    "device_id": "f72dfb8e-4d65-4e56-aade-ec3fb8d33291",
    "deadline_duration": "PT5M",
    "status": "PENDING",
    "created_at": "2020-09-29T15:21:46.771Z",
    "updated_at": "2020-09-29T15:21:46.771Z",
    "app_id": "sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ",
    "card": {
      "card_brand": "INTERAC",
      "last_4": "1111",
      "exp_month": 1,
      "exp_year": 2022,
      "fingerprint": "sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw",
      "card_type": "CREDIT",
      "bin": "411111"
    },
    "order_id": "kcuKDKreRaI4gF4TjmEgZjHk8Z7YY",
    "location_id": "76C9W6K8CNNQ5"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?