#.crawl

1 messages ยท Page 1 of 1 (latest)

fathom cloakBOT
rich temple
#

the thing is, I create my customer in backend without address

quaint hollow
#

Hello ๐Ÿ‘‹
The error looks quite clear, no?
The customer is missing address and you need to allow them to provide/update the address when you create a checkout session

rich temple
#
        customer: customer.id,
        line_items: [
          {
            price: STRIPE_PRICE_ID,
            quantity: 1,
          },
        ],
        mode: 'subscription',
        discounts: [{
          coupon: STRIPE_COUPON_ID,
        }],
        subscription_data: {
          ...trialPeriodData
        },
        // success_url: `${redirect}/?success=true`,
        // cancel_url: `${redirect}/?canceled=true`,
        success_url: STRIPE_REDIRECT_URI,
        cancel_url: STRIPE_REDIRECT_URI,
        automatic_tax: {enabled: STRIPE_TAX_ENABLED},
      });

#

So just by adding

customer_update: {
address: 'auto',
},

it's solved ?

quaint hollow
#

try it out ๐Ÿ™‚

#

It should