Comment on page
Access Token
Get a token for our APIs.
First of all you need to request a token to authenticate and use our services.
You can execute the request below with your credentials to get the token.
post
https://api.stage.localpayment.com
/api/token/
Accsess Token
curl --location --request POST 'https://api.stage.localpayment.com
/api/token/' \
--header 'x-version: LPV3' \
--header 'x-forwarded-for: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "USERNAME_PROVIDED_BY_LOCALPAYMENT",
"password": "PASSWORD_PROVIDED_BY_LOCALPAYMENT"
}'
{
"refresh": "example refresh token",
"access": "example access token"
}
Every AccessToken will have a 5 minutes duration.
When the access token expires, you can use the following service to get a new access token
post
https://api.stage.localpayment.com
/api/token/refresh
Refresh
curl --location --request POST 'https://api.stage.localpayment.com
/api/token/refresh/' \
--header 'x-version: LPV3' \
--header 'Content-Type: application/json' \
--data-raw '{
"refresh": "REFRESH_TOKEN_OBTAINED_PREVIOUS_STEP"
}'
Every RefreshToken will have a 24 hours duration.
Last modified 1yr ago