Skip to main content
POST
/
contactlessPayments
/
{contactlessPaymentId}
/
captured
Capture a contactless payment
curl --request POST \
  --url https://api.guile.app/contactlessPayments/{contactlessPaymentId}/captured \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "externalPaymentReference": {
    "id": "<string>",
    "paymentProcessor": "stripe"
  }
}
'
{
  "id": "<string>",
  "appointment": {
    "id": "<string>",
    "occursOn": "2023-11-07T05:31:56Z",
    "barber": {
      "id": "<string>",
      "givenName": "<string>",
      "surname": "<string>",
      "preferredName": "<string>",
      "biography": "<string>",
      "spokenLanguages": [
        "<string>"
      ],
      "experience": 50
    },
    "location": {
      "id": "<string>",
      "name": "<string>",
      "shopName": "<string>"
    }
  },
  "amount": "456.78",
  "clientSecret": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "externalPaymentReference": {
    "id": "<string>",
    "paymentProcessor": "stripe"
  },
  "card": {
    "maskedPersonalAccountNumber": "<string>",
    "expirationMonth": "<string>",
    "expirationYear": "<string>"
  },
  "authorizedAt": "2023-11-07T05:31:56Z",
  "capturedAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Headers

Idempotency-Key
string
required

A client-generated idempotency key to ensure operations are only processed once even if a client retries the operation. The V4 UUID format, as defined in RFC 4122, is recommended to avoid collisions but is not required.

Path Parameters

contactlessPaymentId
string
required

The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.

Body

application/json

Request body for capturing a contactless payment.

externalPaymentReference
object
required

The payment processor's reference returned after the in-person payment SDK processes the payment.

Response

Ok. The operation succeeded.

A pending or collected in-person payment for an appointment.

id
string
required

The unique identifier for this contactless payment.

appointment
object
required

The appointment this payment collects.

amount
string<decimal>
required

The amount to collect.

Pattern: ^-?(0|[1-9][0-9]*)\.[0-9][0-9]$
Example:

"456.78"

state
enum<string>
required

The payment state.

Available options:
created,
processing,
authorized,
captured,
failed,
canceled
clientSecret
string
required

The client secret associated with the payment processor integration.

createdAt
string<date-time>
required

The date-time when this resource was created, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

updatedAt
string<date-time>
required

The date-time when this resource was updated, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

externalPaymentReference
object

The payment processor's reference for this payment.

card
object

The card-present payment method summary.

authorizedAt
string<date-time>

The date-time when the payment was authorized.

capturedAt
string<date-time>

The date-time when the payment was captured.

expiresAt
string<date-time>

The expiration date-time for this payment session.