Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Credit card vaulting return `<h1>400 Bad Request</h1>`

Solved

Credit card vaulting return `<h1>400 Bad Request</h1>`

pb6
Visitor
2 1 1

I followed the guideline here `https://shopify.dev/api/admin-rest/2021-10/resources/payment#[post]https://elb.deposit.shopifycs.com... enabled my store's test payment mode

POST "https://elb.deposit.shopifycs.com"

Header:

Body:

 

{
  "credit_card": {
    "number": "4242424242424242",
    "first_name": "Bogus",
    "last_name": "Gateway",
    "month": "02",
    "year": "26",
    "verification_value": "191"
  }
}

 

 
 
It keeps returning:

 

<html>

<head>
	<title>400 Bad Request</title>
</head>

<body>
	<center>
		<h1>400 Bad Request</h1>
	</center>
	<hr>
	<center>nginx</center>
</body>

</html>

 

What do I do wrong here? Thanks!
Accepted Solution (1)

pb6
Visitor
2 1 1

This is an accepted solution.

Figured it out by using the following

curl -d '{"credit_card":{"number":"1","first_name":"John","last_name":"Smith","month": "5","year": "25","verification_value":"123"}}' -X POST "https://elb.deposit.shopifycs.com/sessions" -H "Content-Type: application/json"

 

View solution in original post

Reply 1 (1)

pb6
Visitor
2 1 1

This is an accepted solution.

Figured it out by using the following

curl -d '{"credit_card":{"number":"1","first_name":"John","last_name":"Smith","month": "5","year": "25","verification_value":"123"}}' -X POST "https://elb.deposit.shopifycs.com/sessions" -H "Content-Type: application/json"