We are testing manual capture of payments on our payment gateway. After setting the Payment Capture parameter on the Store to “Manually”, we are not seeing the x_transaction_type header arrive on the request to our gateway. Without this parameter we can’t process the transaction as an authorization without capture since we can’t determine by the headers sent that this is the setting used in Shopify. The capture, void and refund URL’s on the gateways were also set, but we still don’t get the transaction request at checkout
Here’s the details for this test we just ran:
x_shop_name: AzulTestStore
x_reference: 12522592370749
x_invoice: %2312522592370749
Our gateway setup:
Payment capture set to Manually capture payments for orders:
Checkout with our gateway and redirection:
we receive the usual headers, but no x_transaction_type indicating we should authorize only instead of capture (raw form data attached):
Request headers:
Source: x_reference=12522592370749&x_account_id=99999991&x_amount=1250.00&x_currency=DOP&x_url_callback=https%3A%2F%2Fazulteststore.myshopify.com%2Fservices%2Fping%2Fnotify_integration%2Fazul_sdp%2F28053471293&x_url_complete=https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%2Foffsite_gateway_callback&x_shop_country=DO&x_shop_name=AzulTestStore&x_test=true&x_customer_first_name=Daniel&x_customer_last_name=Harel&x_customer_phone=%2B16286667000&x_customer_billing_country=US&x_customer_billing_city=NY&x_customer_billing_address1=155+India+St&x_customer_billing_address2=2R&x_customer_billing_state=NY&x_customer_billing_zip=11222&x_customer_shipping_country=US&x_customer_shipping_first_name=Daniel&x_customer_shipping_last_name=Harel&x_customer_shipping_city=NY&x_customer_shipping_address1=155+India+St&x_customer_shipping_address2=2R&x_customer_shipping_state=NY&x_customer_shipping_zip=11222&x_invoice=%2312522592370749&x_description=AzulTestStore+-+%2312522592370749&x_url_cancel=https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%3Fkey%3Da3ae8ccdb99e2948945a4f5026fc3965&x_signature=5a00a02f1b29eb3d8ebd5314c539c65b48f154471a00790a38f28d399880b5b6 Readable: x_reference: 12522592370749 x_account_id: 99999991 x_amount: 1250.00 x_currency: DOP x_url_callback: https%3A%2F%2Fazulteststore.myshopify.com%2Fservices%2Fping%2Fnotify_integration%2Fazul_sdp%2F28053471293 x_url_complete: https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%2Foffsite_gateway_callback x_shop_country: DO x_shop_name: AzulTestStore x_test: true x_customer_first_name: Daniel x_customer_last_name: Harel x_customer_phone: %2B16286667000 x_customer_billing_country: US x_customer_billing_city: NY x_customer_billing_address1: 155+India+St x_customer_billing_address2: 2R x_customer_billing_state: NY x_customer_billing_zip: 11222 x_customer_shipping_country: US x_customer_shipping_first_name: Daniel x_customer_shipping_last_name: Harel x_customer_shipping_city: NY x_customer_shipping_address1: 155+India+St x_customer_shipping_address2: 2R x_customer_shipping_state: NY x_customer_shipping_zip: 11222 x_invoice: %2312522592370749 x_description: AzulTestStore+-+%2312522592370749 x_url_cancel: https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%3Fkey%3Da3ae8ccdb99e2948945a4f5026fc3965 x_signature: 5a00a02f1b29eb3d8ebd5314c539c65b48f154471a00790a38f28d399880b5b6
We are following the guidelines from these links:
https://shopify.dev/tutorials/add-order-management-to-hosted-payment-gateway
Also looking at the fields that apply when order management is being used:
https://shopify.dev/docs/hosted-payment-sdk/reference/request-values
https://shopify.dev/docs/hosted-payment-sdk/reference/response-values
Thanks in advance!!
Hey @jmmc,
See the last section in this doc: https://shopify.dev/docs/hosted-payment-sdk/getting-started#why-am-i-receiving-empty-order-managemen...
Payment requests to your integration have their parameters stored in the URL as query string parameters, butorder managementrequests have their parameters stored within the request body instead. When your gateway processes order management requests, make sure that it reads the request body.
Can you confirm you're reading the request body for order management requests?
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @jmmc . Did you get anywhere with this issue? We are working on the Hosted Payment integration, and have the exact same problem.
@_JB are you able to help here please? As stated in the Hosted Payment documentation, the x_transaction_type field is not included into the checkout request, thus it seems like there are no fields that would allow to separate request with automatic capturing from ones that require manual capturing. Even HTTP header would be fine, but presently both request are absolutely identical, no indication there.
@IgorWC Can you confirm that you're using order management, and reading the request body (not query string params)?
From our docs:
> Payment requests to your integration have their parameters stored in the URL as query string parameters, but order management requests have their parameters stored within the request body instead. When your gateway processes order management requests, make sure that it reads the request body.
If you can confirm that you're reading the request body for order management requests, but the field is still missing, please provide some example checkout URLs and we can investigate further.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey, @IgorWC! I've been struggling with this issue for quite some time, and I can offer you some of my findings. Shopify does not send anything in those requests that would allow you to differentiate between automatic and manual captures, but there's a way to make your hosted payment integration work with this setting. There are two important points to this:
So, what you can try doing is always authorising the payment first and replying with x_transaction_type set to authorization to the initial Shopify request. The Payment capture setting is going to control whether you want Shopify to be sending capture requests for those payments automatically
Hey, @IgorWC! I've been struggling with this issue for quite some time, and I can offer you some of my findings. Shopify does not send anything in those requests that would allow you to differentiate between automatic and manual captures, but there's a way to make your hosted payment integration work with this setting. There are two important points to this:
So, what you can try doing is always authorising the payment first and replying with x_transaction_type set to authorization to the initial Shopify request. The Payment capture setting is going to control whether you want Shopify to be sending capture requests for those payments automatically
User | Count |
---|---|
13 | |
12 | |
10 | |
8 | |
7 |