TarsPay_EN
  1. deposit
TarsPay_EN
Kenya🇰🇪
  • Indonesia🇮🇩
  • India🇮🇳
  • Thailand🇹🇭
  • Philippines🇵🇭
  • Malaysia🇲🇾
  • Vietnam🇻🇳
  • Egypt🇪🇬
  • Bangladesh🇧🇩
  • Kenya🇰🇪
  • Pakistan🇵🇰
  • Brazil🇧🇷
  • Mexico🇲🇽
  • Korea🇰🇷
  • Türkiye🇹🇷
  • 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

Quota Information#

Deposit amount rules
Deposit channelMinimum single transactionMaximum single transaction
CASHIER100250,000
EWALLET_MPESA100250,000
PS: 500,000 per customer per day
If you place an order using the cashier mode, fill in CASHIER in wayCode, and do not need to pass customerContact in the parameters. The returned payUrl is the cashier address. The user needs to fill in the payment mobile number in the cashier. After clicking confirm, you will receive a push bill in M-pesa.
If you place an order using the interface, fill in EWALLET_MPESA in wayCode, and pass customerContact (payment mobile number) in the parameters. After the request is successful, the user will receive a payment bill in M-pesa
Kenya payment mobile number rules: must start with 254, no + sign required

Request

Header Params

Body Params application/json

Example
{
    "amount": "100",
    "currency": "KES",
    "customerAccountNumber": "123456789",
    "customerContact": "01011111111",
    "customerEmail": "xiaohua661085@126.com",
    "customerName": "G D W",
    "mchNo": "M1688443982",
    "mchOrderNo": "AJ56820230300926",
    "notifyUrl": "http://47.241.33.220:8896/tarspay/notify",
    "returnUrl": "https://merchant-test.tarspay.com/#/",
    "wayCode": "CASHIER"
}

Request Code 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-SIGNATURE: 304502203968d3ce6a4c275816fbf71feee790ca4dfb192df71d49e10d6314368470bf79022100b9cacaf8df3fd302bd408b2f0e75c9a54069b3994748b6a31aac1dd3928ff0a6' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": "100",
    "currency": "KES",
    "customerAccountNumber": "123456789",
    "customerContact": "01011111111",
    "customerEmail": "xiaohua661085@126.com",
    "customerName": "G D W",
    "mchNo": "M1688443982",
    "mchOrderNo": "AJ56820230300926",
    "notifyUrl": "http://47.241.33.220:8896/tarspay/notify",
    "returnUrl": "https://merchant-test.tarspay.com/#/",
    "wayCode": "CASHIER"
}'

Responses

🟢200成功
application/json
Body

Example
{
    "code": 0,
    "data": {
        "amount": "100",
        "countryCode": "ke",
        "currency": "KES",
        "customerContact": "01011111111",
        "mchOrderNo": "AJ56820230300926",
        "orderState": 0,
        "payDataType": "payurl",
        "payOrderId": "P1742378977238810625",
        "payUrl": "https://payment-test.tarspay.com/#/order/common/eg/P1742378977238810625",
        "payWays": {
            "EWALLET": [
                {
                    "countryCode": "ke",
                    "createdAt": 0,
                    "id": 60,
                    "payWay": "EWALLET_MPESA",
                    "payWayLogo": "https://tarspay.oss-ap-southeast-1.aliyuncs.com/tarspay_v_1.0/SIM-danamon-vector-logo.png",
                    "payWayType": "ewallet",
                    "skipMode": 1,
                    "state": 1,
                    "updatedAt": 0
                }
            ]
        }
    },
    "msg": "SUCCESS",
    "sign": "3046022100e84f6794f4f91eb26fc719b30e43f5f666ba1d6b2592eda097662eaf371eccbc022100f5cf108b8d21d9cf38581790ff411a4539d7fec9af698dacad76497e3bc7d989"
}
Modified at 2025-04-23 11:04:46
Previous
Attachment Code Table
Next
Query deposit order status
Built with