Skip to content
gist.link ↗

createCustomer

Mutation Pay API — POST https://pay.api.gist.link/graphql

Create a billing customer. ROLE_ADMIN or ROLE_PAY_MANAGER.

pay:mutation:createCustomer

The calling IAM key must hold this permission (or a wildcard that covers it: pay:mutation:* or pay:*) and the access token must have been minted with audience=pay. See Permissions.

type Mutation {
createCustomer(input: CustomerInput!): Customer!
}
Argument Type Required Description
input CustomerInput! Yes —

Customer! — see the Pay types reference.

Terminal window
curl https://pay.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation CreateCustomer($input: CustomerInput!) { createCustomer(input: $input) { id uuid name email created_at updated_at } }",
"variables": {
"input": {
"name": "Example",
"email": "ada@example.com",
"tax_ids": {}
}
}
}
JSON