Customers
Learn more about the Customer resource
A Customer resource represents the customer of your business. A customer could be a person or a company. Use this resource to track payments that belong to the same customer.
Customer resource will be used for our recurring payments product. If you want us to incorporate your feedback into the first product iteration of our recurring payments, please contact helloworld@payrexhq.com.
As of this writing, customer resource is best used with our billing statements product to keep track of billing statements for a single customer.
Endpoints
| Endpoint | Name |
|---|---|
| POST /customers | Create customer endpoint |
| GET /customers/ | List customer endpoint |
| GET /customers/:id | Retrieve customer endpoint |
| PUT /customers/:id | Update customer endpoint |
| DELETE /customers/:id | Delete customer endpoint |
The Customer Resource
{
"id": "cus_BbXnRnF9r577BBFFuNsDFvXvBes1Aee1",
"resource": "customer",
"billing_statement_prefix": "PKYG9MA2",
"billing": null,
"email": "juan@gmail.com",
"currency": "PHP",
"livemode": false,
"metadata": null,
"name": "Juan Dela Cruz",
"next_billing_statement_sequence_number": "1",
"created_at": 1721726975,
"updated_at": 1721726975
}
Attributes
id string
Unique identifier for the resource. The prefix is cus_.
resource string
Represents the resource's type. The value is customer.
billing_statement_prefix string
The customer's prefix used to generate unique billing statement numbers.
To learn more about billing statements, you can check this guide.
billing hash
Returns null if the billing is not supplied for the Customer.
Show child attributes
phone string
The billing phone of the customer
address hash
Show child attribute
line1 string
The billing address Line1 of the customer
line2 string
The billing address line2 of the customer
city string
The billing address city of the customer
state string
The billing address state of the customer
postal_code string
The billing address postal code of the customer
country string
The billing address country of the customer in two-letter ISO format.
email string
The customer's e-mail address.
currency string
A three-letter ISO currency code in uppercase. As of the moment, we only support PHP.
livemode boolean
The value is true if the resource's mode is live or the value is false if the resource is in test mode.
metadata hash
A set of key-value pairs attached to the resource. This is useful for storing additional information about the customer.
name string
The customer's name.
next_billing_statement_sequence_number string
The suffix of the customer's next billing statement number, e.g. 0001. PayRex manages this sequence number when you associate a customer with a billing statement.
created_at timestamp
The time the resource was created and measured in seconds since the Unix epoch.
updated_at timestamp
The time the resource was updated and measured in seconds since the Unix epoch.