Payment Statuses
AnsweredHi Toast team,
My name is Lital from Bringg and I'm writing to you regarding our integration.
Bringg polls new orders from Toast and stores the payment GUID when Bringg needs to update the post-delivery tip via the “Getting Detailed Information about One Order” API.
We are currently taking the GUID related to the first "credit", and we don't know if that credit card is declined or not. And when we update the tip with the GUID of the declined credit card, the tip payment failed.
Here are my questions:
1. When polling a specific order, can you (Toast) return only successful payments?
2. If not, which one to take? Currently, when we updating Toast with a post-delivery tip, we are taking the first "CREDIT" and it is a problem (if it declined). So what field in the payload can indicate the GUID that is related to the successful payment?
Here is an example payload with 2 payments (but I'm not sure if that's a good example, because I'm not sure both of them are credit-cared). As I mentioned before, the problem occurs when we have 2 credit card payments when the 1st is declined and the second is successful:
Thank you!!!
-
Hi Lital!
When polling an order, Toast will return all payments; successful and unsuccessful. However, you can filter the responses on your end using the paymentStatus value via the /orders endpoint of the orders API. Payment information is also available in the /payments endpoint of the Orders API.
This diagram breaks down the check entity, menu item selections, guest information, payment information, and delivery information in an order.
From the example you provided, you would want to filter based on the paymentStatus value in the Payment object:
"checks":[
{
"guid":"07d2190c-b538-47a8-a777-430cb0abc103",
"entityType":"Check",
"externalId":null,
"displayNumber":"8",
"payments":[
{
"guid":"aee073ac-bcef-46b9-b792-80c563eaea64",
"entityType":"OrderPayment",
"externalId":null,
"originalProcessingFee":null,
"server":{
"guid":"9a5fae4f-9c4d-47a4-8765-156d1c4421d0",
"entityType":"RestaurantUser",
"externalId":null
},
"cashDrawer":null,
"lastModifiedDevice":{
"id":"de8167f0d0fe4236"
},
"refundStatus":"NONE",
"type":"CREDIT",
"voidInfo":null,
"checkGuid":"07d2190c-b538-47a8-a777-430cb0abc11",
"otherPayment":null,
"paidDate":"2021-08-01T18:28:27.228+0000",
"orderGuid":"3562ea8f-131a-4e69-a34e-9c3895664049",
"cardEntryMode":"KEYED",
"paymentStatus":"DENIED",
"amount":41.91,
"tipAmount":0,
"amountTendered":0,
"cardType":"MASTERCARD",
"houseAccount":null,
"mcaRepaymentAmount":null,
"createdDevice":{
"id":"de8167f0d0fe4237"
},
"paidBusinessDate":20210801,
"last4Digits":"1234",
"refund":null
}
],Please let me know if you have any other questions!
0 -
Hi Ann,
Thank you for your response!
I would like to know with what payment status can we update the tip for an order?
paymentStatus: string , x ∈ { OPEN , PROCESSING , AUTHORIZED_AT_RISK ,
AUTHORIZED , ERROR , ERROR_NETWORK , DENIED , PROCESSING_VOID ,
VOIDED_AT_RISK , CANCELLED , CAPTURE_IN_PROGRESS , CAPTURED , VOIDED }Which statuses can be used to update a tip, and which cannot?For example, can we update the tip with paymentStatus: VOIDED?
Thank you!
Lital
0 -
Hi Lital,
You would want to use the paymentStatus value "AUTHORIZED" for updating the tip. Additional information on updating the tip amount for a payment can be found here.
Thanks!
Ann
0
Please sign in to leave a comment.
Comments
3 comments