Hi @phill.dev,
Following on from point 4 on the other page
When I launch the checkout page I also want to record the transaction in my database so I have an action (screenshot below) which does this. This action also records the Payment Link ID provided by the plugin - referenced as Payment ID in the Bubble workflow UI - so that I have a reference for any webhook events sent from Square later. In this example: LTMGWIPZ7LHS7NM4
Payment Link ID and Payment ID are different things and when the payment is completed in the external page, Square triggers two webhook events for “Order Update” and “Payment Update”. I want to use these to update the status of my transaction in my database.
However, Payment Link ID isn’t provided by either of these events so there’s no way to match the webhook event to the transaction in the database.
For POST /v2/online-checkout/payment-links the response does contain Order ID (see below). So my question was, could your plugin expose the Order ID in the Bubble Workflow ID in addition to what it already provides? If not or in the interim, I note that the “full response” is also available. How would I parse / extract the Order ID from this response myself?
Thanks in advance
Checkout Response
{
"payment_link": {
"id": "LTMGWIPZ7LHS7NM4",
"version": 1,
"order_id": "bQJdDFZkowZjSOlERHqs3tcmrjYZY",
"checkout_options": {
"redirect_url": "https://tipperapp.bubbleapps.io/version-test/success/test7",
"merchant_support_email": "support@tipz.com"
},
"url": "https://sandbox.square.link/u/C4yIPnKS",
"created_at": "2022-07-22T15:32:26Z",
"payment_note": "Payment Note"
}
}
order.updated payload
{
"merchant_id": "MLWDQSVZ7NHVM",
"type": "order.updated",
"event_id": "d1f2fffd-a698-42bd-8822-6d30a9ca7512",
"data": {
"id": "PcAYviBk4ZF03liIOx0Du5x8oUFZY",
"object": {
"order_updated": {
"created_at": "2022-07-23T12:14:43.472Z",
"location_id": "LE7DZEDK4XTMQ",
"order_id": "PcAYviBk4ZF03liIOx0Du5x8oUFZY",
"state": "COMPLETED",
"updated_at": "2022-07-23T12:14:46.000Z",
"version": 4
}
}
}
}