HomeSolutionsCurrenciesExchangeAPIBlogContact
LoginSign Up

Merchant API Developer Guide

PayPax Merchant API is an easy flexible powerful API that allows you to create payments from your website and accept multiple currencies from anywhere

Introduction

PayPax is a worldwide payment system which that supports multiple currencies and various payment methods. Some of PayPax features are available for those users they want to automize their jobs and use our payment system in their applications. So we introduce PayPax Merchant API, an easy flexible powerful API that allows you to create payments from your website and accept multiple currencies from anywhere in the world and finally have them in your bank account via our various withdrawal methods or keep them for good.

Overview

PayPax Merchant API has a simple flow and you need to follow just 3 steps for your order to get paid. So here are steps:

  1. First of all you'll need to get your API Key by Creating a merchant.
  2. Create an order in your web application and send it’s info to us via Create Order method
  3. Redirect user to payment gateway and wait for us to inform you about the payment result and then call Confirm Payment method

Constants we used in this documents:

baseURL = https://api.paypax.io/v1/merchant-api/v2

*baseURL is paypax APIs Endpoint's Base URL and will not change frequently

Create Order

First step of starting payment is creating an order. First of all for best-practice you need to create an order in your web application and store it’s data and it must have a ID to be trackable in payment flow. Once you created your internal order. Then pass it’s info such as amount, currency and orderId with some additional options to us.

POST {{baseURL}}/createOrder/:apiKey

Request Body

Field

Type

Decription

amount

String(Numeric)

Required. User will pay this amount in USD Unit

orderId

String

Required. Unique<definitive>  ID of order in your web app

orderPagePrimaryLanguage

String

Required. If you now about your user’s language please tell us about it to show them gateway in proper language. this setting may not be applied in specific situations

description

String

Optional. custom text description about the order

callBackUrl

String

Required. URL which payment result will be sent to that. Success or failure not differs. Result format is described here.

please note that this callBackUrl must be in your registered domain of your merchant info.

autoExchange

Boolean

Optional<DEFAULT:TRUE>. If this option is set to 'true' client paid the order in crypto then we will automatically exchange it before depositing the order amount into your account.

note: orders with amount below 15 USD will not be exchanged automatically.

orders with internal PayPax wallet payment method will not be exchanged automatically.

any failure in exchange process turn this flag into a 'false' state and order will not be exchanged automatically

 

 

Response Body

Field

Type

Decription

ok

Boolean

Always. Will be true if operation was succeed

orderId

string

Unique PayPax order ID. which will be used for future requests and order verification process

trackingId

String(Numeric)

contains identifier of merchant-order in our DB. You may assume this as merchantOrderId and it’s unique per request

paymentUrl

String

contains a url which that you must send user to that in order to start payment process

 

Callback Data(URL Query String)

Field

Type

Decription

success

Boolean | Numeric

Always. Will be true if user payment was succeed

orderId

String(Numeric)

your provided order id(your local order id)*

merchantOrderId

String(Numeric)

order ID of your payment request in our DB which are provided in your initial request to our api

Attention: orderId field may requires to be unique if you choosed order uniqueness check in your merchant dashboard; if order uniqueness option is selected in your merchant dashboard then we do not process your request with an existing preior orderId.

Important Note About OrderID Uniqueness: Double-spending is a potential flaw in a digital cash scheme in which the same single digital token can be spent more than once. So we strongly recommend to enable order uniqueness in your merchant dashboard

Here is a NodeJs Code Example

var axios = require('axios');
var data = JSON.stringify({
  "amount": "100", //in USD
  "description": "hello this is just a text", //required and must be string
  "orderId": "100", //required and must be numeric string
  "orderPagePrimaryLanguage": "en", //required and must be a language code which paypax supports
  "callBackUrl": "https://paypax.io/callmeback" //required and must be a valid url
});

var baseApiUrl='https://api.paypax.io/v1/merchant-api/v2';
var method='/createOrder';
var apiKey='f6719cb3-b64f-411a-a0cd-5f53001df037'; //YOUR API KEY
var config = {
  method: 'post',
  url: baseApiUrl+method+'/'+apiKey,
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Verify & Confirm Payment

Second and the last step of PayPax merchant API payment procedure is verifying and confirming user payment. With this method you are able to verify received data on your defined callback url and finilize user’s payment and complete asset transfers. Here is the request info.

PATCH {{baseURL}}/confirm-payment/:apiKey/:paypaxOrderId

Request Body<EMPTY>

Field

Type

Decription

 

Response Body

Field

Type

Decription

ok

Boolean

Always. Will be true if confirmation process was succeed

orderId

string

unique PayPax order ID

 

Here is a NodeJs Code Example

var axios = require('axios');

var baseApiUrl='https://api.paypax.io/v1/merchant-api/v2';
var method='/confirm-payment';
var orderId='62fa34982fb422ac0e926ac0'; //YOU MUST CHANGE THIS TO INCOMING sessionId IN ORDER TO VERIFY PAYMENT
var apiKey='f6719cb3-b64f-411a-a0cd-5f53001df037'; //YOUR API KEY
var config = {
  method: 'patch',
  url: baseApiUrl+method+'/'+apiKey+'/'+sessionId,
  headers: { 
    'Content-Type': 'application/json'
  },
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Integration

Paypax has multiple integration options for you. You can easily integrate your application with paypax via these provided tools. this list will be updated frequently. if you're interested to contribute development process of integration tools. please let us know in contact us section.

PayPax Wordpress Plugin         PayPax npm Package        PayPax Merchant API PHP Library

 PayPax


PayPax provides individual and business online payment solutions Contact us for all you need


Follow paypax social media :

Links

HomeSolutionsCurrenciesExchange
Resources

AMLTerms of UsePrivacy Policy
paypax on PayPax_On_TrustPilot_Dark
 
We use cookies to ensure a consistent and efficient experience for visitors and to perform essential functions. By clicking "Accept", you agree to our use of cookies. Learn More