Appearance
Authentication
Overview
In order to make any type of transaction with TendoPay's API, you need to be authenticated. Please use the client_id and client_secret provided to you.
You should then be able to generate a JWT by making a POST request to https://sandbox.tendopay.ph/oauth/token like the example below.
Parameters
| Parameter | DataType | Required | Description | Example |
|---|---|---|---|---|
| grant_type | String | Yes | TendoPay Merchant Portal Grant Type | 'client_credentials' |
| client_id | String | Yes | Merchant Client ID | '123456' |
| client_secret | String | Yes | Merchant Client Secret | 'abcdegf' |
Example
Example Request:POST
bash
curl --location --request POST 'https://sandbox.tendopay.ph/oauth/token' \
--data-raw '{
"grant_type": "client_credentials",
"client_id": "{{CLIENT_ID}}",
"client_secret": "{{CLIENT_SECRET}}"
}'
Example Response:200
json
{
"token_type": "Bearer",
"expires_in": 604800,
"access_token": "eyJ0long-access-token....."
}