#teriyaki229
1 messages ยท Page 1 of 1 (latest)
Hello! Not sure I completely understand. You're trying to make a custom payment form for Subscriptions and you don't want to use Elements?
Yes
How do i implement this form with a subscription model
Why don't you want to use Elements?
It's the client's request. Elements don't fit their aesthetic choices. And Apperance API is not flexible enough for this
We strongly recommend you use Stripe Elements. If you don't, you'll be handling raw card data yourself, which means you need to be fully PCI compliant, which is a huge burden.
See here for details: https://docs.stripe.com/security/guide#validating-pci-compliance
Client is aware of this
He is willing to fill in all of this
in my previous thread i did discuss regarding this
just that the technical part is where i am having issue can you help? ๐
What specific help do you need? If you're not using our UI elements you need to pass raw card data to the API.
Yes how do i do that.?
It is for a subscription
There are several different ways to do that. Can you be more specific? What have you tried that hasn't worked?
I haven't found anything on the docs that could work. it'd be helpful if you could share the several different apis for this
right now i am just creating subscription intent
You can create a Payment Method from raw card data by specifying the raw card data using these properties: https://docs.stripe.com/api/payment_methods/create#create_payment_method-card
Can you ask a more specific question?
I'm not sure what you mean, as there are a myriad of possible next steps, and without more details I can't help you.
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: HOME_URL,
payment_method_data: {
billing_details: {
email: email,
name: `${FirstName} ${LastName}`,
},
},
},
});
This is what i was doing before. I am just looking to replace this
Have you tried specifying the card info in payment_method_data?
which api do i find that parameter in?
๐ I'm taking over
Give me a moment to catch up
The code you shared is client-side code for confirming payment.
Rubeus shared a link earlier that shows how you can send raw card information via server-side using the API
#1209576431580086332 message
So you'd basically create your own form and send that information to your server-side code that calls Stripe's API with raw card information
okay but iam confused regarding the process
can you guide me through it please? thanks
i can understand what to do till here
We recommend against sending raw PANs to our APIs. So we don't have any guides/resources we can share.
i can understand what to do till here
That step creates a PaymentMethod. What are you not clear on after this point?
How do i use that payment method to charge the customer for the subscription intent that was created earlier?
Ah, maybe you're looking for this? https://docs.stripe.com/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing
Maybe. I will get back to you in a minute please keep the thread open for the meantime
sure
nice works
thank you rubues thank you hanzo. I dont want to ping you because you two are already so busy
but thank you
๐
wait one last thing
can you refer me the docs for updating customers
nvm got it
thank you
Great ๐