riverty logo

Docs

Get Started Login

First Riverty API Call

Before starting, please be sure to:

  1. Create a Riverty Test Account
  2. Have a Test account API Key in the Merchant Portal Test

Let’s start with the simplest request in the Riverty API - GetVersion. GetVersion does not require any input parameters (except your API key) and returns only the version of the API. This example serves as a baseline for future requests and introduces the core concepts in Riverty API.

Generally, all our requests can be tested with Postman, however, you can use any other API-Testing application.

The "Get Version" Call

Insert the https://api.bnpl-pt.riverty.io/api/v3/version to the URL input box and select the corresponding method (GET in this tutorial) from the dropdown list. If the "Send" button is pressed, the request is sent to the Riverty server and the response can be seen in the Postman window.

get Version hell.png

Response Codes and Missing Parameters

As you can see from the picture (and from your Postman window), the server responded with status code 401 Unauthorized and the response body contains an error message. The error appeared because the Riverty API did not know who made the request and did not grant access to its services. To avoid this kind of error, the API key must be provided for authentication. There is a button with the label "Headers (0)" under the URL box. In this tab, it is possible to define the list of all headers which are sent during the request. (0) in the tab label indicates that there are currently no headers.

Test API 3.png

How to provide your Authorization Key

For authentication, the header "X-Auth-Key" must be added to the list of headers. The value of this header will be your personal API key (you can get this key from your sandbox account).

If the request is sent again, the server responds with status code 200 "OK" and the response body contains the version of the current API.

Your API key hell.png

The same request principles apply to the other available requests too.

Do you find this page helpful?