TarsPay_EN
  1. deposit
TarsPay_EN
Indonesia🇮🇩
  • 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

Collection method categories and return value description of the collection order interface#

Collection method categoriesReturn value description
Bank VA category
Bank VA
payData: Bank's VA number, merchants need to build their own payment details page
payUrl: TarsPay's VA payment details page
E-wallet category
Ewallet
OVO
    payData: TarsPay's OVO fills in the mobile phone number to push the bill payment details page
     payUrl: TarsPay's OVO fills in the mobile phone number to push the bill payment details page
DANA and LINKAJA
    payData: Official native jump link (wake up APP)
    payUrl: Official jump link (wake up APP)
QR code
QRIS
payData: QR code image, merchants need to build their own payment details page
payUrl: TarsPay's QRIS payment details page

Note:#

The specific return value of each collection method varies according to actual business needs.
Please make sure to correctly configure the payData and payUrl fields in actual use.
payData builds the payment details page for the merchant itself. The core data of the payment uses the value returned by the interface. The payUrl is the payment details page that the merchant has not paid, but uses TarsPay's payment details page.

Collection method code:#

Bank type code#

Bank codeBank name
BANK_BCABANK BCA
BANK_BNIBANK BNI
BANK_BRIBANK BRI
BANK_BSIBANK BSI
BANK_CIMBBANK CIMB
BANK_MANDIRIBANK MANDIRI
BANK_DANAMONBANK DANAMON
BANK_PERMATABANK PERMATA

Wallet type code#

E-wallet codeE-wallet name
EWALLET_DANAEWALLET DANA
EWALLET_LINKAJAEWALLET LINKAJA
EWALLET_OVOEWALLET OVO
EWALLET_SHOPEEPAYEWALLET SHOPEEPAY

Convenience store (mart) type code#

Convenience store codeConvenience store name
MART_ALFAMART ALFA
MART_INDOMART INDO

Scan code (qris) type code#

Scan code codeScan code name
QRISQRIS

Limit information#

Collection amount rules
Collection channelMinimum single transactionMaximum single transaction
BANK10,00050,000,000
EWALLET10,00010,000,000
QIRS10,00010,000,000
MART-Debit Card10,0005,000,000
MART-Cash10,0002,500,000

Request

Header Params
X-API-KEY
string 
required
The public key applied by the merchant backend
Example:
02106af2a085fbfc6d1bb49f485205fcdfcc79a4ddb1913c72a271fedd24c2d7fe
X-API-NONCE
string 
required
System timestamp accurate to milliseconds
Example:
1702279880267
X-API-SIGNATURE
string 
required
sign
Example:
304502207a4a88a5b0def29b9dbbf8563112d090c0e0b793ff6a5c57fe9d4fd1254d8ecf022100ff63c279f5926069fa1d161598e8d3249cb90e9d728e88e514352cdae6feff72
Body Params application/json
amount
string 
Amount
required
body
string 
Product description
required
currency
string 
Currency
required
Fixed IDR
customerAccountNumber
string  | null 
User bank card
optional
customerContact
string  | null 
User mobile phone
optional
Can be empty. If this field is not empty, EWALLET_DANA and EWALLET_LINKAJA orders must be filled in according to the format: 628 or 08, a total of 10-13 digits
customerEmail
string  | null 
User 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  | null 
Page address of the merchant returned from the payment details page
optional
subject
string 
Product title
required
wayCode
string 
Payment method code
required
Reference collection method code
Example
{
    "amount": "string",
    "body": "string",
    "currency": "string",
    "customerAccountNumber": "string",
    "customerContact": "string",
    "customerEmail": "string",
    "customerName": "string",
    "mchNo": "string",
    "mchOrderNo": "string",
    "notifyUrl": "string",
    "returnUrl": "string",
    "subject": "string",
    "wayCode": "string"
}

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: 02106af2a085fbfc6d1bb49f485205fcdfcc79a4ddb1913c72a271fedd24c2d7fe' \
--header 'X-API-NONCE: 1702279880267' \
--header 'X-API-SIGNATURE: 304502207a4a88a5b0def29b9dbbf8563112d090c0e0b793ff6a5c57fe9d4fd1254d8ecf022100ff63c279f5926069fa1d161598e8d3249cb90e9d728e88e514352cdae6feff72' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": "string",
    "body": "string",
    "currency": "string",
    "customerAccountNumber": "string",
    "customerContact": "string",
    "customerEmail": "string",
    "customerName": "string",
    "mchNo": "string",
    "mchOrderNo": "string",
    "notifyUrl": "string",
    "returnUrl": "string",
    "subject": "string",
    "wayCode": "string"
}'

Responses

🟢200成功
application/json
Body
code
integer 
Response Code
optional
0 = Success, Non-0 = Failure
data
object 
Response Data
optional
amount
string 
Order Amount
optional
body
string 
Product Description
optional
countryCode
string 
Country Code
optional
currency
string 
Currency
optional
Fixed value: IDR
customerContact
string 
User Phone Number
optional
mchOrderNo
string 
Merchant Order Number
optional
orderState
integer 
Order Status
optional
payDataType
string 
Payment Mode
optional
payurl = Cashier Desk; Non-payurl = Merchant-built Cashier Desk
payData
string 
Payment Data
optional
When wayCode is BANK, returns bank VA number; when wayCode is QRIS, returns QR code image URL; when wayCode is EWALLET, returns official native jump URL; merchants should handle this field based on the collected payment code.
payOrderId
string 
Payment Platform Order Number
optional
payUrl
string 
Payment Details Page URL
optional
Tarspay payment details page URL
payWays
object 
optional
subject
string 
Product Title
optional
msg
string 
Response Description
optional
sign
string 
optional
Examples
{
    "code": 0,
    "data": {
        "amount": "30000",
        "body": "Test",
        "countryCode": "id",
        "currency": "IDR",
        "customerContact": "123445555",
        "expiredTime": 1702287455,
        "mchOrderNo": "YN45620230300675",
        "orderState": 1,
        "payData": "706675107919",
        "payDataType": "payurl",
        "payOrderId": "P1734130292633829377",
        "payUrl": "https://payment.tpservice.ai/#/order/id/P1734130292633829377",
        "payWays": {
            "bank": [
                {
                    "countryCode": "id",
                    "createdAt": 0,
                    "id": 1,
                    "payCode": "706675107919",
                    "payWay": "BANK_PERMATA",
                    "payWayLogo": "https://tarspay.oss-ap-southeast-1.aliyuncs.com/tarspay_v_1.0/589e70d4-6bc7-447a-97bd-b59b4b752d37.png",
                    "payWayType": "bank",
                    "skipMode": 1,
                    "state": 1,
                    "updatedAt": 0
                }
            ]
        },
        "requestUrl": "https://www.tarspay.com/notify/return",
        "subject": "buycar"
    },
    "msg": "SUCCESS",
    "sign": "304502203601332548ddfad0c75bb47bb2188ffe4c209270eb13fba14555c51bf0b0cae5022100ce4f7aae639a313b5b716d0490ef281987efe4c6c8c75c1515b3418a32e4174a"
}
Previous
Attachment Code Table
Next
Query deposit order status
Built with