#Cédric Morelle

1 messages · Page 1 of 1 (latest)

ruby heronBOT
solid jasper
#

You'll need to pass default_incompelte

whole gale
#

so something like that

#

payment_behavior: 'default_incomplete',
payment_settings: {save_default_payment_method: 'on_subscription'},

#
      {
        customer: customer.id,
        items: [
          {
            price: product.price_id,
          },
        ],
        payment_behavior: "default_incomplete",
        payment_settings: {
          save_default_payment_method: "on_subscription",
        },
        coupon: params[:coupon_code],
      }
    )```
solid jasper
#

Yeah

#

Recommend just reading that guide entirely

whole gale
#

ok please I read it but now

#

I created my subscription

#

as for exemple

#

where do I get my client_secret key ?

#

subscription.latest_invoice.payment_intent.client_secret is empty

#

does not exists

solid jasper
#

You need to retrieve the invoice

#

see it's an id in the above object

#

Also read the doc I sent

#

It explains you need to use expansion for it to show

#

expand=['latest_invoice.payment_intent'],

#

If you don't want to retrieve the invoice

whole gale
#

not well documented but I appreciate much your great knowledges !