#davidcharles9114
1 messages ยท Page 1 of 1 (latest)
Hi there, what's the payment intent ID?
I use payment hosted stripe by creating session
And it will return session.url for pointing to Hosted stripe payment
What's the checkout session ID?
I can take a look if you share with me the checkout session ID
How to get checkout session ID from Dashboard? can you let me know,
https://dashboard.stripe.com/test/logs you can search your logs and find your checkout session creation. Once found, you'll see the checkout session ID in the response.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ok the relevant PaymentIntent is pi_3OGvunJPUdcPKYWO16mLZci6" and it doesn't have a shipping address, that's why the radar rule didn't match for this payment.
Why the UI redirect have shipping address to I filling,
That's because you set shipping_address_collection in https://dashboard.stripe.com/test/logs/req_jlRtHssMz7055S
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes, so you mean, the shipping_address_collection only working for mode payment, not subscription
when create checkout session, is that right?
Radar rule
No. I mean this payment doesn't have a shipping address, and that's why it doesn't match the radar rule that you created.
Can you tell me the reason, why form have Shipping address to filing data, While payment response Log not have address info?
Did you fill in the shipping address during checkout?
Ok, that shipping info is set to the customer object, not payement_intent. To set the shipping address for payment_intent, use https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-shipping
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You mean I will pass mode payment or subscription in here?
or both mode can working in this case
Hmm wait a second, that param I provided earlier is for payement mode only.
Ok. Another way is to listen to invoice.created event, and programmatically set the shipping (https://stripe.com/docs/api/payment_intents/update#update_payment_intent-shipping) before finalizing the ivnoice. In this way, the payment_intent would have the shipping info that can match the radar rule.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I want shipping address country dynamic on UI, by user filling,
not passing from API,
Such as, I can select Vietnam, or US that I want shipping
For mode subscription
I know. Upon checkout completion, Checkout will set the shipping info to the customer object. So that you can set the same shipping info to payment_intent when handling invoice.created events
So for this code, I will add more which param to support this, Can you help?
line_items: [
{
price:
subscriptionPlan === SubscriptionPlan.monthly
? env.STRIPE_MONTHLY_SUBSCRIPTION_PRICE_ID
: env.STRIPE_ANNUAL_SUBSCRIPTION_PRICE_ID,
quantity: 1
}
],
metadata: {},
mode: 'subscription',
customer_email: email,
success_url: `${env.STRIPE_CHECKOUT_SUCCESS_URL}?session_id={CHECKOUT_SESSION_ID}&user_id=${userId}`,
shipping_address_collection: {
allowed_countries: allowedCountries,
},```
No, you don't need to add anything here.
Are you familiar with webhooks? https://stripe.com/docs/webhooks
Don't know the webhook will have any related to creating Session in here?
My final purpose is want to create Radar rule for Block payment when Shipping Address Country is US,
That mean Stripe will reject payment if Shipping Address Country is US,
๐ taking over here. Can you see this event on your Dashboard? https://dashboard.stripe.com/test/events/evt_1OGvurJPUdcPKYWO4p2tAjXP
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes, I seen.
Have any thing I need focus in this?
I created Checkout session with mode Payment, the radar rule working
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
But for subscription mode, the radar rule not working,
Differ between Subscription and Payment. Have session Shipping
How do you setup your rule? Does it block on Shipping Address but not looking at Billing Address?
My radar rule just block Block if :shipping_address_country: IN ('US', 'DE', 'AE')
What if you block using billing address instead? As you already collec it on Checkout Session
My final purpose is want to create Radar rule for Block payment when Shipping Address Country is US,
So use billing address instead is fine in this case,
Sorry didn't follow. Have you tried changed from Shipping -> Billing address and see if it works?
Why we use Billing address instead?
If we don't check Billing address is same as shipping, and select another,
So please help confirm me the final, For subscription mode, the radar rule shipping_address_country will not working? is that right,
And we will use billing_address_country instead,
Hi, sorry let's take a step back. Could you provide 2 PI Ids in this screenshot side by side? Will look closer
One for subscription mode
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
And the one in payment mode?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Okie I can see the differences now. Sorry for the back and forth. Discord is busy and I believe we would need more time to look closer into it, so please write to Support and mention this Discord thread.
We would follow up from the email conversation
Where I can find Support,