#littleape - test card expiry
1 messages ยท Page 1 of 1 (latest)
HI ๐
We have various test card numbers, IDs, and tokens available here:
https://stripe.com/docs/testing
What specifically are you trying to test?
I want to update expiry date of a payment method card, docs have it here https://stripe.com/docs/api/cards/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
API call /v1/customers/cus_MG0StWAXDQmQCq/sources/card_1LXUR6AaNUE5IeQR6QfFnXrr Where do I get the "card_1LXUR6AaNUE5IeQR6QfFnXrr" from?
That is a specific card ID, you would first need to create a card object.
Would that be somewhere inside an existing PaymentMethod ?
- Card objects
card_XXXXXhave been replaced by Payment Method objectspm_XXXXX. You can still have Payment Method objects oftype: cardand they behave the same. So you can use Payment Methods.
- What is the overall goal of your testing? I think we are missing something here and I need more context.
We use SetupIntent for offline processing of monthly payments. We want to allow clients to update the card expiry
Okay. So do you have an example payment method in your test data?
Yes, if I understand thsi correctly I can replace the card_xxx with the pm_xxx in this call and it will update the expiry date of the card behind the pm_xxx ? /v1/customers/cus_MG0StWAXDQmQCq/sources/pm_xxx
You would want to use the Payment Method API with the pm_XXXX ID to update the PM
https://stripe.com/docs/api/payment_methods/update#update_payment_method-card
the Payment Method API will allow update of card expiry that makes up that PM?
That's the parameters I linked to
Ah yes I see it thank you. Damn stripe has the best customer support I've come across ๐