#varinder8747

1 messages · Page 1 of 1 (latest)

wet fableBOT
frozen jewel
honest quest
#

okay, I have one more question.

#

I have a recurring payment products on my website.
I am charging from users through JS checkout.
I would like to give an option to users that they can change their card details. is it possible?

frozen jewel
#

change card details to do what specifically?

#

you mean to update the card used to pay for subscriptions?

#

what does JS checkout mean? are you referring to Checkout Sessions? or do you mean the Payment Element?

honest quest
#

JS checkout means I am using default stripe checkout page for capturing the payments from user.
change card detail means, user has active subscription and for the next billing cycle user want to change the card details (may be his old card expired or something what he would not like intruppt the subscription plan)
you mean to update the card used to pay for subscriptions? (Yes)

frozen jewel
#

alternatively you can also implement the code to collect the customer's new payment details using Checkout Sessions and set that as the default payment method on the Subscription / Customer

honest quest
#

How I can redirect to user on this page with user details like (his active subscription plan, customer id, subscription id etc).

honest quest
frozen jewel
#

How I can redirect to user on this page with user details like (his active subscription plan, customer id, subscription id etc).

I think this guide is what you want : https://stripe.com/docs/customer-management/integrate-customer-portal

but my account does not allow me to access the raw data through apis.

I don't understand what you mean by account does not allow me to access the raw data through apis. - why aren't you able to access the raw data through APIs?

Learn how to integrate the customer portal using the Stripe API.

honest quest
#

I have a user on my website and he bought the subscription plan through the website.
His plan interval is one month.
it means his plan will be auto renewel because stripe saved the card A detils.

Now user want to change the card details A to card B, for the current active subscription so that when his next payment will be charge automatically then the payment will be deducted from card B (for the same subscription plan).

is there any sdk function for this?

#

Let me know if you don't understand my point

frozen jewel
#

there's no single SDK function for this flow. You need to perform a series of steps. You can either make use of the customer portal or use the Checkout Session to collect the new card details and make another API call to set the default payment method.

Which do you intend to use?

honest quest
#

I think the issue will be resolved when I will have "Enabling access to raw card data APIs" this access

frozen jewel
#

how will that resolve your issue?

#

you still have to collect the card details and set the default payment method on either the customer or the subscription. Being able to pass in raw card details doesn't solve either of those two matters.

Also, if you collect raw credit card numbers in your custom form and then use the Stripe API directly to tokenize the cards, you become subject to the full PCI compliance standards. In your case this means you’d have to submit a SAQ D form annually to prove that you are PCI compliant [0]. It’s a 40 page form.

[0] see https://stripe.com/docs/security/guide#validating-pci-compliance under "API Direct" as this is what your integration would be classified as.

Ensure PCI compliance and secure customer-server communications.

honest quest
#

beacuse if I will have card id in my DB then I can update the card detail with APi

frozen jewel
#

you cannot update a card with a new number

#

you can only create a new PaymentMethod and then update the default payment method with the new PaymentMethod id

honest quest
#

okay got your point
so to add new payment method and make it default for partucular subscription plan which SDK function I can use?

frozen jewel
#

if you let me know which specific method you intend to use i.e. Customer Portal or Checkout Sessions, i can advise you further

honest quest
#

can you please explain for both one by one?

wet fableBOT
frozen jewel
#

if you use the Customer Portal, you're essentially generating a link to a Stripe hosted portal/session where the user can update their own details for the Subscription. You don't have to do anything else other than configuring what the user can do in the portal i.e. allowing them to update their payment method

If you use Checkout Sessions, then you need to create a Checkout Session with setup mode. After the user completes the Checkout Session, you need to set the newly created PaymentMethod as the default payment method on the Subscription the customer wants to update their payment method for

honest quest
#

okay, I would like to use Customer Portal
Now my only question have that
how I can generate that link so that users will click on that link and it will goes to stripe hosted portal

frozen jewel