I am creating some API for stripe payment. I try to create API to getting card token for payment. below is my code
Postman Data
Request Method: POST,
Request URL: https://api.stripe.com/v1/tokens
Headers Data
Content-Type:application/x-www-form-urlencoded
Authorization:Bearer SECRET_KEY
Body x-www-form-urlencoded
card:{"exp_month":12,"exp_year":2020,"number":'4242424242424242',"cvc":'123'}
Response (Output)
{
"error": {
"message": "You must pass full card details to create a token.",
"type": "invalid_request_error"
}
}
Postman screenshots:
Headers
Body
{"card":{"exp_month":12,"exp_year":2020,"number":"4242424242424242","cvc":"123"}}
- tshimkustok_visa
and friends from Stripe's testing page - karllekko