#krishna-awate_api

1 messages ¡ Page 1 of 1 (latest)

cursive solarBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1252849644103405638

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

prisma musk
spice fable
#

What rule I have to set?\

#

Coult you please help me with this?

#

Hello sir.

prisma musk
#

It's up to you! The rules are what you define

spice fable
#

How can I test these rules

prisma musk
#

You can create PaymentIntent as normal but matching the condition of your defined rule, and see if it blocked the PI as expected

#

Each rule on Dashboard also has the link to affected PI

spice fable
#

Do I have to test from Checkout or dashboard?

#

suppose I want to block payement if amount is less that $10. How can I do that?

prisma musk
#

Yeah have you tried setup the block rule?

spice fable
#

I have done this one

Block if :ip_state: = 'IND'

#

just to test

#

But it's not working. I just want to test block payment if customer from India.

#

Block if :email_domain: = 'gmail.com'

this is also not working

#

I am in test mode

prisma musk
#

does the rule in Dashboard say 0 matching payment?

spice fable
#

suppose this I want

#

I have added in rule

#

But when I am using this email address. Payment is being successed.

prisma musk
#

Okie can you share the Payment Intent ID?

spice fable
#

pi_3PTHaYLLXoITl2yi0fcAWVk1

prisma musk
#

Where did you input the email?

spice fable
#

customer creation

const customer = await stripe.customers.create({
name: name,
email: email,
phone: "7020701627",
});

prisma musk
#

Did you specify that Customer to the PaymentIntent?

#

oh you did

spice fable
#

const paymentIntent = await stripe.paymentIntents.create({
amount: intAmount,
currency: "USD",
automatic_payment_methods: {
enabled: true,
},

  });
#

I have done this only

prisma musk
#

No but I don't see the email in Customer creation request

spice fable
#

This is what I have done in above code

#

What I need to do?

prisma musk
#
{
  amount: "555500",
  automatic_payment_methods: {
    enabled: "true",
  },
  currency: "USD",
}

You sent this parameters. Do you recognize them?

spice fable
#

Sorry I didn't get.

#

I want to block sepecic mail. But it is not working.

prisma musk
#

Yes but it looks like you haven't sepcified the customer to the PaymentIntent

prisma musk
spice fable
#

const paymentIntent = await stripe.paymentIntents.create({
amount: intAmount,
currency: "USD",
automatic_payment_methods: {
enabled: true,
},
customer: customer?.id,
});

#

Now it is wokring.

#

I have passed customer id to payment intent

#

Thank you so much for your help.

#

Have a nice day sir