API Reference

Authentication

Matic REST API uses auth basic as auth strategy. Here you will learn more details about it.

Our REST API uses Auth Basic as authentication method. To authenticate, you need a pair of credentials that you must previously generate from the admin portal under the Api Keys section in the Settings module available in the sidebar. These credentials will be the consumer key and the consumer secret.

Once you have your credentials you can use the consumer key as the HTTP Basic user and the consumer secret as the password. HTTP basic authentication can be set when using curl in the -u option as key:secret.

You can also send an Authorization header by simply applying a base 64 encode to the key:secret string and putting the generated string in the header value next to the Basic word.

You can see more about the use of credentials in the authentication process in the How to use the API and SDK authentication keys? tutorial.

Base URL

https://api.matic.io/ (Live)
https://api.sandbox.matic.io/ (Sandbox)

Example:
Encoded token: QWxhZGRpbjpvcGVuIHNlc2FtZQ== (Base64("key:secret"))
Header: Authorization
Value: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

curl -G https://api.matic.io/customers/
     -H 'Accept: application/json'
     -H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
     -d 'merchant_id=b849ed2f-1d02-45e0-82f9-4ebef5a5a461'

It is important to mention that for the moment Matic is a platform that can only be used under an IP that is located within the US or Canada territory.

🚧

Notice

Matic is configured to be used with a US or Canada IP address only. If needed for integration and testing, please use a US IP through a VPN.