Technical Documents
Introduction
API Requests
API Response
Base URL
Authentication Endpoint
Payment Endpoint
Introduction
Introduction
The RiverPay Payment REST API enables you to handle crypto payments on your site.The Authentication is with a limited time token and each transaction generated with trackingCode has a limited time from the moment it’s generated.
Before you start using RiverPay API, you must be registered and Business-Gateway settings set up under the panel/businesses page to get the username and password of the gateway via email. This information will be used with all API calls.
API Requests
API Requests
To simplify REST API requests, RiverPay uses HTTP POST method only and returns JSON format only.
API Response
API Response
RiverPay API calls return HTTP status codes. Each REST API request returns an HTTP status code and status field in response JSON body that can be success or error.Base URL
Base URL
The APIs are served over HTTPS. All URLs referenced in the documentation have the following base:https://api.riverpay.ioAuthentication Endpoint
Authentication Endpoint
- Create your business and gateway and get the username and password for the gateway
- Send the “POST” request to get the “access token”
Endpoint
https://api.riverpay.io/api/v1/payment/oauth/token
Request Parameters:
Key | Value |
---|---|
Content-Type | application/json |
Body:
Field Name | Description | Type |
---|---|---|
username | Gateway username (has been emailed) | String |
password | Gateway password (has been emailed) | String |
Success Response Example:
Payment Endpoint
Payment Endpoint
send the “POST” request to get the Payment URLEndpoint:
https://api.riverpay.io/api/v1/payment
Authorization:
Field Name | Description |
---|---|
Bearer Token | access_token from the Authentication request |
Request Parameters:
Key | Value |
---|---|
Content-Type | application/json |
Body:
Field Name | Description | Type |
---|---|---|
orderId | The ID of order in your site | Integer |
amount | The price in $ | Float |
callBackUrl | The address on the site to which the customer will be returned after completing the payment | String |
webhookUrl | The address on the site to which the final status of the transaction will be sent | String |