#gabba-checkout-error
1 messages · Page 1 of 1 (latest)
where did you get that URL from?
from the checkout endpoint using the sdk
this.stripe.checkout.sessions.create({
success_url,
line_items,
mode,
customer: organization.customerId,
});
No, our API would expose a #xxxxxxxxx at the end of the URL and it's missing from your link
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'
that Checkout Session id does not exist anywhere in our system. And it's not what a URL looks like either for Checkout
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
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
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
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
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