API Support for Payment and Credit Card

We’re trying do the following and seems like I’m lost in the GraphQL documentation spiral.

  1. Create a customer using API
  2. Create a CreditCard vault for them
  3. Create an Order for the customer and process their payment

All of the above using GraphQL Admin API.

Now, I can see that I can create orders and customers using the API - how exactly am I supposed to send raw 16 digit credit cards to Vault API and use the Id to process the payment?

I see this VaultCreditCard - GraphQL Admin but no explanation on how to pass the credit card

Then the web search lead to this https://elb.deposit.shopifycs.com/sessions and that does not work.

I’m sure I’m missing something basic here - how do I create a payment. My process is to collect credit card info from end user, pass that long to Shopify to store it and then make a payment for the total using that card. Is this flow even supported - what am I missing?

Can someone please assist? How’s everyone sending this data to Shopify?

Hi @ltuser

It’s not possible to send credit card numbers via Shopify’s API to process payments. The VaultCreditCard object you referenced is not meant for direct credit card submission via the Admin API. Instead, Shopify handles credit card vaulting through our own checkout. If you use manual capture for the payment, you can use the orderCapture mutation to capture an authorized payment.

If you need to collect and process credit cards directly you must build a payments app extension and follow Shopify’s secure flow for vaulting and charging cards - but this API/extension type is quite restricted and currently invite-only.