#zoli_ch77ck

1 messages · Page 1 of 1 (latest)

late mothBOT
elfin nimbus
#

Hi

#

In the future please just post a question outside of a document

#

It is much easier to read

cyan saddle
#

okay sorry about it

elfin nimbus
#

That's okay

#

Do you have an example Subscription ID from your test that you can share here?

cyan saddle
#

sub_1OPAzPLdPJR8CbuCU5aWgQTX

elfin nimbus
#

Okay so looks like you never collected a PaymentMethod for that specific Subscription

#

I see a different Subscription for that Customer where you did collect a PaymentMethod

#

sub_1OPAyPLdPJR8CbuCaaYJniKP

#

And when you advanced time for that it did succeed

cyan saddle
#

ah i did not even noticed that. to be honest i have tried all kind of different approaches to make it work and I have missed the one that actually collected the PaymentMethod. Do i have to collect it on the client side? or the user uses the paymentSheet successfully it sorts it for me and attaches the PaymentMethod

#

?

elfin nimbus
#

Yep once the customer completes the PaymentSheet then it will be automatically attached and set as the default since you are setting save_default_payment_method: 'on_subscription' server-side when you create your Sub

cyan saddle
#

then i probably got it sorted then... thank you. May i have another question for payment schedules?

elfin nimbus
#

Yep

#

You can ask here

cyan saddle
#

cool thanks. I have created my prices like so: const price = await this.client.prices.create({
unit_amount: parseInt(${plan.amount * 100}, 10),
currency: plan.currency,
recurring: {
interval: 'week',
interval_count: plan.subscriptionLength
},
product: product.id,
tax_behavior: 'unspecified'
});

#

will the charging happen by the number of weeks i have provided for interval_count?

elfin nimbus
#

Yes, if interval_count was 2 then that would mean it would charge every 2 weeks

cyan saddle
#

so if i set trial period to 1 day on the subscription it will charge after the first day passed and then every 2 weeks after that?

elfin nimbus
#

Yep

cyan saddle
#

Thank you. I think I have got all the answers i was looking for