What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Is it not possible to complete checkout with API in a custom app?

Is it not possible to complete checkout with API in a custom app?

pubron
Excursionist
18 0 4

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

Replies 7 (7)

Cedcommerce
Shopify Partner
718 76 114

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
pubron
Excursionist
18 0 4

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.

Cedcommerce
Shopify Partner
718 76 114

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. 

 

Cedcommerce_0-1657713473041.png

 

image.png

 

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
pubron
Excursionist
18 0 4

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?

 

スクリーンショット 2022-07-15 11.12.03.png

 

Regards,

Pubron

pubron
Excursionist
18 0 4

@Cedcommerce 

Sorry for continuous submission,

 

If it is not a sales channel apps, shopifyPaymentsAccountId is returned nil ?
I try with Custom apps.

Cedcommerce
Shopify Partner
718 76 114

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
pubron
Excursionist
18 0 4

@Cedcommerce 

Thank you for your reply.
I have not received any messages in my personal Inbox, where should I check?

 

スクリーンショット 2022-07-20 21.50.53.png