#kamran-subscriptions-3ds

1 messages · Page 1 of 1 (latest)

naive thistle
#

hello, what have you integrated/built so far?

sage belfry
#

on server side i store credit card info of customer and i want to do payment automatically..

#

i have integrate payment..

#

but 3d card required validation on client side.

naive thistle
#

sure but what APIs have you integrated?
PaymentIntents?
Charges?
Subscriptions?
Are you using Stripe Elements to collect card details

sage belfry
#

payment intent

#

Stripe.apiKey = secretKey;
List<Object> paymentMethodTypes = new ArrayList<>();
paymentMethodTypes.add("card");
Map<String, Object> params = new HashMap<>();
params.put("amount", Math.round(amount * 100));
params.put("currency", "eur");
params.put("customer", stripeCustomerId);
params.put("payment_method_types", paymentMethodTypes);
params.put("payment_method", stripePaymentMethodId);
params.put("confirm", true);
params.put("setup_future_usage", "off_session");

    PaymentIntent paymentIntent = PaymentIntent.create(params);
#

i want to use credit card for payment..

naive thistle
#

Concept here user do subscription in our system
why don't you want to use Stripe Subscriptions?

sage belfry
#

okay..

#

do you unerstand what i want..

#

basically.. we have two version Free and Paid version. Paid version is we monthly charge with customer. so we want auto charge. every month end we charge the customer automatically.. No matter what type of card he is using..

naive thistle
#

I do understand what you need

#

I'm asking whether you plan on using Subscription or not (the Stripe API for Subscription)

#

you mentioned PaymentIntents but the right thing to do would have been to leverage Subscriptions API

it already does what you're looking for

so we want auto charge. every month end we charge the customer automatically.. No matter what type of card he is using..

sage belfry
#

No i have not use any subscription api.. uptill now.

naive thistle
#

yeah so that is the first thing

instead of you creating the first charge using PaymentIntents, you will just create a Subscription, that will create the payments for you automatically

sage belfry
#

so you mean if i use subscription api i will achieve this.. right?

naive thistle
#

yes

sage belfry
#

can you share link also.

naive thistle
#

let me send you a link to go over

#

are you planning to use Elements?
or Stripe Checkout?

I recommend Checkout as it makes your integration easier

sage belfry
#

what is the difference in Element or Stripe Checkout

naive thistle
#

Elements -> you build your own payment page, more integration work
Checkout -> Stripe hosted payment page, lots of features out of the box like Apple Pay / Google Pay, other payment methods, easier integration

sage belfry
#

okay.. can i look running examples

#

Map<String, Object> item1 = new HashMap<>();
item1.put(
"price",
"price_1Jn4qN2VYugoKSBzXr0gOguk"
);

#

how can i create price object.

#

is there any other way i charge customer automatically no matter what card he is using..

naive thistle
#

is there any other way i charge customer automatically no matter what card he is using..
Stripe Subscription , what I recommended you integrate

sage belfry
#

params.put("product", "prod_KJfIvugzVdFTeD");

#

?

atomic abyss
#

What exactly is your question here?

sage belfry
#

is this product id belongs to stripe or i can put my own..

atomic abyss
#

It's an ID that is set/belongs to Stripe, you cannot pass in your own ID

sage belfry
#

so it means i have to create product also..right?

atomic abyss
#

Yes

sage belfry
#

usually we call paymentintent for payment..
but in this case we call subscription

#

so it automatically do payment right?

atomic abyss
#

At a high level yes, subscriptions will automatically ask for payment

sage belfry
#

how much delay.. i mean i subscribe any plan.. how much time it takes to payment

atomic abyss
sage belfry
#

it is throwing me stripe interface i not want that..

atomic abyss
#

What do you mean?