#bilel-khadhraoui
1 messages · Page 1 of 1 (latest)
Hello! Can you clarify what you're trying to do? Are you just trying to change the PaymentMethod being used to charge for a subscription?
@vagrant talon Please respond here and not in the main channel!
thanks for your replying me , i create subscription using stripe checkout , now i want the user can update his card number after subscription
Gotcha - so to do this you either need to build a integration with PaymentElement so they can enter in those card details and create a new PM/update the subscription
Or you can use the Customer Portal (which is a stripe-hosted site) that you direct your customers to and they can update their payment details tehre
or i can build my own form ?
Yeah you'd build your own UI using Payment Element (https://stripe.com/docs/payments/accept-a-payment-deferred?type=setup)
(deleted that message since it had your test secret key and this is a public channel)
and to clarify - you wouldn't update your subscription like that if you just want to change the payment method
You'd just update default_payment_method on the Subscription so that it'll use the new PAymentMethod moving forward
OR if you're setting the default on the Customer you'd set invoice_settings.default_payment_method on the Customer
i want to change card which api i can use ?
and where i can send the payload in the api ?
I'm not sure what you mean by that second question of "where I can send the payload in the API" but for the first one you'd use the subscriptions API and set default_payment_methodhttps://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
after creation the ui in frontend and then will send to the backend to updated card number using "stripe.subscriptions.update"
i didn't find Parameters where i can update card value
can you help me please ?
Did you read all the links I sent over? Can you be really specific about what you're having trouble with?