First step
API Documentation

Information and details needed for access to our API

API Documentation

About API

These endpoints represent the functionality exhibited by Mainloop Pay, both for more traditional API service functionality and for connecting to popular CMSs and related functionality.

Version: 2.0.0

More information:https://pay.mainloop.rs

Connecting to API
Server endpoint

API Root Path: https://pay.mainloop.rs/api/v2/
Endpoint for access to the Mainloop API.

Headers (Identifier)

x-api-keynecessary
You should forward each request via this header.

Content Type: application/json

Generating IPS QR Code

Method: POST

Route: /ipsqr

ParametersObject

  • account stringRequires account number.
  • acceptant stringRequests recipient information.
  • amount stringRequires total price / value.
  • currency stringRequires the currency in which it's paid.
  • payer stringRequests payer information.
  • paymentCode stringRequires a payment code.
  • purpose stringRequires the purpose of payment.
  • model stringRequires a payment model.
  • callOn stringRequires approval number.
Generating a Payment slip

Method: POST

Route: /pay

ParametersObject

  • account stringRequires account number.
  • acceptant stringRequests recipient information.
  • amount stringRequires total price / value.
  • currency stringRequires the currency in which it's paid.
  • payer stringRequests payer information.
  • paymentCode stringRequires a payment code.
  • purpose stringRequires the purpose of payment.
  • model stringRequires a payment model.
  • callOn stringRequires approval number.
API's answer:

Type: Text

Example of an answer: https://pay.mainloop.rs/qr1614025604963.png

Note

All generated images are stored for 7 days from the moment of generation, after which they are permanently deleted

Example of a body to be forwarded:

Example of IPS QR Code

Example of IPS QR Code

Example of Payment slip

Example of Payment slip