#idhruv-sub-schedule

1 messages ยท Page 1 of 1 (latest)

tawdry cradle
#

Hello ๐Ÿ‘‹
Give me a moment to catch up and I'll respond as soon as I can ๐Ÿ™‚

left oxide
#

thanks

#

Please follow the 5 steps solution proposed by the mod before in that thread, that is what i am trying to follow

tawdry cradle
left oxide
#

ohh no

#

so what should i do for subscriptionSchedule?

tawdry cradle
#

you can expand the subscription property on the schedule and look at subscription_schedule.subscription.latest_invoice

#

or you can just get the subscription ID from subscription_schedule.subscription and look up latest_invoice

left oxide
#

i just get this in return:

{ subscriptionSchedule: { id: 'sub_sched_1LfNrzGdNldKu1zmu0Smakem', object: 'subscription_schedule', application: null, canceled_at: null, completed_at: null, created: 1662555643, current_phase: { end_date: 1670351400, start_date: 1662489000 }, customer: 'cus_MLtD4v7ngE4tw6', default_settings: { application_fee_percent: 11.9, automatic_tax: [Object], billing_cycle_anchor: 'automatic', billing_thresholds: null, collection_method: 'charge_automatically', default_payment_method: null, default_source: null, description: null, invoice_settings: null, transfer_data: [Object] }, end_behavior: 'release', livemode: false, metadata: { bookingId: '63189361f1be6e76008b8be4' }, phases: [ [Object] ], released_at: null, released_subscription: null, renewal_interval: null, status: 'active', subscription: 'sub_1LfNrzGdNldKu1zmxwcKZpaC', test_clock: null }

#

so another stripe api call then using subSchedule.subscription?

#

also the invoice on stripe dashboard still shows in 'draft' mode, so not sure again if I can finalize this even using subscriptionId as proposed above

tawdry cradle
#

so another stripe api call then using subSchedule.subscription?
yeah that's correct.

also the invoice on stripe dashboard still shows in 'draft' mode, so not sure again if I can finalize this even using subscriptionId as proposed above
you can

left oxide
#

okay, can you please link me exactly which api call i can make here to get invoice using subscription id?

#

all I see on the documents page are the ones that use only invoice id to get invoices

tawdry cradle
#

when you retrieve a subscription, it should have a latest_invoice property

left oxide
#

got it! thanks