TarsPay_EN
  1. deposit
TarsPay_EN
Pakistan🇵🇰
  • Indonesia🇮🇩
  • India🇮🇳
  • Thailand🇹🇭
  • Philippines🇵🇭
  • Malaysia🇲🇾
  • Vietnam🇻🇳
  • Egypt🇪🇬
  • Bangladesh🇧🇩
  • Kenya🇰🇪
  • Pakistan🇵🇰
  • Brazil🇧🇷
  • Mexico🇲🇽
  • Ban_TEST
  • Access Guide
  • Core Business Process Description
  • Attachment Code Table
  • deposit
    • Create a deposit order
      POST
    • Query deposit order status
      POST
  • withdraw
    • Create withdraw order
      POST
    • Query withdraw order
      POST
  • account
    • Query balance
      POST
  • CallBack
    • Callback notification interface (customized by the merchant)
      POST
  1. deposit

Create a deposit order

POST
/api/pay/unifiedOrder

Limit information#

Amount collection rules
Agency collection channelsMinimum single transactionMaximum single transaction
jazzcash10050,000
easypaisa10050,000

Request

Header Params
X-API-KEY
string 
required
the public key applied for by the merchant backend
Example:
0221f85d6a09945403ef161b5200f4df152935a748ce2b9f291bb2d351d709b6a0
X-API-NONCE
string 
required
the system timestamp is accurate to milliseconds
Example:
1704250498993
X-API-SIGNAT URE
string 
required
signature
Example:
304502203968d3ce6a4c275816fbf71feee790ca4dfb192df71d49e10d631436 8470bf79022100b9cacaf8df3fd302bd408b2f0e75c9a54069b3994748b6a31aac1dd3928ff0a6
Body Params application/json
amount
string 
Amount
required
Must be an integer
currency
string 
Currency
required
Fixed to PKR
customerContact
string  | null 
User's mobile phone
optional
Starting with 03, a total of 11 digits, if filled in, must be true
customerEmail
string  | null 
User's email
optional
customerName
string  | null 
User name
optional
mchNo
string 
Merchant number
required
mchOrderNo
string 
Merchant order number
required
notifyUrl
string 
Result notification address
required
returnUrl
string 
Cashier return page
required
wayCode
string 
Payment method code
required
Payment method (easypaisa, jazzcash)
step
number 
Payment mode
required
Fixed value: 0 or 1
1: Interface mode, merchants let users fill in their wallet accounts in the self-built cashier, and the official will directly push the bill for payment after submission (in this mode, the customerContact field must be required and true)
0: Go to the TarsPay cashier, the user opens the cashier address and fills in the user wallet account and submits it, and the official pushes the bill for payment
Example
{
    "amount": "20",
    "currency": "PKR",
    "customerContact": "03001234567",
    "customerEmail": "caizhuch1199w@gmail.com",
    "customerName": "GDW",
    "mchNo": "M1677225721",
    "mchOrderNo": "BJST73520250300058",
    "notifyUrl": "http://47.241.33.220:8896/tarspay/notify",
    "returnUrl": "https://47.241.33.220:8896/notify/return",
    "wayCode": "easypaisa"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/pay/unifiedOrder' \
--header 'X-API-KEY:  0221f85d6a09945403ef161b5200f4df152935a748ce2b9f291bb2d351d709b6a0' \
--header 'X-API-NONCE:  1704250498993' \
--header 'X-API-SIGNAT URE: 304502203968d3ce6a4c275816fbf71feee790ca4dfb192df71d49e10d631436 8470bf79022100b9cacaf8df3fd302bd408b2f0e75c9a54069b3994748b6a31aac1dd3928ff0a6' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": "20",
    "currency": "PKR",
    "customerContact": "03001234567",
    "customerEmail": "caizhuch1199w@gmail.com",
    "customerName": "GDW",
    "mchNo": "M1677225721",
    "mchOrderNo": "BJST73520250300058",
    "notifyUrl": "http://47.241.33.220:8896/tarspay/notify",
    "returnUrl": "https://47.241.33.220:8896/notify/return",
    "wayCode": "easypaisa"
}'

Responses

🟢200成功
application/json
Body
code
integer 
Response Code
required
0 = Success, non-0 = Failure
data
object 
Response Data
required
amount
string 
Order Amount
required
countryCode
string 
Country Code
required
currency
string 
Currency
required
customerContact
string 
User Phone Number
required
mchOrderNo
string 
Merchant Order Number
required
orderState
integer 
Order Status
required
payDataType
string 
Payment Mode
required
payurl = Checkout Page; non-payurl = Merchant-built Checkout
payData
string 
Payment Data
required
payOrderId
string 
Payment Platform Order Number
required
payUrl
string 
Checkout Page URL
required
Return this link to the frontend
payWays
object 
required
msg
string 
Response Message
required
sign
string 
required
Example
{
    "code": 0,
    "data": {
        "amount": "20",
        "body": "Test",
        "countryCode": "pk",
        "currency": "PKR",
        "customerContact": "3001234567",
        "expiredTime": 1742282136,
        "mchOrderNo": "BJST648202503000207",
        "orderState": 1,
        "originalAccountNumber": "123456789",
        "payDataType": "payurl",
        "payOrderId": "P1901532855833436162",
        "payUrl": "https://checkout-s2.pk-bpay.com/pay-v2.php/630848dff40a0f72ce09e448084acdc954b441a3c04b2",
        "payWays": {
            "ewallet": [
                {
                    "countryCode": "pk",
                    "createdAt": 0,
                    "id": 114,
                    "payWay": "easypaisa",
                    "payWayLogo": "https://defipay.oss-ap-southeast-1.aliyuncs.com/easypaisa.png",
                    "payWayType": "ewallet",
                    "skipMode": 2,
                    "state": 1,
                    "updatedAt": 0
                }
            ]
        },
        "requestUrl": "https://www.tarspay.com/notify/return",
        "subject": "Buycar"
    },
    "msg": "SUCCESS",
    "sign": ""
}
Previous
Attachment Code Table
Next
Query deposit order status
Built with