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

You are viewing an old version of the API
Retrieve transaction

Deprecated
Effective August 15th, 2019

Retrieves details for a single transaction.

Permissions
PAYMENTS_READ

Deprecation date
2019-08-15
Retirement date
2021-09-01
Replaced by
BatchRetrieveOrders
Migration guide
Name Description
location_id
string

Required

The ID of the transaction's associated location.

transaction_id
string

Required

The ID of the transaction to retrieve.

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

transaction
Transaction

The requested transaction.

Examples

You are viewing an old version of the API
GET /v2/locations/{location_id}/transactions/{transaction_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
curl https://connect.squareup.com/v2/locations/18YC4JDH91E1H/transactions/KnL67ZIwXCPtzOrqj0HrkxMF \
  -H 'Square-Version: 2020-09-23' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "transaction": {
    "id": "KnL67ZIwXCPtzOrqj0HrkxMF",
    "location_id": "18YC4JDH91E1H",
    "created_at": "2016-03-10T22:57:56Z",
    "tenders": [
      {
        "id": "MtZRYYdDrYNQbOvV7nbuBvMF",
        "location_id": "18YC4JDH91E1H",
        "transaction_id": "KnL67ZIwXCPtzOrqj0HrkxMF",
        "created_at": "2016-03-10T22:57:56Z",
        "note": "some optional note",
        "amount_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "processing_fee_money": {
          "amount": 138,
          "currency": "USD"
        },
        "type": "CARD",
        "card_details": {
          "status": "CAPTURED",
          "card": {
            "card_brand": "VISA",
            "last_4": "1111"
          },
          "entry_method": "KEYED"
        },
        "additional_recipients": [
          {
            "location_id": "057P5VYJ4A5X1",
            "description": "Application fees",
            "amount_money": {
              "amount": 20,
              "currency": "USD"
            }
          }
        ]
      }
    ],
    "reference_id": "some optional reference id",
    "product": "EXTERNAL_API"
  }
}

Share Feedback

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