#brittkim
1 messages · Page 1 of 1 (latest)
hello! can you share the customer id?
cus_Npv7BwwRwNwcPe
what's the request id where you set invoice_settings.default_payment_method to the paymentMethodId?
Oh, how would I find that? I just set it as I'm creating the user
how are you creating the user?
Using nodejs stripe package await this.stripe.customers.create({ IN HERE });
for context, this is the request where you're created that particular customer : https://dashboard.stripe.com/test/logs/req_1X8IpDeS7suTaQ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
i don't see any invoice_settings.default_payment_method being passed in the request
Pretty wild
Hi @proven shard I'm taking over
https://dashboard.stripe.com/test/logs/req_1X8IpDeS7suTaQ based on the log, I don't see you've set a invoice_settings.default_payment_method in the creation request
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't see payment_method being set either in that POST body
but it must be getting set, as I did make a purchase, right?
What's the implementation of paymentProvider.createCustomer() function?
Oops, sorry, I didn't realized I shared the abstract
OK, can you run your code and send me the request ID?
Yes
Hm, what is the request ID? This is the full response I just got ```{"id":"cus_NpvsE1pAztkh2M","object":"customer","address":null,"balance":0,"created":1683259973,"currency":null,"default_source":null,"delinquent":false,"description":"New Whag Customer 5","discount":null,"email":"b@b.com","invoice_prefix":"378B2C46","invoice_settings":{"custom_fields":null,"default_payment_method":null,"footer":null,"rendering_options":null},"livemode":false,"metadata":{},"name":"B","next_invoice_sequence":1,"phone":null,"preferred_locales":[],"shipping":null,"tax_exempt":"none","test_clock":null}
Btw, I just made another payment and logged the object I am passing to the stripe function, and it is {"name":"B","email":"b@a.com","payment_method":"pm_1N4G3uIxIeY6zCg7V0YGnkgV","invoice_settings":{"default_payment_method":"pm_1N4G3uIxIeY6zCg7V0YGnkgV"},"description":"New Whag Customer 5"}
https://dashboard.stripe.com/test/logs/req_NCNa2LGNY7XO34 I don't see payment_method in your request
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'm totally passing it to the lib function :🤷:
Save the file and run again
This is what I'll be running, so the logs will reflect
LOG [PaymentsService] Stripe customer created {"id":"cus_NpvzGUdj5OISEe","object":"customer","address":null,"balance":0,"created":1683260398,"currency":null,"default_source":null,"delinquent":false,"description":"New Whag Customer 5","discount":null,"email":"b@z.com","invoice_prefix":"BBB5CD3E","invoice_settings":{"custom_fields":null,"default_payment_method":null,"footer":null,"rendering_options":null},"livemode":false,"metadata":{},"name":"B","next_invoice_sequence":1,"phone":null,"preferred_locales":[],"shipping":null,"tax_exempt":"none","test_clock":null}
do console.log(customerData.paymentMethodId) and see what it prints
no problem, so did you find out the root cause?
yes, the field is payment_method not paymentMethodId
One question though. How was I able to make a subscription if my paymentId was null?
If a payment is needed when creating a subscription, then the creation will fail and you'll see the error message tells you that a payment method is needed.
You can create a subscription with trial, where an immediate payment isn't required.
Ah, I do have a trail. Can I create with trail but also require payment?