Developer Documentation
Developer Documentation
Home
PartPay

Client Credentials

This flow is used for server-to-server communication, and is relevant in our merchant API and our instore API.

To obtain a token, make a request to the token endpoint, with a number of properties you’ll be given when starting your integeration with PartPay.

Example

To obtain an access token:

POST https://partpay.au.auth0.com/oauth/token 
Content-Type: application/json

{
  "client_id":"[client id]",
  "client_secret":"[client secret]", 
  "audience":"https://auth.partpay.co.nz",
  "grant_type":"client_credentials"
}

Will return a response ie:

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciO.....",
    "expires_in": 86400,
    "scope": "merchant",
    "token_type": "Bearer"
}

Scopes

Scopes are not requested as part of this flow, instead they will be added to the returned access_token, where the client access allows.

Token Expiry

Access tokens are able to be used for 24 hours until a new one will need to be obtained.