Authentication

To initiate use of the API, the first step is to acquire an API Key from Depay. This key uniquely identifies and grants you access to our services. After receiving your API Key, you must then obtain a JWT (JSON Web Token), which is essential for authenticating and authorizing your subsequent interactions with the API. This process ensures that access is both secure and tailored to your specific needs.

For example

Logs user into the system

GET https://api.depay.us/auth/token

Returns a Bearer Token needed to authenticate along the API Endpoints.

Headers

Name
Type
Description

x-api-key*

String

DEPAY-6b262934b78d849dc9cfd114c4c44029563cb972432b5dde1ef4494f63cb97243

{
    "response": {
        "expiresIn": "3600",
        "accessToken": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluaXN0cmFkb3IiLCJzdWIiOjI0LCJyb2xlIjoiYWRtaW4iLCJ1dWlkIjoiM2I5ZjJiNTQtZTQzYS00MTBmLTkzZGMtYzQxY2MwYTI5MzhiIiwiY3VzdG9tZXJfdXVpZCI6IjU1NzY1YjRjLWFjNGMtNGJmNS1hYWQ0LTE3NDA4OGI4ZDk5MSIsImlhdCI6MTY4Njc5ODc0NCwiZXhwIjoxNjg2ODg1MTQ0fQ.oG3pN7ppsfUpGStvUyYt1AaJiL-fqmhoYi2viTgn0ZnMYylYVH3Nc7WuzHiW4ccS",
        "refreshToken": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJzdWIiOjI0LCJpYXQiOjE2ODY3OTg3NDQsImV4cCI6MTY4NzQwMzU0NH0.VJNg-gGsoCVG0H-JCD9CM2K-TIVU3u3WdiO9QIRTn-xLtF-H4G2b2fbKTkpwt5t_"
    }
}

The returned Bearer Token is required for authentication across all API endpoints. It should be included in the Authorization header of each request.

For example:

GET /orders/
Host: https://api.depay.us
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJtYXJjZWxvIiwiaWF0IjoxNjgxMjcyMjM0LCJleHAiOjE2ODEyNzU4MzR9.S87xtVRwo823p3hPpHFUskL4Rbru_NQA5001LfvMmvI

Last updated