ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
Creates or updates (upserts) a customer with a specified ID.
If the customer already has an identifier within your system, and you want to create a customer with a specified ID — use this operation to prevent duplicate customers. For more information, see Prevent duplicate customers.
Write-only payment token. If supplied, the token is converted into a payment instrument, and its ID is assigned to defaultPaymentInstrumentId value. The value of this property overrides the defaultPaymentInstrumentId if both are supplied. This token may only be used once before it expires.
Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.
{ "foo": "bar" }
Email addresses for notification delivery in event-based email notifications. When you configure event-based email notifications, you can send to these addresses, the customer's primary email address, or another email address you specify. For more information, see Manage notification emails.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/customers/{id}
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/customers/{id}
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/customers/{id}
curl -i -X PUT \
'https://www.rebilly.com/_mock/catalog/all/customers/{id}' \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
"paymentToken": "string",
"defaultPaymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N",
"preferredPayoutInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N",
"customFields": {
"foo": "bar"
},
"primaryAddress": {
"firstName": "Benjamin",
"lastName": "Franklin",
"organization": "Rebilly",
"address": "36 Craven St",
"address2": "string",
"city": "Austin",
"region": "Texas",
"country": "GB",
"postalCode": "WC2N 5NF",
"phoneNumbers": [
{
"label": "main",
"value": "1-512-777-0269",
"primary": true
}
],
"emails": [
{
"label": "main",
"value": "rebilly@example.com",
"primary": true
}
],
"dob": "1980-04-01",
"jobTitle": "CEO"
},
"locale": "fr-FR",
"taxNumbers": [
{
"type": "eu-vat",
"value": "GB980780684",
"isDefault": true
}
],
"leadSource": {
"medium": "string",
"source": "string",
"campaign": "string",
"term": "string",
"content": "string",
"affiliate": "string",
"subAffiliate": "string",
"salesAgent": "string",
"clickId": "string",
"path": "string",
"referrer": "https://www.rebilly.com"
},
"personId": "prs_0YV7DDSDD1C8DA64KHH2W33CPF",
"notificationEmails": [
"user@example.com"
]
}'ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.
{ "foo": "bar" }
Company information that is associated with the customer's primary email address domain.
This is a paid feature, to enable it contact Rebilly.
Total number of approved payments made by the customer. Payments are the result of sale or capture transactions.
Date and time when the customer made their last approved payment. Payments are the result of sale or capture transactions.
Total number of invoices issued to the customer. This value is auto-incrementing. If this value is 0, the record relates to a lead. A lead is a customer who has not made a payment yet. If this value is greater than or equal to 1 the record relates to a customer.
Unique organization identifier. An organization is an entity that represents a company. For more information, see Obtain an organization ID.
Email addresses for notification delivery in event-based email notifications. When you configure event-based email notifications, you can send to these addresses, the customer's primary email address, or another email address you specify. For more information, see Manage notification emails.
{ "id": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "email": "user@example.com", "firstName": "string", "lastName": "string", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "defaultPaymentInstrument": { "method": "payment-card", "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N" }, "preferredPayoutInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "customFields": { "foo": "bar" }, "primaryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "company": { "name": "string", "domain": "string", "yearFounded": 0, "industry": "string", "employeesCount": 0, "country": "string", "locality": "string", "_links": [ … ] }, "averageValue": { "currency": "USD", "amount": 0.1, "amountUsd": 0.1 }, "paymentCount": 0, "lastPaymentTime": "2019-08-24T14:15:22Z", "lifetimeRevenue": { "currency": "USD", "amount": 0.1, "amountUsd": 0.1 }, "invoiceCount": 0, "tags": [ { … } ], "revision": 0, "hasFulfilledKyc": true, "organizationId": "org_0YVDM8RC7GDADADSBSMW124JA8", "locale": "fr-FR", "taxNumbers": [ { … } ], "personId": "prs_0YV7DDSDD1C8DA64KHH2W33CPF", "notificationEmails": [ "user@example.com" ], "_links": [ { … } ], "_embedded": { "defaultPaymentInstrument": {}, "website": {}, "leadSource": {} } }