Skip to main content

Customer

A customer of the merchant. Two forms use this type. The Customer entity (customer, customers, createCustomer, updateCustomer) holds every field. A payment or subscription holds a copy of the customer's email, name and phone. A subscription takes the copy when it is created. A payment takes it from the customer input of createPayment, else from its billing or shipping details, and fills what is missing from the Customer entity of customerId when the payment is confirmed: a payment created with customerId alone has no copy (null) until then. MONEI does not change the copy when the Customer entity changes. On the copy, the other fields are null. Use the customerId of the payment or subscription to get the Customer entity.

type Customer {
id: ID
email: String
name: String
phone: String
billingDetails: ContactDetails
shippingDetails: ContactDetails
metadata: [KeyValueItem!]
defaultTokenId: ID
createdAt: AWSDateTime
updatedAt: AWSDateTime
}

Fields​

Customer.id ● ID scalar​

Customer ID. null on the copy in a payment or subscription.

Customer.email ● String scalar​

Email address.

Customer.name ● String scalar​

Full name.

Customer.phone ● String scalar​

Phone number. E.164 format (for example +34600000000) is expected, but MONEI does not check it.

Customer.billingDetails ● ContactDetails object​

Billing details. Entity only.

Customer.shippingDetails ● ContactDetails object​

Shipping details. Entity only.

Customer.metadata ● [KeyValueItem!] list object​

Key/value metadata that the merchant set. Entity only.

Customer.defaultTokenId ● ID scalar​

ID of the customer's default saved payment method. When it is not set, the first payment method that the customer saves for future payments becomes the default. Entity only.

Customer.createdAt ● AWSDateTime scalar​

Creation time (ISO 8601). Entity only.

Customer.updatedAt ● AWSDateTime scalar​

Last update time (ISO 8601). Entity only.

Returned By​

createCustomer mutation ● customer query ● updateCustomer mutation

Member Of​

Charge object ● ChargeEventObject object ● CustomersConnection object ● Payment object ● Subscription object ● SubscriptionEventObject object