<[object Object]>

# Authentication

Authentication grants you authorization to access endpoints for PesaWay Payment Request, Collection, Transaction and Customer. You can generate an access token by making a GET call to the following endpoint:

Test Endpoint:

https://api.sandbox.pesaway.com/api/v1/token/

The following parameters are expected:

Request Parameters Field Description Example
consumer_key A credential generated to identify a merchant's integration application 997aed35-8f03-4f87-9673-2bd58b0dd532
consumer_secret A credential used to authenticate a merchant's application Sy3pf64cFzPa6^Kx%tJ2HpX^\*!7@lq
grant_type Method through which the API grants Access Tokens client_credentials

Above parameters are put under params.

# Request sample

curl --location --request POST 'https://api.sandbox.pesaway.com/api/v1/token/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "consumer_key": "test-consumer-key",
    "consumer_secret": "test-consumer-secret",
    "grant_type": "client_credentials"
}'

Response Parameters Field Type Description
expires_in Numeric Token expiry time in seconds
token String Access token to access other API resources
{
  "access_token": "qYrRg0v5UiznRFyplcrrfAd6urHQwD",
  "expires_in": 3600
}