Clarifying the flow of POS api, split payments and webhooks calls

We have implemented the POS integration as per the documentation

We were wondering what the flow of callbacks is like when a payment is split.

Let’s imagine the following situation:

  1. our webapp calls the point of sale for an amount of 100
  2. At the point of sale, it is decided to divide the payment, 50 in cash, 50 by card.

How is the flow in this situation?

  1. When the POS calls the callback_url? When the first payment ends or when the entire operation ends?
  2. What is the callback status if the second payment with the card is rejected?

about the webhook call, payment.created I’m pretty sure they are called as payments are being made

  • one for cash payment
  • one for card payment

or I wondered if there is any way to obtain the information of the order/payment when it is made with cash with the transaction_id of the callback since in the documentation it says that it is not possible. (
If I can get the info in this situation, I could avoid using the payment.created webhook
I really appreciate any help you can provide.

This isn’t currently supported with the Point of Sale API cause each payment would have its own transaction_id. Your app will need to create two different payments to support this use case. :slightly_smiling_face:

Since we currently use the POS to process the payment, we do not create the payments ourselves. The POS does.

I’m still wondering When the POS calls the callback_url? When the first payment ends or when the entire operation ends?

It would be when the first payment ends. :slightly_smiling_face:

the transaction_id returned by the POS is equivalent to a payment_id

if I save the transaction_id returned by the POS can I match it later with the payment.created webhook event?

The transaction_id returned by the POS is actually equivalent to the order_id. You’ll match the transaction_id with the order_id in the payment.created webhook event. :slightly_smiling_face:

Great Bryan. Thank you. Last question related to this sentence:

“The following procedure does not work for cash payments made with Square Point of Sale. The resulting client transaction ID does not correspond to an order ID.”

source: Payments API Integration

that note refers to the client_transaction_id right?
if we’re always working in online mode, we always will have a transaction_id and that transaction_id is always equivalent to an order_id? no matter the source of the payment (cash, cc, etc)

If the transaction was done in offline mode or asynchronously (e.g., for cash or other tender transactions), the server-generated transactionID may not be available immediately. You can use the client_transaction_id value to cross-reference the response with transactions retrieved via the Transactions API. This value corresponds to the client_id field in the Transaction object. :slightly_smiling_face: