Return Split Payment
This API allows merchants to return funds from a successfully created split payment.
[!TIP|style:flat] Note: Each split payment can be returned up to 10 times.
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
Parameter | Type | Description | Required |
---|---|---|---|
user | String | UID of the super admin account | Required |
sign | String | Signature | Required |
method | String | v3.SplitPayment |
Required |
time | Long | Timestamp | Required |
- Parameters
Parameter | Type | Description | Required |
---|---|---|---|
command | String | returnSplitPayment |
Required |
currency | String | Settlement currency of the order | Required |
notify_url | String | URL for asynchronous notifications | Required |
nonce_string | String | Random string (max 32 characters) | Required |
split_id | String | Split payment ID returned after creation | Required |
reference_id | String | Merchant-defined return split ID (max 32 characters, must be unique) | Required |
reference | String | Description (max 128 characters) | Optional |
receivers | String | Split receiver information in JSON format | Required |
receivers.mid | String | MID of the split receiver | Required |
receivers.split_detail_id | String | Split detail ID returned during original split | Required |
receivers.detail_reference_id | String | Return split detail ID defined by merchant | Required |
receivers.split_amount | String | Amount to be returned | Required |
receivers.description | String | Description of the return split | Required |
Signature
The following is an example of a URL-formatted, sorted string used for signature generation:
"command=returnSplitPayment¤cy=EUR&method=v3.SplitPayment&nonce_string=qxg9mzdxxh4pyi9fhb¬ify_url=https://www.yabandpay.com/notify&receivers=[{"mid":111,"split_amount":2,"split_detail_id":"20231229110618372777-1","detail_reference_id":"123456-1","description":"分账回退描述1"},{"mid":222,"split_amount":1,"split_detail_id":"20231229110618372777-2","detail_reference_id":"123456-1","description":"分账回退描述2"}]&reference=19398394598568&reference_id=123456&split_id=20231229110618372777&time=1703829894&trade_id=67943b0b-ca6b-aa96-5fb1-e354975f1ec4&user=9212776037"
Use stringA and secret_key to get stringSign
Get Signature:
"d9e94fe46ab35220316649d746d2cc99b7a5b5cbeeebf840cf192b1a39512604"
Example Request:
{
"user": "9212776037",
"sign": "d9e94fe46ab35220316649d746d2cc99b7a5b5cbeeebf840cf192b1a39512604",
"method": "v3.SplitPayment",
"time": 1703829894,
"data": {
"command": "returnSplitPayment",
"trade_id": "67943b0b-ca6b-aa96-5fb1-e354975f1ec4",
"notify_url": "https://www.yabandpay.com/notify",
"reference_id": "123456",
"reference": "564635235",
"currency": "EUR",
"split_id": "20231229110618372777",
"nonce_string": "qxg9mzdxxh4pyi9fhb",
"receivers": "[{\"mid\":111,\"split_amount\":2,
\"split_detail_id\":\"20231229110618372777-1\",\"detail_reference_id\":\"123456-1\",\"description\":\"分账回退描述1\"},{\"mid\":222,\"split_amount\":1,
\"split_detail_id\":\"20231229110618372777-2\",\"detail_reference_id\":\"123456-1\",\"description\":\"分账回退描述2\"}]"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"user": "9212776037",
"split_id": "20231229110618372777",
"trade_id": "67943b0b-ca6b-aa96-5fb1-e354975f1ec4",
"state": "Success",
"merchant_mid": "123",
"merchant_name": "123",
"reference_id": "123456",
"reference": "564635235",
"split_solution_id": "104",
"notify_url": "https://www.yabandpay.com/notify",
"currency": "EUR",
"created_at": 1703831332,
"receivers": [
{
"merchant_mid": "111",
"merchant_name": "111",
"detail_reference_id": "123456-1",
"split_detail_id": "20231229110618372777-1",
"refund_split_detail_id": "20231229110618372777-1-1",
"split_type": "Return",
"split_amount": "2",
"result": "Success",
"description": "分账回退描述1",
"error_msg": null
},
{
"merchant_mid": "222",
"merchant_name": "222",
"detail_reference_id": "123456-1",
"split_detail_id": "20231229110618372777-2",
"refund_split_detail_id": "20231229110618372777-2-1",
"split_type": "Return",
"split_amount": "1",
"result": "Success",
"description": "分账回退描述2",
"error_msg": null
}
],
"type": "splitRefund"
},
"message": ""
}
- Response Parameters
Parameter | Type | Description |
---|---|---|
user | String | UID of the cashier account |
split_id | String | Split payment ID created by the request |
split_solution_id | String | ID of the split solution |
state | String | Status: Success or Failed |
merchant_mid | String | MID of the splitting merchant |
merchant_name | String | Name of the splitting merchant |
created_at | String | Creation timestamp |
currency | String | Settlement currency of the order |
notify_url | String | Asynchronous notification URL |
reference_id | String | Merchant-defined split ID (max 32 characters) |
reference | String | Description (max 128 characters) |
type | String | Type: splitPayment or splitRefund |
receivers | String | Receiver information in JSON format |
receivers.merchant_mid | String | MID of the split receiver |
receivers.merchant_name | String | Name of the split receiver |
receivers.split_detail_id | String | Split detail ID created by the request |
receivers.detail_reference_id | String | Merchant-defined split detail ID |
receivers.split_type | String | Split type: Split or Return |
receivers.split_amount | String | Split amount |
receivers.result | String | Status: Success or Failed |
receivers.description | String | Description of the split detail |
receivers.error_msg | String | Error message (present only when result is Failed ) |