Cashramp
  • Introduction
    • Getting Started
    • Payment Rails
    • API Endpoints
    • Authentication
    • Webhooks
    • Integration Guide
    • SDKs
  • Hosted Ramp
    • Overview
    • Deposits
    • Withdrawals
    • Cancel Payment
  • Direct Ramp
    • Overview
    • Ramp Quotes
    • Deposit
  • Onchain Ramp
    • Overview
    • On-Off Ramp
  • Cashramp API
    • Queries
    • Customers
    • Payment Methods
    • Withdraw Onchain
Powered by GitBook
On this page
  • Create a Customer
  • List Customers
  1. Cashramp API

Customers

Create a Customer

mutation {
  createCustomer(
    email: "test@example.com"
    firstName: "John"
    lastName: "Doe"
    country: "VHlwZXM6OkNvdW50cnktNjNjNTQyZDUtOTRhZC00NWIyLWE0YzQtOWI5ZGExOTU5ZjA1"
  ) {
    id
    email
    firstName
    lastName
  }
}
Argument
Type
Required
Description

email

String!

Yes

Customer’s email (must be unique per account).

firstName

String!

Yes

First name.

lastName

String!

Yes

Last name.

country

ID!

Yes

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
      }
    }
  }
}

PreviousQueriesNextPayment Methods

Last updated 2 days ago

Global ID of a country from .

availableCountries