#rajput.abd_22

1 messages · Page 1 of 1 (latest)

opal kayakBOT
sweet ivy
finite whale
#

but this will created subscription with status of incomplete

sweet ivy
#

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

finite whale
#

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

sweet ivy
#

Everything is in the API reference, yes

finite whale
#

Please don't close this thread

finite whale
#

@sweet ivy I have created the subscription

#

but this is how invoices goes in pending i don't want this

sweet ivy
#

Great! What's the ID of that payment? pi_xxx

finite whale
#

pi_3NqC1PSBr5WCueGy1T3TJNc0

#

this is payment intent id

sweet ivy
#

Checking

finite whale
#

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'],
}
sweet ivy
finite whale
#

but this project is for usa

#

is there any way of treating this as usa

sweet ivy
sweet ivy
#

But you're using an IN account so RBI regulations apply

finite whale
#

how can i create us stripe account

sweet ivy
#

Top left in the Dashboard, there's a menu that pops out

finite whale
#

are you talking about this

#

there is no way of changing ti

#

it

sweet ivy
#

Click New account

finite whale
#

got it i have created it

#

Please don't close it

#

you are very helpful

#

@sweet ivy Still it is showing incompleted

sweet ivy
#

You need to share IDs, the screenshots are no help

finite whale
#

what id do you want

#

sub_1NqCMbCz4DYWbcETkAsMcXox @sweet ivy this is my subscriptions id

sweet ivy
#

Thanks

#

So we're awaiting the card to charge, hence incomplete

finite whale
#

so i need to fetch first default_payment method after that i need to add in default_payment_method am i write @sweet ivy

sweet ivy
#

Then the result of that will contain a pm_xx you can pass to default_payment_method

opal kayakBOT
finite whale
#

Hi @mystic pine

mystic pine
#

👋 how may I help?

finite whale
#

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

mystic pine
#

please refrain from using words like bro

finite whale
#

okay

mystic pine
#

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

finite whale
#

so what do i need to use for making my subscription pay succedd @mystic pine

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

finite whale
#

okay

#

Please don't close this thread

mystic pine
#

yes sure, let me know if you need any more help

finite whale
#

i need help how will my payment will got accepted

#

at the time of creating subscriptions

mystic pine
#

ok so basically the Payment failed because you needed 3DS

finite whale
#

but my account is for us

#

already change it before

mystic pine
#

do you have any specific radar rules set up on your account?

finite whale
#

how can i find out this

#

my account is a test account

mystic pine
#

but apparently you don't

finite whale
#

means

#

can you please give a solution as i tried it many times

#

but didn't findout any solution

mystic pine
#

I'm taking a look

finite whale
#

okay

#

can i share my code

#

for your understanding, Please let me know if needed

cosmic notch
#

Hey! Taking over for my colleague. Let me catch up.

finite whale
#

okay go ahead Please

cosmic notch
#

You are creating a Subscription with USD from an Indian IP customer.

finite whale
#

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
cosmic notch
#

And what is the issue here exactly ? You want to not have 3DS ?

finite whale
#

The issue is I am unable to make the recursion payment using the saved card details. It is going to "pending"

opal kayakBOT
cosmic notch
#

ok the issue you are testing from an Indian IPs, so you need to set RBI.

finite whale
#

But we are coding for US and Us clients

cosmic notch
#

When building a Subscription, you need to handle the case for recurring payments that may requires 3DS

finite whale
#

Us (developers) are in INDIA

cosmic notch
#

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

finite whale
#

see

#

first time payment is accept is paid

#

then lastone i tried using vpn

#

@cosmic notch are you there

vital marsh
#

no but I am, sorry

finite whale
vital marsh
#

what is the Invoice ID in_xxx of the pending invoice?

finite whale
#

in_1NqDzfCz4DYWbcETZ2m94rAW

#

are you checking

vital marsh
#

be patient.

finite whale
#

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

vital marsh
finite whale
#

so it is mandatory to to save price

#

from frontEnd or i can create it from backend

finite whale
vital marsh
#

not sure what you mean by 'required fields'. I suggest following the guide and trying to implement it.

finite whale
#

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.??

vital marsh
#

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

vital marsh
finite whale
#

as payment card details is already saved

vital marsh
#

ok. And what do you mean by a "new subscription"?

finite whale
#

i am creating new subscrition while changing plan

#

like whenever client clicked on upgrade plan button than i need to create new subscription

finite whale
#

if yes then this is not my requirements

vital marsh
#

do you mean creating a new Subscription object sub_xxx, or something else like just updating an existing sub_xxx?

finite whale
#

creating a new subscrition sub_xxx

vital marsh
#

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.