Update a Payment Intent
Updates a Payment Intent resource.
Endpoint
PUT /payment_intents/:id
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --request PUT --location 'https://api.payrexhq.com/payment_intents/<ID of a payment intent resource>' \
-u replace_with_secret_api_key: \
--data-urlencode 'amount=10000'
const client = require('payrex-node')('insert your PayRex Secret API key.');
const paymentIntent = await client.paymentIntents.update(
// Payment Intent to update.
'<ID of a payment intent resource>',
{
// Amount is in cents. The sample below is 100.00.
amount: 10000,
}
)
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$paymentIntent = $client->paymentIntents->update([
// Payment Intent to update.
'id' => '<ID of a payment intent resource>',
// Amount is in cents. The sample below is 100.00.
'amount' => 10000
]);
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
payment_intent = client.payment_intents.update(
# Payment Intent to update.
'<ID of a payment intent resource>',
{
# Amount is in cents. The sample below is 100.00.
'amount': 10000
}
)
client = Payrex::Client.new("insert your PayRex Secret API key.")
payment_intent = client.payment_intents.update(
# Payment Intent to update.
"<ID of a payment intent resource>",
{
# Amount is in cents. The sample below is 100.00.
amount: 10000
}
)
Parameters
id REQUIRED
The id of the Payment Intent to be updated.
amount optional
The new amount for the Payment Intent. This is a positive integer that your customer authorized in the smallest currency unit, cents. If the customer should pay ₱ 120.50, the amount of the PaymentIntent should be 12050.
The minimum amount is ₱ 20 (2000 in cents), and the maximum amount is ₱ 59,999,999.99 (5999999999 in cents).
description optional
An arbitrary string attached to the Payment Intent. Useful reference when viewing paid Payment from PayRex Dashboard.
customer_id optional
The new ID of a customer resource. To learn more about the customer resource, you can refer here.
Returns
Returns a Payment Intent resource.