#mochi-subscription-error

1 messages · Page 1 of 1 (latest)

twin basinBOT
west notch
#

for example this pi_3N85qWBPM36OC3gX2caZMCL7

orchid night
#

mochi-subscription-error

#

@west notch you would have to look at that PaymentIntent in the API and its underlying Charge. The Charge would have the outcome property with more details

west notch
#

or rather sub_1N85qVBPM36OC3gXVcZR5eCy

#

gotcha

#

is there an api to check if the payment will be rejected before I create the subscription

orchid night
#

No there isn't since the payment happens as part of the Subscription creation.

west notch
#

i dont see the charge id on the subscription object

orchid night
#

that's expected! A Subscription points to an Invoice which points to PaymentIntent which points to a Charge

west notch
#

the charge is also on the invoice so i can just expand the invoice in the subscription when i call create to get it right?

orchid night
#

yes

west notch
#

i see that there is a charge id that lives on the latestInvoice but also a latest charge that lives on the payment intent. which one do I want to use?

orchid night
#

it's the same