NAV Navbar
Code

Introduction

PayQin Business API allows you to implement the payqin payment method on your website and thus receive payments from your customers

Merchant payment link

Request

GET {baseUrl}/api/business/merchant
Headers:
Authorization: Bearer <AUTH_TOKEN>

Response

{
  "id": "a1b2c3" ,
  "fee": 10,
  "link": "http://example.com/",
  "notifyUrl": "http://example.com/notify",
  "successUrl": "http://example.com/success",
  "failUrl": "http://example.com/fail",
  "checkOrderUrl": "http://example.com/checkOrder",
  "vendors": [ "vendor1", "vendor2"],
  "secretKey": "Secret Key"
}


Get info (including secret key) about a merchant [Note: Secret key can also be accessed from the PayQin App] [Note: For Please access the Auth segment]

Generate new secret key

[Note: This can also be done from the PayQin App]

Request

POST {base_url}/api/business/merchant/generate-key
Headers:
Authorization: Bearer <MASTER_KEY>
Accept: application/json

Change info (excluding secret key) about a merchant

[Note: This can also be done from the PayQin App]

Request

PUT {base_url}/api/business/merchant

Headers:
Authorization: Bearer <MASTER_KEY>
Accept: application/json

Body

{
  "fee": <Fee Percent in Number>,
  "checkOrderUrl": "String",
  "notifyUrl": "String",
  "successUrl": "String",
  "failUrl": "String",  
  "link": "String"
}

Response

{
  "success": true,
  "merchant": {
    "id": "a1b2c3" ,
    "fee": <Fee Percent in Number>,
    "link": "String",
    "notifyUrl": "String",
    "successUrl": "String",
    "failUrl": "String",
    "checkOrderUrl": "String",
    "vendors": [ "vendor1", "vendor2"]
  }
}

Create a transaction

Request

POST {business_base_url}/business-api/transactions
Header:
Accept: application/json


Body

{
  "shopId": "<your-payqin-id-here>",
  "amount": <Total amount of the transaction>,
  "customerNumber": "<Customer Id with which you can identify the customer>",
  "orderNumber": "<Order Id with which you can identify the order>",
  "signature": "<MD5 Hash with which we know the transaction is initiated by you>"
}

How to create signature?

Response

{
  "transaction" : {
    "id": "<transaction id>",
    "merchant": "<merchant id>",
    "vendor": null,
    "currency": "<CUR>",
    "amount": <amount>,
    "status": "OPEN",
    "orderNumber": "<order number>",
    "customerNumber": "<customer number>",
    "signature": "<signature>",
    "createdAt": "<Date and Time>",
    "feeAmount": "<Fee amount>",
    "feeAmountMerchant": "<Fee amount to merchant>"
  },
  "url": "example.com"
}

Create a MD5 hash of shopId;amount;secretKey You can obtain your secretKey through the App or see the section [Get info (including secret key) about a merchant] or [Generate new secret key] section