Customers
Create a Customer
mutation {
createCustomer(
email: "[email protected]"
firstName: "John"
lastName: "Doe"
country: "VHlwZXM6OkNvdW50cnktNjNjNTQyZDUtOTRhZC00NWIyLWE0YzQtOWI5ZGExOTU5ZjA1"
) {
id
email
firstName
lastName
}
}Argument
Type
Required
Description
email
String!
Customer’s email (must be unique per account).
firstName
String!
First name.
lastName
String!
Last name.
The mutation returns the new customer’s global id, which you’ll reference in future calls (e.g., adding a payment method).
List Customers
query {
account {
merchantCustomers {
nodes {
id
email
firstName
lastName
}
pageInfo {
endCursor
hasNextPage
}
}
}
}merchantCustomers is a Relay-style connection. To fetch the next page, pass after: <endCursor>:
query {
account {
merchantCustomers(after: "Mg") {
nodes {
id
email
firstName
lastName
}
pageInfo {
endCursor
hasNextPage
}
}
}
}Fetch a single customer
query {
merchantCustomer(email: "") {
id
email
firstName
lastName
}
}Argument
Type
Required
Description
id
ID
The global ID of the customer
email
String
The email address of the customer
Last updated