Update a Payment
Update a Payment resource by ID.
Endpoint
PUT /payments/:id
Sample code
- curl
- Node
- PHP
- Python
- Ruby
curl --location 'https://api.payrexhq.com/payments/<ID of a payment resource>' \
--request PUT \
-u replace_with_secret_api_key:
const client = require('payrex-node')('insert your PayRex Secret API key.');
const payment = await client.payments.update('<ID of a payment resource>', {
metadata: {
'new reference number': '1234',
'branch': 'xyz'
}
});
$client = new \Payrex\PayrexClient('insert your PayRex Secret API key.');
$payment = $client->payments->update('<ID of a payment resource>', [
'metadata' => [
'new reference number' =>'1234',
'branch' => 'xyz'
]
]);
from payrex import Client as PayrexClient
client = PayrexClient('insert your PayRex Secret API key.')
payment = client.payments.update('<ID of a payment resource>', {
'metadata': {
'new reference number': '1234',
'branch': 'xyz'
}
})
client = Payrex::Client.new("insert your PayRex Secret API key.")
payment_intent = client.payments.update("<ID of a payment resource>", {
metadata: {
'new reference number': '1234',
'branch': 'xyz'
}
})
Parameters
description optional
An arbitrary string attached to the Payment. Useful reference when viewing Payment from PayRex Dashboard.
metadata optional
A set of key-value pairs you can attach to the resource. This can be useful for storing additional information about the payment in a hash format.
Returns
Returns a Payment resource.