#Seen Developer
1 messages · Page 1 of 1 (latest)
Hi there, you can refer to the API reference doc, there's also an example code that you can copy and paste to your code. (https://stripe.com/docs/api/payment_intents/create?lang=php#create_payment_intent-amount)
Jack I have done the same
and also passed the currency as AED and amount greater than 2 as well
But it is still showing the exception as Amount must be greater than 2.00 AED
Can you share the request ID (req_xxx)? Here's how you can find it: 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.
request failed
okay sir
Sending you the code sir
Stripe\Stripe::setApiKey(STRIPE_SECRET);
$customer = Stripe\Customer::create(array(
"address" => [
"line1" => "Virani Chowk",
"postal_code" => "390008",
"city" => "Vadodara",
"state" => "GJ",
"country" => "IN",
],
"email" => "demo@gmail.com",
"name" => "Nitin Pujari",
"source" => $_REQUEST["stripeToken"]
));
Stripe\Charge::create ([
"amount" => 100 * 100,
"currency" => "AED",
"customer" => $customer->id,
"description" => "Test payment from LaravelTus.com.",
"shipping" => [
"name" => "Jenny Rosen",
"address" => [
"line1" => "510 Townsend St",
"postal_code" => "98140",
"city" => "San Francisco",
"state" => "CA",
"country" => "US",
],
]
]);
Jack please check
You are not using PaymentIntents API?
Please read the API ref doc that I sent to you earlier, you can use the example code to create a PaymentIntent.
I'd like to clarify your ask, because you were asking about PaymentIntents API in the beginning, but you are using Charges API in the provided code.
Do you intent to continue using Charges API or migrate to PaymentIntents API? My recommendation is to go with PaymentIntents API.
Charges API
jack
i would like to go with charges api
Jack
@tranquil trench please reply
https://stripe.com/docs/api/charges/create?lang=php#create_charge-amount This is the API ref for creating a charge.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Your code looks OK to me. If you can share with me the request ID then I can find the log and help you troubleshoot further.
We are doing the same but still it is showing the same error @tranquil trench
If you can't get the request ID, can you share with me the detailed error message?
sure
Amount must be at least 2.00 AED
this is the error message which we are getting
@tranquil trench
@tranquil trench
There's no need to tag me every time after a message, your messages won't be missed.
I can't reproduce the problem and I'm afraid that I can't help you further unless you provide me the request ID.
how to get the request id
here
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
here is the request log url
Great, let me take a look
OK, you are passing 2 as the amount, for 2.00 AED you should pass 200, because all API requests expect amounts to be provided in a currency’s smallest unit.
okay sir wait let me check sir