v1

latestOpenAPI 3.0.02026-08-0696238481.7 KB
Customers

Creates a new customer within your account

This is for creating customers within your Ryft account (to enable features such as saved payment methods)

post/customers

Request body

emailstring email required

The customer's email address. Note that these must be unique and are case insensitive

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.

Example request

{
  "email": "example@example.com",
  "firstName": "Jeff",
  "lastName": "Bridges",
  "homePhoneNumber": "+447900000000",
  "mobilePhoneNumber": "+447900000000",
  "metadata": {
    "customerId": "1",
    "registeredTimestamp": "123"
  }
}

Response

The customer was created successfully

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
}