{
  "info": {
    "name": "Payments",
    "_postman_id": "1e374a37-6211-3144-2df0-94599f1ae4f7",
    "description": "In-person payment operations",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{bearerToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.guile.app",
      "type": "string",
      "description": "Base URL for this API collection"
    },
    {
      "key": "bearerToken",
      "value": "",
      "type": "string",
      "description": "Bearer token for authenticated requests in this collection"
    }
  ],
  "item": [
    {
      "id": "891d1af4-70dc-1bcb-ebb0-c865119bcee7",
      "name": "Payments",
      "description": "In-person terminal and contactless card payments",
      "item": [
        {
          "id": "88a91b68-6ca7-f25b-8054-2beceeef1aae",
          "name": "List contactless payments",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/appointments/:appointmentId/contactlessPayments",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "appointments",
                ":appointmentId",
                "contactlessPayments"
              ],
              "variable": [
                {
                  "key": "appointmentId",
                  "value": "{{appointmentId}}"
                }
              ]
            },
            "description": "List contactless payments for an appointment, including in-flight ones."
          }
        },
        {
          "id": "69dd4c27-c7e6-941a-9716-08e890cdabb0",
          "name": "Create a contactless payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{Idempotency-Key}}",
                "description": "A client-generated idempotency key to ensure operations are only processed once\neven if a client retries the operation.\nThe V4 UUID format, as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122), is\nrecommended to avoid collisions but is not required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/appointments/:appointmentId/contactlessPayments",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "appointments",
                ":appointmentId",
                "contactlessPayments"
              ],
              "variable": [
                {
                  "key": "appointmentId",
                  "value": "{{appointmentId}}"
                }
              ]
            },
            "description": "Create a pending contactless payment for collecting an in-person\nappointment payment. When `amount` is omitted, the appointment's\nremaining balance is used."
          }
        },
        {
          "id": "b1983c1e-0b97-e212-b218-9433de6870e1",
          "name": "Get a contactless payment",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/contactlessPayments/:contactlessPaymentId",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "contactlessPayments",
                ":contactlessPaymentId"
              ],
              "variable": [
                {
                  "key": "contactlessPaymentId",
                  "value": "{{contactlessPaymentId}}"
                }
              ]
            },
            "description": "Return one contactless payment by identifier."
          }
        },
        {
          "id": "02f92b67-c46d-d9eb-224d-536a8c200a39",
          "name": "Capture a contactless payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{Idempotency-Key}}",
                "description": "A client-generated idempotency key to ensure operations are only processed once\neven if a client retries the operation.\nThe V4 UUID format, as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122), is\nrecommended to avoid collisions but is not required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/contactlessPayments/:contactlessPaymentId/captured",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "contactlessPayments",
                ":contactlessPaymentId",
                "captured"
              ],
              "variable": [
                {
                  "key": "contactlessPaymentId",
                  "value": "{{contactlessPaymentId}}"
                }
              ]
            },
            "description": "Capture a processed contactless payment on the appointment."
          }
        },
        {
          "id": "996d46a5-41a5-bc93-48b9-a4e7e1b85a3f",
          "name": "List terminals",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/terminals",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "terminals"
              ]
            },
            "description": "List card terminals registered to the authenticated barber."
          }
        },
        {
          "id": "c0a5a968-86dd-8102-66b9-d61e66dd5e83",
          "name": "Register a terminal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/terminals",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "terminals"
              ]
            },
            "description": "Register this device as a card terminal for in-person checkout."
          }
        },
        {
          "id": "4e38aee8-53bc-3c08-a31c-7eee5a7f73fb",
          "name": "Delete a terminal",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/terminals/:terminalId",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "terminals",
                ":terminalId"
              ],
              "variable": [
                {
                  "key": "terminalId",
                  "value": "{{terminalId}}"
                }
              ]
            },
            "description": "Unregister a device from the barber's known terminals."
          }
        },
        {
          "id": "58ffa10f-a2a4-76aa-12cc-18e50772bdda",
          "name": "Get a terminal",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/terminals/:terminalId",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "terminals",
                ":terminalId"
              ],
              "variable": [
                {
                  "key": "terminalId",
                  "value": "{{terminalId}}"
                }
              ]
            },
            "description": "Return one registered terminal."
          }
        },
        {
          "id": "811a90c0-eb41-40bc-8f3c-ebb355bb8b85",
          "name": "Create a terminal connection token",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/terminals/:terminalId/connectionTokens",
              "protocol": "https",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "terminals",
                ":terminalId",
                "connectionTokens"
              ],
              "variable": [
                {
                  "key": "terminalId",
                  "value": "{{terminalId}}"
                }
              ]
            },
            "description": "Create a short-lived token so a registered terminal can open a payment\nsession."
          }
        }
      ]
    }
  ]
}