#test9
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Ah never mind I found it req_xaZ2jriQdnMI4z, let me check this...
Actually you are sending POST /v1/payment_methods/<string> as a request without any body
Here is the request log in your Stripe dashboard:
https://dashboard.stripe.com/test/logs/req_xaZ2jriQdnMI4z
yeah , i need sample body. , and even before do i need a paymethod so i can update it
You need to fix your request call
Bit of a broad question! Is there a specific use case you're trying to account for?
i forgot my mail /mob , can u able to tell me mine id
i m doing integration for update method
from our salesforce platform
i ll login first with creds
could u pls give me a sample create and update payload, which is working fine
@hardy bone ??
What payload are you looking for, what do you want to achieve exactly, not clear for me yet, to give a sample ?
payment method create and update
{{baseUrl}}/v1/payment_methods
{{baseUrl}}/v1/payment_methods/:payment_method
The APIs you are sharing, are these ones:
https://stripe.com/docs/api/payment_methods/create
https://stripe.com/docs/api/payment_methods/update
In order to use them you need to be PCI compliance because you'll need to collect clear customer card number and store them:
Why you want to do this ? what is the use case? if you need to save PaymentMethod, you should be following this guide instead:
https://stripe.com/docs/payments/save-and-reuse?platform=web
i need to try it on test env, and then make those calls prgrmatically after manual postman call
i alrady went thru the docs
pls give valid payload
sample which is working
@hardy bone ?
Please be mindful and stop using the mention, it's a quiet busy, I'm with you just a moment
As I said, I can't give a sample example, if I still don't understand what you want to achieve, rather than doing API call. What do you want to achieve by doing the API call ? what is your business requirement?
we want to save payment methods and get back the toekn to store in our db
when update paymethod like expiry cvv , we will pass thru all creds whcih we get from client to our platfrom and make a call to ur update method
so its ecommerce feature where saved paymethod will be updated
Are you PCI-DSS compliant ?
yes
OK, you can find a payload example on the documentation page:
https://stripe.com/docs/api/payment_methods/create
Choose curl for example and copy past it
Same for the update API:
https://stripe.com/docs/api/payment_methods/update
cant i get the postman payload
i ve already download ed the collection and there where. im getting the vaoved pinged error
could u pls convert the curl body into a valid postman post json payload
You can import curl into postman, following this:
https://stackoverflow.com/questions/27957943/simulate-a-specific-curl-in-postman
if i convert it to json i m getting below error
{
"error": {
"message": "Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}
👋 taking over for my colleague. Let me catch up.
I suggest you import the official Stripe Postman Collection you can find here https://www.postman.com/stripedev/workspace/stripe-developers/overview
already imported as u can see above msgs
sorry I didn't see that in the thread
you need to use the body as x-www-form-urlencoded and you would pass metada.order_id: xxxx
ccant we used json here ?
no, as mentioned here https://stripe.com/docs/api
The Stripe API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we only accept form-encoded request bodies
you've passed it in the url
infact now the old also working
with json
jut by appending the extra header
how this is supoosed to work ?
what extra header?
how can application type can be both at a time ? xml form and the json also
however this is working fine without strike overwrite, if same geader iappend on a request impported out side it shows crossed line
you changed the Content-Type to application/x-www-form-urlencoded that's why it's working
but i m still passing json
not xml form
and why the strike is not appearing in stripe managed collectin ?
Postman is converting your JSON (which is in raw form) to the Content-Type you're specifying
which is form-encoded
I'm not saying you are, I'm saying Postman is converting your JSON to form-encoded
ok , so when making programatical http call from java using rest client , w e need to pass both types or only xml form
?
if you're using the stripe-java SDK you don't need to worry about all of this
header i mean
you would simply need to use the classes that we provide
i m using open source http client lib
and we will take care of the rest
I would highly recommend not to
let me know if you need any more help
sure