Introduction
Basic Principles
Welcome to the Marlim RESTful API reference guide!
All calls to our API use common REST verbs and all responses are returned in JSON format.
Payment Types
Payment Links can be seen as an "order" to be paid later. Marlim provides a URL that contains a ready-made Front-End for the customer to make the payment, without the need to implement a checkout.
While Transactions are used if you want to implement a transparent and customized checkout for your needs directly in your application.
Environments
To make requests for both payment types, you have access to two different API keys and two different environments: Sandbox and Production. This way, it's possible to differentiate the environment by choosing the appropriate api_key and base endpoint for the type of transaction you want to perform, following the guidelines below:
Sandbox
https://sandbox.api.marlim.co
Production
https://api.marlim.co
The authentication keys for the production environment have the power to perform any transaction in our API, so it is extremely important that you store them in a secure location, and do not expose them on the client-side of your application.
Authentication
Whenever your application calls one of our endpoints, you must pass your API Key added to the request Header as a form of authentication, using the following format:
"api_key": "your_api_key_value"
Your api_key must be requested from our Support or Development team.
Response Codes
Our API uses standard HTTP codes as a return to indicate the success of a request and to indicate failure.
| Code | Meaning |
|---|---|
| 200 | Everything went as it should and your request was processed successfully. |
| 400 | Some required parameter was not passed or the parameters passed are not correct. |
| 403 | Lack of authorization to access this endpoint. |
| 404 | Endpoint not found or some value not found. |
| 405 | Method not authorized. |
| 408 | 60 seconds timeout reached. |
| 500 | Internal Marlim error, please try again. If it continues, contact us. |
Version
The most current API version is: v3