Getting Started

Quickstart

WARNING

GetPaid GraphQL API is in alpha build and is subject to change without warning. While the overall schemas will not vary much, the fields could undergo major revision. (see GraphQL Best Practices for Versioning (opens in a new tab))

Prerequisites

Authentication

To use the GraphQL API provided by GetPaid, you will need to request an access token. Once you have received the token, GetPaid will provide you with the API endpoint. You will also need to provide a valid API key in order to make requests to the API.

The GraphQL endpoint

GraphQL API has a single endpoint:

https://api.getpaid.technology

This endpoint will not change regardless of version or call type.

Making a Call

Communicating with the GraphQL API

GraphQL requires sending data in the form of multiline JSON.

To query GraphQL using cURL, make a POST request with a JSON payload. The payload must contain a string called query (or mutation).

The request must also include a header with Authorization populated with an Access Token.

$>
curl -H "Authorization: bearer <INSERT_TOKEN>" -X POST -d " \
 { \
 \"query\": \"query { viewer { login }}\" \
 } \
" https://api.getpaid.technology

While constructing curl commands is the most basic way of communicating, formatting an object can get cumbersome very quickly. There are many libraries that make this process easier. GetPaid recommends using one of the following libraries:

An Example Query

gql
query{
  user(userId: "USER_ID") {
    id
    active
    email
    name
  }
}

Next Steps

If you have any questions or need to report a bug related to the GetPaid API, please send an email to dev@getpaid.com and we will respond as soon as possible.

Last updated on January 4, 2023