How do I connect to the API?

Connecting to API

To be able to use and connect to the API there are few requirements.

  • Application has to be created.
  • Client ID is required.
  • Client Secret is required.
  • Access Token is required.

The Client ID and Client Secret are generated after the application is created on the My apps page. The Client ID and Client Secret can be found when clicking the app icon after the app is created. The Access Token must be retrieved by using the MobilePay Invoice or/and MobilePay Subscriptions API. Please read the respective documentation how to do this. The token generation process is also briefly discussed in API Authentication section.

  • API generates the access code after the user gives the consent in OAuth2 flow.
  • The code is sent to authentication endpoint and it then returns the access token.

When making requests, the Client ID, Client Secret, and Access Token are sent in a header of each request. Note that both, Client ID and Secret are always sent, in every single request that is made towards the API.