#duracel
1 messages · Page 1 of 1 (latest)
If I remove "automatic_tax": { "enabled": "true" } then both Google Pay/Pay with link are loaded. I'd like to have those options while still enabling automatic tax
Hi sorry for the delay. Discord is busy
Looking
Interesting. And after the customer enters their billing address, Google Pay still isn't showing up?
Also can you send the sessinon id for the one where google pay does show?
It doesn't show up even after entering the billing address. Here's the session id for the other session: cs_test_b1W8UubiTVGemDuJiN4o8X5nrQcdtc2UYWT9wISgm7hcdMT7PD94GLDbLI
Hello! If you don't specify a customer does it work as expected?
I just tried replacing the customer with customer_email and it still doesn't show the alternative payment methods: cs_test_b1ZPnEyWXtu68KLElN8W5pKmggMmeXIadrWGzioRvH9dtkAdsBTVldss9H
I also just tried removing the customer_email as well, and still doesn't work as expected:
cs_test_b19rmDfREBpq1YzyE7lV6lvCLDx0FjBaxwI4xr6SDTxg9SgoDp74kUHB8v
Ah, unfortunately I believe the docs you referenced above are out of date. The note at the bottom of this section indicates a shipping address is required: https://stripe.com/docs/tax/checkout#create-session
Does it work if you ask for a shipping address?
Not exactly sure how to do that. I tried passing the shipping_address_collection paratemeter like this:
"shipping_address_collection": {
"allowed_countries": "GB"
}
But I'm getting this error:
Raw response for the API
Status code 400
{
"error": {
"message": "Invalid array",
"param": "shipping_address_collection[allowed_countries]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_MNQUn6VMjp2C6v?t=1690580578",
"type": "invalid_request_error"
}
}
shipping_address_collection.allowed_countries takes an array of countries, not a single string representing one country.
It would need to be this:
"shipping_address_collection": {
"allowed_countries": ["GB"],
}
I couldn't get it to work. I think it's because of Bubble's limitations (I'm using bubble.io to build my app) as it won't let me add arrays.
I tried adding the parameters in the request body instead, like this:
But now I get this error:
Status code 400
{
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: success_url.",
"param": "success_url",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_sEzAhBhuilJdW0?t=1690582288",
"type": "invalid_request_error"
}
}
Even though the success_url parameter is set properly
Is there another way to ask for shipping address that doesn't require passing arrays in the parameter?
I don't think so. Where are you setting success_url?
Can you give me the request ID showing that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Huh. I don't see any parameters in that request, the body is blank.
Can you check to see if a configuration was changed somewhere that would result in a blank body?
It's because the API call isn't being initialized at all, this is the full error message I'm gettin in Bubble when I try to initialize it:
There was an issue setting up your call.
Raw response for the API
Status code 400
{
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: success_url.",
"param": "success_url",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_cjnVCwy8oM6lC6?t=1690582760",
"type": "invalid_request_error"
}
}
I don't see anything wrong with the API call configuration here
Oh, your body type is JSON. The Stripe API does not accept JSON request bodies.
We only output JSON in responses.
Incoming request bodies need to be form URL encoded: https://stripe.com/docs/api
The Stripe API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Oh my bad, I'm new to working with APIs so I wasn't aware of this.You reckon any of these could work? (image)
You need the form-data option there.