#carlos-sub-pinning

1 messages · Page 1 of 1 (latest)

last aurora
#

hello, you'd create the Subscription with a trial so that the charge is on the 18th

faint trench
#

and how to validate the payment method before?

last aurora
#

what are you using? Elements or Checkout?

faint trench
#

Elements.

Today I use the stripe.js confirmCardSetup library to confirm the payment method

#

If I create a subscription for the 18th and use the confirmCardSetup library will it charge immediately or will it only be charged on the 18th?

last aurora
#

Today I use the stripe.js confirmCardSetup library to confirm the payment method

when you create a Subscription with trial, under the hood it creates for you a pending_setup_intent

you then call confirmCardSetup() to collect card details from Elements on the customers' card

that function validates the customer's card

This doc explains it more: https://stripe.com/docs/billing/subscriptions/overview#using-setupintents

Stripe automatically creates SetupIntents for subscriptions that don’t require an initial payment. The authentication and authorization process also completes at this point, if required. If both succeed or aren’t required, no action is necessary, and the subscription.pending_setup_intent field is null. If either step fails, Stripe recommends using the SetupIntent on your frontend to resolve the issue while the customer is on-session. The next two sections explain in detail how to manage scenarios where authentication or authorization fail.
faint trench
#

thanks

#

When I create a subscription to this template, should the status be active?

last aurora
#

it will be status: trialing

#

try it out in test mode to see what responses are returned

faint trench
#

I was seeing here in the documentation, to create a subscription to this model I must send the trial_end field informing a data stamp, is that correct?