Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Is it not possible to complete checkout with API in a custom app?
In using custom app, "shopifyPaymentsAccountId" always returned nil.
docs:
https://shopify.dev/api/examples/checkout#setup-requirements
Hello @pubron,
To get "shopifyPaymentsAccountId", you must enable Shopify payments in your store, then you will get the id, and the NIL value will not be returned.
Please refer to the doc for Shopify payment-supported countries - https://help.shopify.com/en/manual/payments/shopify-payments/supported-countries
NOTE - If Shopify payment is not supported or available in your country, you must get an id through Stripe API.
Please refer to Stripe API doc - https://stripe.com/docs/api
Hope it helps. Let us know if you need any further information.
All the best,
Team CedCommerce
Hello @Cedcommerce
Thank you for your response.
Shopify payments enabled but it returns nil.
Is there any other possible cause?
I am located in payment-supported countries.
I'm trying to use the Stripe API.
When using the Stripe API to obtain a token, the shopifyPaymentsAccountId is required, but the value is nil and the token cannot be obtained correctly.
https://shopify.dev/api/examples/checkout#get-the-stripe-token
https://api.stripe.com/v1/tokens \
-u {secret_key}: \
-d card[number]=4242424242424242 \
-d card[exp_month]=12 \
-d card[exp_year]=2020 \
-d card[cvc]=123 \
-h Stripe-Account: {{shopifyPaymentsAccountID}}
Thank you in advance for your response.
Hello, @pubron,
For getting the "shopifyPaymentsAccountId" you need to use an API.
When your app creates a new checkout for a store with Shopify Payments enabled, Shopify creates a Stripe account for the merchant as part of the Connect Integration, and returns the “shopifyPaymentsAccountId”. You can use the Storefront API to retrieve the “shopifyPaymentsAccountId”. You can then get a credit card token from Stripe to complete the payment.
You can refer to the documentation below: https://shopify.dev/api/storefront/2022-07/objects/paymentsettings
You can also connect with our team, if you need more help with this.
Have a great day ahead.
Regards,
Team CedCommerce
Hello, @Cedcommerce
I tried to get paymentSetting, but still shopifyPaymentsAccountId is returned nil.
query {
shop { name paymentSettings { shopifyPaymentsAccountId } }
}
Here is a screenshot of the shopify Settings.
Is this with ShopifyPayment enabled?
Regards,
Pubron
Sorry for continuous submission,
If it is not a sales channel apps, shopifyPaymentsAccountId is returned nil ?
I try with Custom apps.
Hello @pubron,
We find that the issue lies within your Shopify payment or theme. You can reach out to the Shopify support team to get this fixed.
We have sent you a message in your personal Inbox. Please connect with us so that we can help you in more detail with this issue.
Regards,
Team CedCommerce
Thank you for your reply.
I have not received any messages in my personal Inbox, where should I check?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024