Authentication

Generate a bearer token

Environments

https://api.aplazo.net/api

Generate an authentication token

post

Generates a Bearer token for merchants to authenticate and access subsequent API operations.

Body
apiTokenstringRequired

API token provided to the merchant for accessing BNPL features.

Example: 93e28f44-e452-42df-af85-7a9ffb9f5734
merchantIdintegerRequired

Unique identifier for the BNPL merchant.

Example: 4321
Responses
200
Successfully generated the Bearer token.
application/json
post
POST /auth HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "apiToken": "93e28f44-e452-42df-af85-7a9ffb9f5734",
  "merchantId": 4321
}
{
  "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwcm9kdWN0X3NvbHV0aW9uX2VuZ19vbmxpbmUrYXBsYXpvQGdtYWlsLmNvbSIsInJvbGUiOiJST0xFX01FUkNIQU5UIiwic2Vzc2lvbklkIjoiYjc0YTA0YzgtOTE2Ni00MjE4LWE5N2QtMTk1ZTllYWY0ZTM3IiwiZXhwIjoxNzM1MzIyMDUxfQ.bFfU7OX1Fh5BY767EutTRbeJXJxBg9ZThTZnseO0ijmeaHe-v0ifC5M1hDNkQc__WfPW66ZbTqoO4s2sPzf2mQ"
}

Response Examples

200 - Successful Authentication
Authentication Request
curl --location 'https://api.aplazo.net/api/auth' \
--header 'Content-Type: application/json' \
--data '{
    "apiToken": "93e28f44-e352-42df-af84-7a9ffc9f5734",
    "merchantId": 2639
}'
Response: 200 OK
{
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwcm9kdWN0X3NvbHV0aW9uX2VuZ19vbmxpbmUrYXBsYXpvQGdtYWlsLmNvbSIsInJvbGUiOiJST0xFX01FUkNIQU5UIiwic2Vzc2lvbklkIjoiZWZhMDU2ZmQtYTU0Yi00MGExLTk1MWEtNmZmY2Y4YTY1ZjVmIiwiZXhwIjoxNzM2NzgzNTIwfQ.8Thmx67K9zF0AukYJaTgZ2qZFYUb-MfmsfbyNtw3eiDtOI_Ya88OUXa3vqqI4CpjU5j_Okl3-gcSlLVzI1PO6B"
}
404 - Merchant doesn't exist
Response: 404 Not Found
{
    "timestamp": "2025-01-03T15:58:32.023+00:00",
    "status": 404,
    "error": "Not Found",
    "path": "/api/auth"
}
400 - Merchant isn't approved
Response: 400 Bad Request
{
    "timestamp": "2025-01-03T15:58:32.023+00:00",
    "status": 400,
    "error": "Bad request",
    "path": "/api/auth"
}
400 - Missing field or invalid data type
empty response body

Last updated

Was this helpful?