#arielbo
1 messages · Page 1 of 1 (latest)
Hi there, you mean you want to update the currency of an existing payment intent?
If so, you can call the update API (https://stripe.com/docs/api/payment_intents/update#update_payment_intent-currency) and specify the new currency.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, I want my clients to choose in which currency they want to receive their payments in my marketplace
I m using php and I have configured with usd but, my dude is if I just change usd to bob or maybe I need to do something more or change any, do you understand me?
I don't quite understand.
I explain better, I have a flow by which my clients configure their products and services to sell them on my website but I want them to choose the currency in which they want to do it, so I have created a gateway that works very well with USD, and payment intent, But now my doubt is if to modify this I have to change only the currency field from usd to bob (eg to bolivia) or in addition to doing this do I have to change something else?
You might also want to change the amount based on the currency conversion.
this is my code:
header('Content-Type: application/json');
try {
// retrieve JSON from POST body
$json_str = file_get_contents('php://input');
$json_obj = json_decode($json_str);
//Create a PaymentIntent cuando carga la page
$paymentIntent = $stripe->paymentIntents->create([
'amount' => $json_obj->s_precio,
'currency' => 'bob',
'automatic_payment_methods' => [
'enabled' => false,
],
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
];
https://stripe.com/docs/currencies also notice that BOB is not supported by American Express
I just to change this line: 'currency' => 'bob', ?
also notice that BOB is not supported by American Express no problem
The code looks good to me, did you run into any problem?
how i saw you before my customers must be able to put his own prices in his own currency
I ask for you before to run, if maybe I need to consider another change to achieve this goal
Sound good, feel free to reach out if you have any questions.
thanks a lot, I test now