#khornfucius2
1 messages · Page 1 of 1 (latest)
stripe.subscriptions.create({
customer: stripeCustomerId,
items: [{ price: priceId }],
billing_cycle_anchor: startDate,
payment_behavior: 'default_incomplete',
payment_settings: {
save_default_payment_method: 'on_subscription',
payment_method_types: ['card']
},
expand: ['latest_invoice.payment_intent'],
metadata
})
This is my code, doesn't seem like it's saving the start date in the dashboard. Is there something that I can change in the payment behavior or settings to get this working?
Hi, can you explain what you mean with saving the start date in the dashboard?
Hi! To clarify, there does not appear to be any indication that my subscription will begin (or attempt to be charged for) at any point in the future when I look at the dashboard.
The subscription object that I created also doesn't appear to have any of the data to indicate that
This is the id of the subscription: sub_1M2OZBDnKbkHbxM5xe1Wbj8s
Thank you for sharing the subscription id. You're using, default_incomplete and this creates the Subscription with status=incomplete when the first invoice requires payment. It looks like the first invoice has not had a payment attempt, https://dashboard.stripe.com/test/invoices/in_1M2OZBDnKbkHbxM50mc6E2Oz . Your desired behavior will occur when the first invoice is paid and the subscription goes into status=active
Thanks very much, I just managed to get the future billing_cycle_anchor set in the future in the object in this new subscription sub_1M2OqyDnKbkHbxM5G9QRF5Kn.
However, the invoice attached to this subscription shows a prorated billed amount. I don't want to charge this amount now - instead, I want to charge the full amount on the start date
Is there a way to go about doing this?
Yes, you can set the proration behavior to none: https://stripe.com/docs/api/subscriptions/create#create_subscription-proration_behavior
Let me know if you have any questions on this.