Skip to main content

Update a Payment Intent

Updates a Payment Intent resource.


Endpoint

PUT /payment_intents/:id

Sample code

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,
}
)

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.