POST /v1/tokens HTTPS/1.1 Host: api.stripe.com Authentication: Basic #{secret_key} Stripe-Account: #{shopify_payments_account_id} card: { number: '4242424242424242', exp_month: 12, exp_year: 2019, cvc: 123 }
Hey @Kevin107 ,
Shopify will return a null value for the "shopify_payments_account_id" field for 1 of two reasons:
1) Your Shopify shop has not been approved yet for payment processing
2) Your Shopify shop's payments account does not have a connection with the API Client ID
For the 1st reason, you can follow the instructions here to request payment processing via your App Setup screen in your Partner's Dashboard. Once you have done that, our Partner Specialists will review your application to ensure you meet all the criteria before enabling you to process payments with Stripe
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
@hassain FYI We are using Admin Rest Api
1) Your Shopify shop has not been approved yet for payment processing
We created an app in partner account in which payment processing is approved. Is there also an option in shopify shop to approve the payment processing?
2) Your Shopify shop's payments account does not have a connection with the API Client ID
Is there any api to check the connection? Please let me know what will be the procedure
Hey @Kevin107
A quick correction from what I mentioned in my comment yesterday. For 1 - a more accurate representation of this condition is that "Your Shopify shop has not yet been enabled with Shopify Payments". From the Shopify documentation, in order to integrate with Stripe to process payments your shop needs to have Shopify Payments activated as their payment gateway. However from what I can see on my end your test store of "top-fan-test.myshopify.com" does not have Shopify Payments enabled yet.
"Is there also an option in shopify shop to approve the payment processing?"
Yes, to enable Shopify Payments for your shop go to your store's Admin --> Settings --> Payment Providers --> Activate Shopify Payments.
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
@hassain If shopify payment is activated only then we can use stripe for payments, But want to know
POST /v1/tokens HTTPS/1.1 Host: api.stripe.com Authentication: Basic #{secret_key} Stripe-Account: #{shopify_payments_account_id} card: { number: '4242424242424242', exp_month: 12, exp_year: 2019, cvc: 123 }
which stripe account "secret_key" will be used here forAuthentication as we disable stripe for payment.
After enabling shopify payments still we are not getting "shopify_payments_account_id" in response.
card: { number: '4242424242424242', exp_month: 12, exp_year: 2019, cvc: 123 }
@hassain
In this i am able to do first 2 steps and now stuck in last step
POST /admin/checkouts/#{token}/payments.json HTTPS/1.1 Host: shop-name.myshopify.com X-Shopify-Access-Token: #{shopify_access_token} X-Shopify-Checkout-Version: 2016-08-28 { "payment": { "amount": "33.00", "unique_token": "12345", "payment_token": { "payment_data": "tok_1AgzvXGp4JCfxblBH7gs5kLB", "type": "stripe_vault_token" }, "request_details": { "ip_address": "123.1.1.1", "accept_language": "en" "user_agent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/54.0.2840.98 Safari\/537.36" }, } }
getting below error
{ "errors": { "checkout": { "shipping_line": [ { "code": "blank", "message": "can't be blank", "options": {} }, { "code": "blank", "message": "can't be blank", "options": { "code": null } } ] } } }
Below is the "X-Request-ID" → "255318d4-459b-47d6-a6df-713cb524e2d0". Please verify logs and let me know the reason as i am sending shipping line in checkout too.
Hey @Kevin107,
Thanks for the request ID. I can see you're sending shipping_line parameters when you attempt to create a payment. I believe shipping_line needs to be added to the checkout, not the payment. Can you confirm the checkout has shipping lines?
@SBD_ when i try to create checkout with
requires_shipping: false
still it is requiring the shipping_line don't know why? as according to shopify documentation
requires_shipping READ-ONLY | "requires_shipping": true Whether the checkout requires shipping. If true, then shipping_line must be set before creating a payment. |
@SBD_`requires_shipping` is a READONLY field, as you can see.
Shopify will make this field `true`, if you have any variants in your checkout that requires shipping. So you are adding products/variants in your checkout line_items that require shipping.
This is not a field that you can control on Checkout level. But you can change it in `/admins/products`.
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |