#AdityaCodal-customer

1 messages · Page 1 of 1 (latest)

agile ferry
#

👋 happy to help

#

if you want we could use this thread to continue chatting

#

instead of the main channel

smoky valve
#

okay

agile ferry
#

where is your Stripe Account located in?

smoky valve
#

India

agile ferry
#

yes unfortunately, Search is currently unavailable in India

smoky valve
#

okay so, It's possible to change regional

agile ferry
#

depending on what you need to do?

#

are you still going to operate in India?

smoky valve
#

Yes

#

right now I'm just use sandbox account and I've just developer

agile ferry
#

in that case if you're going to operate in India, there's no reason for you to change the location otherwise you might end up testing things that would eventually not work in the country you operate in

#

India has very specific set of rules/regulations/limitations

smoky valve
#

okay

#

I've another question related stripe

I'm use this reference -> https://stripe.com/docs/billing/subscriptions/fixed-price#add-elements-to-your-page

I'v created product/price and subscription in stripe dashboard

Right now I've required create subscription with charge/capture payment from customer and status required to complete.

I'm flow use as

  1. Create setup intent and generate client_secret and pass to frontend html page
  2. There way to load stripe element using stripe.js and get payment_method (payment method id)
  3. After calling create subscription api and there create subscription

Problem:

  • But issue is subscription are created but status are still showing as a incomplete.

  • How can I create capture or charges from customer.?

Learn how to offer multiple pricing options to your customers and charge them a fixed amount each month.

#

Hi @agile ferry can you please answer for above question thanks!

agile ferry
#

yes I can just bare with me, I'm trying my best to answer everyone as fast as humanly possible 🙈

smoky valve
#

Hi @agile ferry I've drop the file of my coding

agile ferry
#

yes sorry, I'm taking a look

agile ferry
#

again sorry for the late reply

#

discord has been quite busy the last couple of hours

smoky valve
#

req_6ERngKeGHsShaA

agile ferry
#

thanks

#

I'll take a look

smoky valve
#

any update ? thanks

agile ferry
#

sorry not really, looking right now

drifting onyx
#

Taking over here, catching up!

#

What's the issue exactly? The status: 'incomplete'?

smoky valve
#

Hi @drifting onyx How can I capture payment on this subscription

#

I need capture payment or create charge on subscription.

#

Can you please explain how to invoice paid flow work?

drifting onyx
#

Sure, the underlying Payment Intent (pi_3LE9q9SDupx40suj13d1qeO9) has a status of requires_action, which means auth/3DS was requested

smoky valve
#

okay so ^this flow how to work with stripe.js

drifting onyx
#

This is expected with payment_behavior: 'default_incomplete' (the default): https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior

Use allow_incomplete to create subscriptions with status=incomplete if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription’s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.

smoky valve
#

It's already setup from frontend side let me explain my setup with step

  1. Create setup intent (Backend)
    pass client_secret to frontend
  2. stripe.confirmSetup (Frontend)
    pass payment method (pm_1LEBe5SDupx40sujPrvvdjUT) to backend
  3. then I'm create subscription with below code (backend)
// Create the subscription
  const subscription = await stripe.subscriptions.create({
    customer: req.body.customerId,
    items: [{ price: 'price_HGd7M3DV3IMXkC' }],
    expand: ['latest_invoice.payment_intent'],
  });
drifting onyx
#

Yeah the issue is the subscription creation is triggering a new setup_future_usage mandate for the recurring/off-session payments (basically ignoring the pm_xxx you passed)