#shrey
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
This is the customer Stripe Object response, I can't see an error here...
Yes, here. req_qdphwZbsxRLioz
The error I get:
StripeInvalidRequestError: Invalid string: {:invoice_prefix=>"C34908AA", :invoice_settings=>{:custom_fields=>"", :footer=>"", :default_payment_method=>"", :rendering_options=>""}, :test_clock=>"", :description=>"", :id=>"cus_NaGfQAN6chCx9r", :discount=>"", :default_currency=>"", :balance=>"0", :object=>"customer", :delinquent=>"false", :name=>"", :livemode=>"false", :next_invoice_sequence=>"1", :phone=>"", :tax_exempt=>"none", :currency=>"", :address=>"", :created=>"1679647073", :email=>"", :default_source=>"", :shipping=>""}
at StripeError.generate (/Users/shrey/Desktop/maf/node_modules/stripe/cjs/Error.js:10:20)
at res.toJSON.then.Error_js_1.StripeAPIError.message (/Users/shrey/Desktop/maf/node_modules/stripe/cjs/RequestSender.js:105:54)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'StripeInvalidRequestError',
raw: {
message: 'Invalid string: {:invoice_prefix=>"C34908AA", :invoice_settings=>{:custom_fields=>"", :footer=>"", :default_payment_method=>"", :rendering_options=>""}, :test_clock=>"", :description=>"", :id=>"cus_NaGfQAN6chCx9r", :discount=>"", :default_currency=>"", :balance=>"0", :object=>"customer", :delinquent=>"false", :name=>"", :livemode=>"false", :next_invoice_sequence=>"1", :phone=>"", :tax_exempt=>"none", :currency=>"", :address=>"", :created=>"1679647073", :email=>"", :default_source=>"", :shipping=>""}',
param: 'customer',
request_log_url: 'https://dashboard.stripe.com/test/logs/req_qdphwZbsxRLioz?t=1679647073',
type: 'invalid_request_error',
headers: {
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Your are passing the customer object, you need to pass just its Id:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
See how I've created the customer, passing email and name, but the customer object has email and name as null
☝️
Oh. Lemme check. Thanks, you are a great help
Np!