#sindur-error
1 messages · Page 1 of 1 (latest)
hi, looking
looks like a bug in the Woocommerce plugin you use really. You're not writing this code yourself
if you are, the problem is you are missing an array, it should be like 'shipping_address_countries' => ["US"],
sorry! I found this https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-shipping_address_collection-allowed_countries
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
As per this I send. like
"shipping_address_collection": {
"allowed_countries": "US"
},
and I got error saying. "invalid_request_error - shipping_address_collection[allowed_countries]
Invalid array"
yep
I told you above, you need to pass it as an array
"shipping_address_collection": {
"allowed_countries": ["US"] // <=== [ ... ]
},
Oh okay! I got it
One more thing, I tried this it's working but when i pass both billing_address_collection and shipping_address_collection the checkout page only display shipping address fileds
See this
Req ID : req_3TNX73jIotljds
look at the checkbox at the bottom above the Pay button