Creating tokens

Once the customer logs in, we will redirect them to your 'RedirectUri' defined in the front end JS. This should be a server side endpoint where you will consume the authorization_code then make a /tokens call to obtain customer access_token and refresh_token.

Refreshing tokens

For each page loading the Zip account / payment buttons (showing account balance for logged in users), you will need to use the stored [refresh_token] to generate a new access_token each new session or after 30mins.

Useful notes

  • This request requires the 'content-type': 'application/x-form-www-urlencoded'
  • client_id and client_secret are Zip provided values. Please request these if you do not already have them.
Response
  • Id_Token STRING

  • Access_Token STRING

    Short life token to be used for /charges /accounts /userinfo API calls.

  • Expires_In DOUBLE

  • Token_Type STRING

  • Refresh_Token STRING

    Long life token to be stored used to create a new access tokens for future /charges and account functions.

Language