Documentation/API Reference

API REFERENCE

Create a payment split

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Create a payment split

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters10

Required fields first

Create a payment split

commandRequiredstringdata.commandcreateSplitPayment
trade_idRequiredstringdata.trade_idtrade_id of the paid YabandPay order
split_solution_idRequiredstringdata.split_solution_idID of the payment split solution configured in the management portal
currencyRequiredstringdata.currencySettlement currency of the original order, Settlement Currency
notify_urlRequiredstringdata.notify_urlAsynchronous payment split notification URL
nonce_stringRequiredstringdata.nonce_stringRandom string, no longer than 32 characters
split_completedRequiredintegerdata.split_completedWhether the payment split is complete: 0: No, 1: Yes
reference_idRequiredstringdata.reference_idUnique merchant-defined payment split ID, no longer than 32 characters
receiversRequiredstringdata.receiversPayment split recipient information, a JSON string generated from a two-dimensional array using json_encode
Optional parameters 1
referenceOptionalstringdata.referenceDescription, no longer than 128 characters

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

Tip

YabandPay sends asynchronous notifications from the IP addresses below. We recommend adding them to your firewall allowlist.

8.211.41.31 8.211.10.244 8.211.8.123

This API creates a payment split for a successfully paid YabandPay order.

Tip

Note:

  1. A maximum of 10 payment splits can be created for each payment order;
  1. Before calling this API, you must configure a payment split solution and obtain approval;
  1. When split_completed is 1, the payment split is complete and no further payment splits can be initiated.
ParameterTypeDescriptionRequired
userStringUID of the super administrator accountRequired
signStringSignatureRequired
methodStringv3.SplitPaymentRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
commandStringcreateSplitPaymentRequired
trade_idStringtrade_id of the paid YabandPay orderRequired
split_solution_idStringID of the payment split solution configured in the management portalRequired
currencyStringSettlement currency of the original order, Settlement CurrencyRequired
notify_urlStringAsynchronous payment split notification URLRequired
nonce_stringStringRandom string, no longer than 32 charactersRequired
split_completedStringWhether the payment split is complete: 0: No, 1: YesRequired
reference_idStringUnique merchant-defined payment split ID, no longer than 32 charactersRequired
referenceStringDescription, no longer than 128 charactersOptional
receiversStringPayment split recipient information, a JSON string generated from a two-dimensional array using json_encodeRequired when splitting a payment. Omit this parameter if you only want to mark the order as fully split without providing recipient information.
receivers.midStringmid of the payment split recipientRequired when splitting a payment
receivers.detail_reference_idStringCustom payment split detail number for the recipientRequired when splitting a payment
receivers.split_amountStringPayment split amount; for example, 24.99 should be written as 24.99Required when splitting a payment
receivers.roleStringPayment split recipient roleRequired when splitting a payment
receivers.descriptionStringPayment split detail descriptionOptional when splitting a payment

Recipient roles

receivers.role parameterDescription
1Sub-merchant
2Supplier
3Distributor
4Tax withholding and remittance service
5Technical services
6Influencer
7Other

Signature example:

Sorted parameters concatenated into a URL-style query string

"command=createSplitPayment&currency=EUR&method=v3.SplitPayment&nonce_string=1704693939376&notify_url=https://www.yabandpay.com/notify&receivers=[{"mid":104006,"split_amount":0.01,"role":7,"detail_reference_id":"123456-2","description":"分账描述2"}]&reference=1704693939376&reference_id=1704693939376&split_completed=0&split_solution_id=102&time=1704693939&trade_id=23a199b8-b82b-81b0-a4cd-8485ca4feb3c&user=9212776037"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
    "user": "9212776037",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.SplitPayment",
    "time": 1704693939,
    "data": {
        "command": "createSplitPayment",
        "trade_id": "23a199b8-b82b-81b0-a4cd-8485ca4feb3c",
        "split_solution_id": "102",
        "currency": "EUR",
        "notify_url": "https://www.yabandpay.com/notify",
        "nonce_string": "1704693939376",
        "split_completed": 0,
        "reference_id": "1704693939376",
        "reference": "1704693939376",
        "receivers": "[{\"mid\":104006,\"split_amount\":0.01,\"role\":7,\"detail_reference_id\":\"123456-2\",\"description\":\"分账描述2\"}]"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "user": "9212776037",
        "split_id": "20240108162134979318",
        "trade_id": "23a199b8-b82b-81b0-a4cd-8485ca4feb3c",
        "split_solution_id": "102",
        "state": "Processing",
        "merchant_mid": "102300",
        "merchant_name": "Yaband Telecom B.V.",
        "created_at": "1704702094",
        "currency": "EUR",
        "notify_url": "https://www.yabandpay.com/notify",
        "split_completed": 0,
        "reference_id": "1704693939376",
        "reference": "1704693939376",
        "receivers": [
            {
                "merchant_mid": "104006",
                "merchant_name": "ybtest",
                "split_detail_id": "20240108162134979318-1",
                "detail_reference_id": "123456-2",
                "split_type": "Split",
                "split_amount": "0.01",
                "role": "7",
                "result": "Processing",
                "description": "分账描述2",
                "error_msg": null
            }
        ],
        "type": "splitPayment"
    },
    "message": ""
}
  • Response parameters
ParameterTypeDescription
userStringUID of the cashier account
split_idStringPayment split order number generated when the payment split is created
trade_idStringtrade_id of the YabandPay order
split_solution_idStringPayment split solution ID
stateStringStatus: Processing, Success, Failed, Cancelled
merchant_midStringmid of the merchant splitting the payment
merchant_nameStringName of the merchant splitting the payment
created_atStringCreation timestamp
currencyStringOrder settlement currency, Settlement Currency
notify_urlStringAsynchronous notification URL
split_completedStringWhether the payment split is complete: 0: No, 1: Yes
reference_idStringMerchant's payment split ID, no longer than 32 characters
referenceStringDescription, no longer than 128 characters
typeStringType: splitPayment or splitRefund
receiversStringPayment split recipient information in JSON format
receivers.merchant_midStringmid of the payment split recipient
receivers.merchant_nameStringMerchant name of the payment split recipient
receivers.split_detail_idStringPayment split detail number generated when the payment split is created
receivers.detail_reference_idStringMerchant's payment split detail number
receivers.split_typeStringPayment split type: Split or Return
receivers.split_amountStringPayment split amount
receivers.roleStringPayment split recipient role
receivers.resultStringStatus: Processing, Success, Failed, Cancelled
receivers.descriptionStringPayment split detail description
receivers.error_msgStringError message for the payment split detail; populated when result is Failed