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.

Get access token

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

Retrieves Bearer Token needed to authenticate throughout the API Endpoints.

Headers

Name
Type
Description

x-api-key*

String

DEPAY-6b262934b78d849dc9cfd114c4c44029563cweasd972432b5dde1ef4494f6fghx3

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

Once obtained your accessToken you should use it to authenticate subsequent requests across all API endpoints. In order to do so, it should be included in the Authorization header of each request.

For example:

GET https://stage.api.payments.depay.us/payins/orders/{uuid}
Host: https://stage.api.payments.depay.us
Authorization: Bearer eyJhbGciOiJIUgfzI1NiIsInR5cCI6IkpXVCJ9.eyJzdTRWIiOiJtYXJjZWxvIiwiaWF0IjoxNjgxMjcyMjM0LCJleHAiOjE2ODEyNzU4MzR9.S87xtVRwo823p3hPpHFUskL4Rbru_NQA5001LfvMmvI

Last updated