Skip to main content

Update a customer

Updates a customer resource.


Endpoint

PUT /customers/:id

Sample code

const client = require('payrex-node')('insert your PayRex Secret API key.');

const customer = await client.customers.update(
'<ID of a customer resource>',
{
name: 'John Smith',
email: 'john@gmail.com'
}
);

Parameters

currency optional

A three-letter ISO currency code in uppercase. As of the moment, we only support PHP.


name optional

The customer's name.


email optional

The customer's e-mail address.


billing_statement_prefix optional

The customer's prefix used to generate unique billing statement numbers. Allows 3-15 uppercase letters or numbers.


next_billing_statement_sequence_number optional

The sequence number used as a suffix when creating the customer's next billing statement number. Defaults to 1.


metadata optional

A set of key-value pairs you can attach to the resource. This can be useful for storing additional information about the Customer in a hash format.

Returns

Returns a Customer resource.