v1

latestOpenAPI 3.0.02026-08-0696238481.7 KB
Customers

Update a customer by Id

This is used to update an existing customer

patch/customers/{customerId}

Path parameters

customerIdstring required
Example:cus_01FCTS1XMKH9FF43CAFA4CXT3P

Customer to update

Request body

firstNamestring nullable

The first name of the customer

lastNamestring nullable

The last name of the customer

homePhoneNumberstring nullable

The home phone number of the customer. Must be in E.164 format

mobilePhoneNumberstring nullable

The mobile phone number of the customer. Must be in E.164 format

metadataobject nullable

use this parameter to attach key-value data to the customer. These will be sent with any associated customer events on your webhooks. You can have a maximum of 5 pieces of metadata.

defaultPaymentMethodstring nullable

The Id of the customer's preferred/default payment method

Example request

{
  "firstName": "Jeff",
  "lastName": "Bridges",
  "homePhoneNumber": "+447900000000",
  "mobilePhoneNumber": "+447900000000",
  "metadata": {
    "customerId": "1",
    "registered": "123"
  },
  "defaultPaymentMethod": "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ"
}

Response

Successfully updated the given Customer

idstring

The ID of the customer

emailstring email

The customer's email address

firstNamestring nullable

The first name of the customer

lastNamestring nullable

The last name of the customer

homePhoneNumberstring nullable

The home phone number of the customer. In E.164 format

mobilePhoneNumberstring nullable

The mobile phone number of the customer. In E.164 format

defaultPaymentMethodstring nullable

The Id of the customer's preferred/default payment method

metadataobject nullable

use this parameter to attach key-value data to the customer. These will be sent with any associated customer events on your webhooks. You can have a maximum of 5 pieces of metadata.

createdTimestampinteger

The epoch timestamp (seconds) when the customer was created

Example response

{
  "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ",
  "email": "test@ryftpay.com",
  "firstName": "Jeff",
  "lastName": "Bridges",
  "homePhoneNumber": "+447900000000",
  "mobilePhoneNumber": "+447900000000",
  "defaultPaymentMethod": "pmt_01G0EYVFR02KBBVE2YWQ8AKMGJ",
  "metadata": {
    "customerId": "1",
    "registered": "123"
  },
  "createdTimestamp": 1470989538
}