Apply a Payment

POST /o/op/1/pay

Add a payment to an existing receipt.

application/json

Body Required

  • iKaccountId integer(int64) Deprecated
  • The ID of the account to apply this payment to.

  • A unique external reference provided for this order. This value will be sent back in the webhook.

    Minimum length is 1, maximum length is 50.

  • endpointId string Required

    Endpoint ID for a unique webhook that has been created using the webhook endpoint.

  • businessLocationId integer(int64) Required

    The unique identifier of the business location.

  • taskTtlInMs integer(int32)

    Maximum time to attempt delivery of this payment to the POS. In milliseconds. The minimum value is 60000ms (1 minute).

  • staffId integer(int64)

    The ID of the employee responsible for this payment.

  • deviceId integer(int64)

    POS device to specifically receive this payment. If left null then all POS devices may receive the payment but only one will process it.

  • Payment method code as configured by the merchant.

  • paymentAmount number Required

    The total amount of the payment without tips.

  • The tip amount, if any.

Responses

  • 200 application/json

    accepted

    Hide response attribute Show response attribute object
  • 400 */*

    Bad Request

    Hide response attributes Show response attributes object
    • timestamp string(date-time)

      The date and time at which the error occurred, in UTC.

    • status integer

      The HTTP status code indicating the type of error.

    • error string

      A short description of the HTTP status code meaning.

    • message string

      A detailed message describing the error, including any specific details about the request that led to the error.

    • path string

      The request path where the error occurred.

POST /o/op/1/pay
curl \
 -X POST https://api.trial.lsk.lightspeed.app/o/op/1/pay \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"iKaccountId":0,"iKaccountIdentifier":"A1234.56","thirdPartyPaymentReference":"12345678901234","endpointId":"MY-AWESOME-ENDPOINT-ID","businessLocationId":45454565682155,"taskTtlInMs":60000,"staffId":42,"deviceId":12345678980,"paymentMethod":"OOPAYMENT","paymentAmount":20.06,"tipAmount":2.5}'
Request example
{
  "iKaccountId": 0,
  "iKaccountIdentifier": "A1234.56",
  "thirdPartyPaymentReference": "12345678901234",
  "endpointId": "MY-AWESOME-ENDPOINT-ID",
  "businessLocationId": 45454565682155,
  "taskTtlInMs": 60000,
  "staffId": 42,
  "deviceId": 12345678980,
  "paymentMethod": "OOPAYMENT",
  "paymentAmount": 20.06,
  "tipAmount": 2.5
}
Response examples (200)
{
  "status": "ok"
}
Response examples (400)
{
  "timestamp": "2023-11-07T23:00:20.075+0000",
  "status": 400,
  "error": "Bad Request",
  "message": "reference has already been used 12345678901234",
  "path": "/o/op/1/pay"
}