#Bryan Millón
1 messages · Page 1 of 1 (latest)
What error are you getting?
I don't know what parameter is missing
I've been searching in documentation, but i don't found anything
i copied the example code that stripe has in the documentation too, but doesn't work
Ahhh, okay. Do you have a request ID? I think the field you need to add is type but I'm not sure yet.
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
What's the whole code that shows type? I have no idea where that screenshot is coming from or what request is looking for type
That screenshot is from the dashboard
This is my code
I copied that code from the examples
From here
but doesn't work
What object is type on? The error indicates you didn't pass type when you should have, so can you look at the dashboard where you took that screenshot and discern which object it's missing from?
{
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: type.",
"param": "type",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_sbuMRBMvYX9Muh?t=1669159017",
"type": "invalid_request_error"
}
}
Please read my comment carefully before responding
sorry, i sent the message before read it
{
"line_items": {
"0": {
"price_data": {
"unit_amount": "2000",
"currency": "usd",
"product_data": {
"name": "T-shirt"
}
},
"quantity": "1"
}
},
"cancel_url": "http://localhost:3000/",
"shipping_address_collection": {
"allowed_countries": {
"0": "US",
"1": "CA"
}
},
"success_url": "http://localhost:3000/checkout-success",
"mode": "payment",
"shipping_options": {
"0": {
"shipping_rate_data": {
"display_name": "Free shipping",
"fixed_amount": {
"currency": "usd",
"amount": "0"
},
"delivery_estimate": {
"minimum": {
"value": "5",
"unit": "business_day"
},
"maximum": {
"value": "7",
"unit": "business_day"
}
}
}
}
},
"payment_method_types": {
"0": "card"
},
"type": <required>
}
What's the request ID for that request?
Hi 👋
Hi👋
I'm reading the documentation, but i don't know what type is required
I'm looking as well
Wait I think I've found it
You need to specify the shipping_options.shipping_rate_data.type
Even though the only current option is fixed_amount
I tried specifying inside the object shipping_rate_data
but in my function fixed_amount is already there
look
That isn't what is needed
The type: fixed_amount is required
It doesn't matter if you pass the fixed_amount hash, you still need to provide the type enum
Is already working, thank you for help me
🎉