Add Credit Card using Stripe API, then convert into Shopify Payments

Add Credit Card using Stripe API, then convert into Shopify Payments

kwpx-digital
Shopify Partner
4 0 0

I'm trying to build a subscription app.

I want a way for store admins to create a subscription on behalf of a new customer in my app's admin area.

For example, if the customer calls and provides their credit card over the phone.

 

Would the following flow be compliant and allowed by Shopify:

1) Within the app admin ui, display a form to create a new customer

2) Use the customerCreate mutation to create the new customer

3) The newly created customer won't have any saved payment methods, so we need to add one

4) Use the Stripe API, via an API key to a client owned account, to create a new payment method for the new customer

5) Use the customerPaymentMethodRemoteCreate mutation to convert the stripe payment method to a shopify payment method.

6) Create a subscription for the new customer using the subscriptionContractAtomicCreate mutation with the newly synced payment method ID.

 

There will be alot of background actions, polling for changes & web-hooks going behind the scenes to make this happen.

I'm wondering if this would be allowed by Shopify when it comes time to go through verification. I'm thinking that it won't be.

In the event it isn't allowed, is there any other way I can achieve this?

 

I've looked into the customerPaymentMethodCreditCardCreate mutation, but it requires payment write access and a "Cardserver session ID", which seems to be entirely undocumented on how to get one.

 

Another alternative is to instead send the customer a pre-loaded cart with the required selling plans, etc in the URL parameters. See here: https://community.shopify.com/c/shopify-design/pre-load-cart-with-subscription-plan-products-using-p....

Then requiring the customer to checkout on their own.

 

Many thanks

 

Replies 0 (0)