Skip to content

Commit 456541f

Browse files
authored
fix(payment): PAYMENTS-11168 Update transaction created webhook order_id to be string (#1146)
<!-- Ticket number or summary of work --> # [PAYMENTS-11168] ## What changed? <!-- Provide a bulleted list in the present tense --> * Updating the `order_id` field for the `store/order/transaction/created` scope webhook event to be string. ### Testing Performing a test in integration, we can see that the `order_id` is actually returned as a string. So updating the docs to accurately reflect this. ``` { "producer": "stores/ktvx0elrm2", "hash": "0c54b57ccda4fd93c28454242c862a9e8fd526f2", "created_at": 1762126619, "store_id": "16532817", "scope": "store/order/transaction/created", "data": { "order_id": "100", "transaction_id": "80047454917", "type": "transaction", "transaction_status": "complete", "transaction_type": "purchase", "result": { "code": "paid", "message": "Paid", "type": "success" }, "platform_transaction_id": "5292709", "provider_transaction_id": "80047454917" } } ``` ## Release notes draft <!-- Provide an entry for the release notes using simple, conversational language. Don't be too technical. Explain how the change will benefit the merchant and link to the feature. Examples: * The newly-released [X feature] is now available to use. Now, you’ll be able to [perform Y action]. * We're happy to announce [X feature], which can help you [perform Y action]. * [X feature] helps you to create [Y response] using the [Z query parameter]. Now, you can deliver [ex, localized shopping experiences for your customers]. * Fixed a bug in the [X endpoint]. Now the [Y field] will appear when you click [Z option]. --> * Fixed an error to update the `order_id` field for the `store/order/transaction/created` scope webhook event to be string. This now accurately reflects the type that is returned in the payload. ## Anything else? <!-- Add related PRs, salient notes, additional ticket numbers, etc. --> ping @bc-afeng [PAYMENTS-11168]: https://bigcommercecloud.atlassian.net/browse/PAYMENTS-11168?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 4e14f85 commit 456541f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/integrations/webhooks/events/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ Payload objects with the following scopes take the form that follows:
607607
"store_id": "1025646",
608608
"data": {
609609
"type": "transaction", // will always be transaction
610-
"order_id": 250, // ID of the order associated with the transaction
610+
"order_id": "250", // ID of the order associated with the transaction
611611
"transaction_id": "176342342", // ID of the transaction; created by the payment provider
612612
"transaction_status": "complete",
613613
"transaction_type": "capture",

docs/webhooks/callbacks/store_order_transaction_created.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ properties:
1818
type: object
1919
properties:
2020
order_id:
21-
type: integer
21+
type: string
2222
transaction_id:
2323
type: string
2424
type:

0 commit comments

Comments
 (0)