#kamran-subscriptions-3ds
1 messages · Page 1 of 1 (latest)
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.
sure but what APIs have you integrated?
PaymentIntents?
Charges?
Subscriptions?
Are you using Stripe Elements to collect card details
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..
Concept here user do subscription in our system
why don't you want to use Stripe Subscriptions?
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..
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..
No i have not use any subscription api.. uptill now.
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
so you mean if i use subscription api i will achieve this.. right?
yes
can you share link also.
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
what is the difference in Element or Stripe Checkout
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
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..
how can i create price object.
you use the API reference for that: https://stripe.com/docs/api/prices/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
is there any other way i charge customer automatically no matter what card he is using..
Stripe Subscription , what I recommended you integrate
What exactly is your question here?
is this product id belongs to stripe or i can put my own..
It's an ID that is set/belongs to Stripe, you cannot pass in your own ID
so it means i have to create product also..right?
Yes
usually we call paymentintent for payment..
but in this case we call subscription
so it automatically do payment right?
At a high level yes, subscriptions will automatically ask for payment
how much delay.. i mean i subscribe any plan.. how much time it takes to payment
Have you read through our subscription docs? We go into a lot of detail about this at https://stripe.com/docs/billing/subscriptions/overview
it is throwing me stripe interface i not want that..
What do you mean?