Authentication
The first step is to acquire an API Key from Depay to initiate use of the API. This key uniquely identifies and grants you access to our services. After receiving your API Key, you must obtain a JWT (JSON Web Token), essential for authenticating and authorizing your subsequent interactions with the API. This process ensures that access is secure and tailored to your needs.
For example
Logs user into the system
GET https://stage.api.payments.depay.us/v2/auth/token
Returns a Bearer Token needed to authenticate along the API Endpoints.
Headers
x-api-key*
String
DEPAY-6b262934b78d849dc9cfd114c4c44029563cweasd972432b5dde1ef4494f6fghx3
{
"expiresIn": "3600",
"accessToken": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluaXN0cmFkb3IiLCJzdWIiOjI0LCJyb2xlIjoiYWRtaW4iLCJ1dWlkIjoiM2I5ZjJiNTQtZTQzYS00MTBmLTkzZGMtYzQxY2MwYTI5MzhiIiwiY3VzdG9tZXJfdXVpZCI6IjU1NzY1YjRjLWFjNGMtNGJmNS1hYWQ0LTE3NDA4OGI4ZDk5MSIsImlhdCI6MTY4Njc5ODc0NCwiZXhwIjoxNjg2ODg1MTQ0fQ.oG3pN7ppsfUpGStvUyYt1AaJiL-fqmhoYi2viTgn0ZnMYylYVH3Nc7WuzHiW4ccS",
"refreshToken": "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJzdWIiOjI0LCJpYXQiOjE2ODY3OTg3NDQsImV4cCI6MTY4NzQwMzU0NH0.VJNg-gGsoCVG0H-JCD9CM2K-TIVU3u3WdiO9QIRTn-xLtF-H4G2b2fbKTkpwt5t_"
}{
"statusCode": 401,
"message": "Forbidden resource",
"error":"Forbidden"
}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 /payments/status
Host: https://api.payments.depay.us
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJtYXJjZWxvIiwiaWF0IjoxNjgxMjcyMjM0LCJleHAiOjE2ODEyNzU4MzR9.S87xtVRwo823p3hPpHFUskL4Rbru_NQA5001LfvMmvILast updated