Skip to main content

Update a Payment

Update a Payment resource by ID.


Endpoint

PUT /payments/:id

Sample code

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'
}
});

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.