A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We tried to call Payment API (Stores a credit card in the card vault) like the following.
curl -d '{"credit_card":{"number":"4242424242424242","first_name":"John","last_name":"Smith","month":"11","year":"21","verification_value":"123"}}' \
-X POST "https://elb.deposit.shopifycs.com/sessions" \
-H "X-Shopify-Access-Token: shpat_xxx"
HTTP 500 Internal Server Error
ID: 65e5bf49ca81dd3b-618210a4
What should we do next step?
Solved! Go to the solution
This is an accepted solution.
@Maacck Thank you for replying.
I received an email from the Shopify CS team.
After some digging, I found the examples from the doc is a missing the Content-Type header,-H "Content-Type: application/json", and when added to the request everything worked as expected. It's also worth noting that aContent-Typeheader is required for any POST or PUT call that contains a request body with JSON.
Then, I tried that. I could get a session id.
I think you have to request for payment processing permission first.
This is an accepted solution.
@Maacck Thank you for replying.
I received an email from the Shopify CS team.
After some digging, I found the examples from the doc is a missing the Content-Type header,-H "Content-Type: application/json", and when added to the request everything worked as expected. It's also worth noting that aContent-Typeheader is required for any POST or PUT call that contains a request body with JSON.
Then, I tried that. I could get a session id.