Hi,
I would like to create connected system in order to connect Stripe payment gateway.Please find attached image for my queries
Discussion posts and replies are publicly visible
Hi husaina0001,
In stripe documentation it mentions to use HTTP Basic Authentication as authentication method to your API calls even tho they provide you with API Key. I tried with basic auth and it worked
Authentication : Basic
UserName : "API KEY"
Password : #
(In Place of password use # symbol)
This is snippet from documentation
curl api.stripe.com/.../charges \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: # The colon prevents curl from asking for a password
Thanks!
This is probably done now. Now I am trying to implement below snippet for getting card token. This I am trying by pasting it into request body. But I am receiving 500 error.
curl api.stripe.com/.../tokens \ -u sk_test_xxxxxxxxxxxxxxxx: \ -d card[number]=4242424242424242 \ -d card[exp_month]=12 \ -d card[exp_year]=2020 \ -d card[cvc]=123
Json:
I tried below all
a!toJson(
{"url":""raw_url":"https://api.stripe.com/v1/tokens","method":"post","data":{"card[number]":"4242424242424242","card[exp_month]":"12","card[exp_year]":"2020","card[cvc]":"123"},"auth":{"user":"sk_test_xxxxxxxxxxxxxxxx","password":""}}">api.stripe.com/.../tokens","method":"post","data":{"card[number]":"4242424242424242","card[exp_month]":"12","card[exp_year]":"2020","card[cvc]":"123"},"auth":{"user":"sk_test_xxxxxxxxxxxxxxxx","password":""}}
)
{
"card[number]":"4242424242424242",
"card[exp_month]":"12",
"card[exp_year]":"2020",
"card[cvc]":"123"}
"card": {
"number": "4242424242424242",
"exp_month": "12",
"exp_year": "2020",
"cvc": "123"
}
This all tries gives me an error.
Can you please guide me on this. Thanks!
Your POST Call should be in application/x-www-form-urlencoded content type to access it. look at the attached image for reference
Thank you!
This works