#asdfghi
1 messages · Page 1 of 1 (latest)
Hi there! I recommend editing your message to remove the test secret key, and rolling your test secret key
While it's still a test key, it shouldn't be shared in public places
Also, let's take a step back. The Charges API is an older API. If you're building a new integration, we recommend using the PaymentIntents API
How can I use the saved card objects with PaymentIntents API?
When creating a PaymentIntent, you'll need to pass along the customer ID and the card ID: https://stripe.com/docs/payments/payment-intents/migration?charges-cards-migration=paying-saved-cards#saved-cards
The card ID should be passed as a value of payment_method: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method
Sorry for the trouble. Could you please share a sample code?
Sample code is here: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method
You can toggle to se it in curl or other languages
This might also be helpful: https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method
In your case, the payment_method value will start with card_... if you're using an existing card object