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

Solved
pb6
New Member
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)

Accepted Solutions
pb6
New Member
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
New Member
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