#gabba-checkout-error

1 messages · Page 1 of 1 (latest)

errant spearBOT
slender onyx
#

gabba-checkout-error

#

the 429 is unrelated.

#

What's the URL you are on right now?

slender onyx
#

where did you get that URL from?

hazy olive
#

from the checkout endpoint using the sdk

this.stripe.checkout.sessions.create({
      success_url,
      line_items,
      mode,
      customer: organization.customerId,
    });
slender onyx
#

No, our API would expose a #xxxxxxxxx at the end of the URL and it's missing from your link

hazy olive
#

what do you mean ?

#

this is what i get back from the api

data: {
  after_expiration: null,
  allow_promotion_codes: null,
  amount_subtotal: null,
  amount_total: null,
  automatic_tax: { enabled: false, status: null },
  billing_address_collection: null,
  cancel_url: 'https://example.com/cancel',
  client_reference_id: null,
  consent: null,
  consent_collection: null,
  created: 1234567890,
  currency: null,
  custom_text: { shipping_address: null, submit: null },
  customer: 'cus_K7qrnaiAHqB1Qvb',
  customer_creation: null,
  customer_details: {
    address: null,
    email: 'example@example.com',
    name: null,
    phone: null,
    tax_exempt: 'none',
    tax_ids: null
  },
  customer_email: null,
  expires_at: 1234567890,
  id: 'cs_test_K7vjf3KVLDGmtPq',
  invoice: null,
  invoice_creation: null,
  livemode: false,
  locale: null,
  metadata: {},
  mode: 'subscription',
  object: 'checkout.session',
  payment_intent: 'pi_1MRgUrHs0pPkhgo8NEfVjOvo',
  payment_link: null,
  payment_method_collection: null,
  payment_method_options: {},
  payment_method_types: [ 'card' ],
  payment_status: 'unpaid',
  phone_number_collection: { enabled: false },
  recovered_from: null,
  setup_intent: null,
  shipping_address_collection: null,
  shipping_cost: null,
  shipping_details: null,
  shipping_options: [],
  status: 'open',
  submit_type: null,
  subscription: null,
  success_url: '
',
  total_details: null,
  url: 'https://checkout.stripe.com/pay/c/cs_test_a1TNJYFVVV5RysH9ITdVyDM4DSoiWkkvIRThOF5DlRDtEIHRuBK5D2IOiJ'
}
#

this is the url i get back from the api

  url: 'https://checkout.stripe.com/pay/c/cs_test_a1TNJYFVVV5RysH9ITdVyDM4DSoiWkkvIRThOF5DlRDtEIHRuBK5D2IOiJ'
slender onyx
#

that Checkout Session id does not exist anywhere in our system. And it's not what a URL looks like either for Checkout

hazy olive
#

i am not inventing the url, this is the payload i get back from the api

#

the beginning of the url looks the same

#

i am not changing the end of the url

#

the log i post above is directly form the api

slender onyx
#

I mean it's not since that Checkout Session id does not exist at all anywhere in our system

#

So I'm thinking you're either changing the API response, looking at a fake response in the docs, or you're using a mocking library (like stripe-mock) that returns fake/mocked data

hazy olive
#

actually just did a curl request and it works

#

and indeed you are right

#

I forgot to switch back to dev i was still using the stripe mock my bad 😅

#

Thank you @slender onyx , sorry about that

slender onyx
#

hahaha all good. I wish stripe-mock gave fake ids like cs_test_112233444stripemock so that we knew instantly but I lost that design decision years ago internally :p

hazy olive
#

yeah switching from running test and making requests to the testing env and it's a bit late ^^, but thank you for figuring this out