#rajput.abd_22
1 messages · Page 1 of 1 (latest)
but this will created subscription with status of incomplete
If you've already collected and saved the payment details of the customer, then you'd pass that pm_xxx ID on Subscription creation via the default_payment_method parameter
is there any reference for it
const { customerId, description, items, add_invoice_items } = data;
return await stripe.subscriptions.create({
customer: customerId,
description: description,
items: items,
add_invoice_items: add_invoice_items,
payment_settings: {
payment_method_options: {
card: {
request_three_d_secure: 'any',
},
},
payment_method_types: ['card'],
save_default_payment_method: 'on_subscription',
},
expand: ['latest_invoice.payment_intent'],
});
i have already did this
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Everything is in the API reference, yes
Please don't close this thread
@sweet ivy I have created the subscription
but this is how invoices goes in pending i don't want this
Great! What's the ID of that payment? pi_xxx
Checking
note i am implementing this functioanlities in my client's project please be carefull
this is my logic behind creating subscriptions
const { customerId, description, items } = data;
const add_invoice_items = data.add_invoice_items ? { add_invoice_items: data.add_invoice_items } : {};
let subscriptions = {
customer: customerId,
description: description,
items: items,
...add_invoice_items,
payment_settings: {
payment_method_options: {
card: {
request_three_d_secure: 'any',
},
},
payment_method_types: ['card'],
save_default_payment_method: 'on_subscription',
},
expand: ['latest_invoice.payment_intent'],
}
Ah, you're an Indian merchant so RBI regulations apply. The PI requires authentication as the pm_xxx you used has no existing mandate because of how you created it: https://stripe.com/docs/india-recurring-payments?integration=subscriptions#subscription-creation
You should be creating PMs via a Setup Intent so we correctly handle the mandate creation. See: https://stripe.com/docs/payments/save-and-reuse
Yes, with a US Stripe account
But you're using an IN account so RBI regulations apply
how can i create us stripe account
Top left in the Dashboard, there's a menu that pops out
Click New account
got it i have created it
Please don't close it
you are very helpful
@sweet ivy Still it is showing incompleted
You need to share IDs, the screenshots are no help
what id do you want
sub_1NqCMbCz4DYWbcETkAsMcXox @sweet ivy this is my subscriptions id
Thanks
You didn't pass a default_payment_method on creation: https://dashboard.stripe.com/test/logs/req_2v7Wm6WAhPhLLt
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So we're awaiting the card to charge, hence incomplete
so i need to fetch first default_payment method after that i need to add in default_payment_method am i write @sweet ivy
You need to create a PM via a Setup Intent as I shared above so that it is correctly authenticated and saved: https://stripe.com/docs/payments/save-and-reuse
Then the result of that will contain a pm_xx you can pass to default_payment_method
Hi @mystic pine
👋 how may I help?
i have created default_payment_method while creating customer can i use it here
for making subscription payment
sub_1NqCsmCz4DYWbcETQZSdxA5H
this is my subscription_id @mystic pine
please refrain from using words like bro
okay
I'm taking a look at your subscription
you're passing pm_1NqCJpCz4DYWbcETrMAnKQWQ as the default_payment_method on the subscription but that's not really necessary since it's the customer's invoice_settings.default_payment_method
so it will be used by default
without the need to specify it again
so what do i need to use for making my subscription pay succedd @mystic pine
wait, I'm not saying that the susbcription wasn't paid
I'm just trying to give you some pointers on how to improve your integration
yes sure, let me know if you need any more help
i need help how will my payment will got accepted
at the time of creating subscriptions
ok so basically the Payment failed because you needed 3DS
since you're in India you need to follow this guide https://stripe.com/docs/india-recurring-payments for recurring payments
do you have any specific radar rules set up on your account?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
but apparently you don't
means
can you please give a solution as i tried it many times
but didn't findout any solution
I'm taking a look
Hey! Taking over for my colleague. Let me catch up.
okay go ahead Please
You are creating a Subscription with USD from an Indian IP customer.
You need to set RBI mandate:
https://stripe.com/docs/india-recurring-payments
The application is for US and the development team is in India
all the payments will be done for US clients also for US admin. We have no connection with the payments other than the code part
tl;dr
-Our Client will enroll and add their card details
-It will be saved for future payments
- Client wants to upgrade plan
- Use the saved card
- (Optional) no need for confirmation from client
And what is the issue here exactly ? You want to not have 3DS ?
The issue is I am unable to make the recursion payment using the saved card details. It is going to "pending"
ok the issue you are testing from an Indian IPs, so you need to set RBI.
But we are coding for US and Us clients
When building a Subscription, you need to handle the case for recurring payments that may requires 3DS
Us (developers) are in INDIA
Try using a VPN in that case
If you want to collect payment upfront creating the Payment Method, you can use SetupIntents
then use that PaymentMethod with the Subscription
But keep in mind that for the recurring payments of a Subscription, the issuer's bank may require 3DS auth, which your integration need to handle
Check this section:
https://stripe.com/docs/billing/subscriptions/webhooks#additional-action
see
first time payment is accept is paid
then lastone i tried using vpn
@cosmic notch are you there
no but I am, sorry
how to handle this
https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-3 I think helps address this.
as of your collegue sugget me to use vpn for us to getting payment sucess i have change but still invoices is in pending
what is the Invoice ID in_xxx of the pending invoice?
be patient.
That Invoice needs 3D Secure so it's pending yes. If you follow the guide(https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements) part of that is confirming the invoice.payment_intent in your frontend integration, and that will handle 3D Secure.
so i need to implement this on frontEnd right
on very first time
but scenario is differ we are creating price differ on the bases of clients are enroll we can't give user to select that
you need a frontend yes, since the customer needs somewhere to enter their card details and authenticate any payments.
what are the required fields for this
not sure what you mean by 'required fields'. I suggest following the guide and trying to implement it.
okay i will ask you if stuck please don't close this
so after doing this am i available to create new subscription without card details requirements.??
sorry but we will close it, the thread is open for 3 hours already and we can't commit to supporting you all day across multiple members and regions
not sure what that means, what are "card details requirements"
3d auth
as payment card details is already saved
ok. And what do you mean by a "new subscription"?
i am creating new subscrition while changing plan
like whenever client clicked on upgrade plan button than i need to create new subscription
so for this do i need to again do this stuff
if yes then this is not my requirements
do you mean creating a new Subscription object sub_xxx, or something else like just updating an existing sub_xxx?
creating a new subscrition sub_xxx
then that is a new payment, and it's "on-session" (customer is present on the website), so in general those require 3D Secure. It's only recurring payments(on an existing subscription) that get exemptions from needing 3D Secure.