Skip to main content

Create a customer

Creates a customer resource.


Endpoint

POST /customers

Sample code

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

const customer = await client.customers.create({
currency: 'PHP',
name: 'Juan Dela Cruz',
email: 'juan@gmail.com'
});

Parameters

currency REQUIRED

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


name REQUIRED

The customer's name.


email REQUIRED

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.