#shaitan-Subscription

1 messages · Page 1 of 1 (latest)

eager cradle
#

Hi there, you need to attach a payment method to your customer before creating the subscription.

solemn apex
#

I added this:

step1. Create payment method via stripe elements
step2. create customer
step3. attached payment method to the customer
step4. now trying to create subscription?

#

anything i am doing wrong here?

#

This is how i am attaching the payment method to customer

#

Hello @eager cradle any help?

eager cradle
#

can you send me the request ID so I can take a look?

solemn apex
#

req_UX8ZeUivuB4crS

#

any update please?

#

@eager cradle

eager cradle
#

Thanks for the waiting, please give me a sec

#

OK, this customer doesn't have a invoice_settings.default_payment_method

#

so after attaching the payment method to customer, you can also se this payment method as the customer's nvoice_settings.default_payment_method

solemn apex
#

ok any api link for this?

eager cradle
solemn apex
#

Ok thank you so much @eager cradle

solemn apex
#

Hi

#

@eager cradle

eager cradle
#

Hey there

solemn apex
#

Can we get the receipt url after creating the new subscrpition?
I would like to know we have to run the seperate api for this or we can get it in same api.

eager cradle
#

is it related to the invoices?

solemn apex
#

Yes

eager cradle
#

You can pass the subscription to the list invoices API (https://stripe.com/docs/api/invoices/list#list_invoices-subscription), and get the URL from the hosted_inovice_url https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url

solemn apex
#

I have the invoice id, so you mean I have to call the reterive invoice to get the 'hosted_invoice_url'

#

Am i right?

eager cradle
#

Yes you are right

solemn apex
#

ok thanks a lot

#

ok I got the receipt url

#

you are awesome

eager cradle
#

Welcome!