API REFERENCE
Retrait
Paramètres
| Parameter | Type | Description | Obligatoire |
|---|---|---|---|
| data.command | string | payout | ✓ |
| data.amount | number | 提款金额,2位小数,例如19.99 | ✓ |
| data.currency | string | 货币代码,ISO 4217,例如EUR,CHF | ✓ |
| data.reference | string | 备注 | ✓ |
| data.notify_url | string | 异步通知地址 | ✓ |
| data.nonce_string | string | 随机字符串,不长于32位 | ✓ |
Cette API permet de retirer des fonds du solde du portefeuille YabandPay.
Conseil
- Le montant du retrait ne doit pas dépasser le solde disponible (utilisable).
- Seuls les comptes super administrateurs du marchand peuvent appeler cette API. Les comptes opérateur et caissier ne sont pas autorisés à l’appeler.
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
| user | String | UID du compte super administrateur | Obligatoire |
| sign | String | Signature | Obligatoire |
| method | String | v3.MerchantBalance | Obligatoire |
| time | Long | Timestamp | Obligatoire |
- Parameters | Paramètre | Type | Description | Obligatoire | |:--- |:--- |:--- |:--- | | command | String | payout | Obligatoire | | amount | String | Montant du retrait, avec 2 décimales, par exemple 19.99 | Obligatoire | | currency | String | Code devise ISO 4217, par exemple EUR ou CHF | Obligatoire | | reference | String | Remarks | Obligatoire | | notify_url | String | URL de notification asynchrone | Obligatoire | | nonce_string | String | Chaîne aléatoire de 32 caractères maximum | Obligatoire |
Exemple de signature :
Paramètres triés et concaténés dans une chaîne de requête au format URL
"amount=100.01&command=payout¤cy=EUR&method=v3.MerchantBalance&nonce_string=2yx20x4c6dswedikxs¬ify_url=https://www.yabandpay.com/notify&reference=456789&time=1708482257&user=036870"
Signer stringA avec secret_key
La signature obtenue est :
"YOUR_SIGNATURE"
Exemple de requête :
{
"user": "036870",
"sign": "YOUR_SIGNATURE",
"method": "v3.MerchantBalance",
"time": 1708482257,
"data": {
"command": "payout",
"nonce_string": "2yx20x4c6dswedikxs",
"amount": 100.01,
"currency": "EUR",
"reference": "456789",
"notify_url": "https://www.yabandpay.com/notify"
}
}
Exemple de réponse :
{
"status": true,
"code": "200",
"data": {
"user": "036870",
"time": 1708482257,
"gateway_name": "YabandPay",
"payout_id": "0594bf99-fce7-3784-28f7-e8e76ad01989",
"currency": "EUR",
"amount": "100.01",
"reference": "456789",
"notify_url": "https://www.yabandpay.com/notify",
"state": "awaiting approval"
},
"message": ""
}
Informations complémentaires :
Description des paramètres de réponse :
| Paramètre | Type | Description |
|---|---|---|
| user | String | UID du compte super administrateur |
| time | String | Horodatage actuel |
| gateway_name | String | Nom de l’établissement de portefeuille |
| payout_id | String | Numéro de l’ordre de versement |
| currency | String | Code devise, norme ISO 4217 |
| amount | String | Montant du retrait |
| reference | String | Remarks |
| notify_url | String | URL de notification asynchrone |
| state | String | Statut de la commande. Il existe actuellement 6 statuts : awaiting approval, pending, failed, completed, declined, cancelled |
