API REFERENCE
Paiements par jeton
Paramètres
| Parameter | Type | Description | Obligatoire |
|---|---|---|---|
| data.pay_method | string | online | ✓ |
| data.sub_pay_method | string | Token | ✓ |
| data.operation | string | 11.Token for sales 12.Token for authorisation; | ✓ |
| data.order_id | integer | 商户的订单ID | ✓ |
| data.sca_exemption | string | LowValue | ✓ |
| data.amount | string | 金额数字。例如 € 24.99 应该写成24.99 | ✓ |
| data.currency | string | 货币代码,ISO 4217,例如EUR,CHF | ✓ |
| data.payment_token_object | string | 支付Token | ✓ |
| data.description | string | 订单描述 | ✓ |
| data.demo | string | 自定义字段 | — |
| data.timeout | string | 过期时间单位分钟(0-1440) | ✓ |
| data.notify_url | string | 支付完成后异步通知地址 | ✓ |
| data.request_id | string | 请求id需保持唯一,建议24以上位数字+字母 | ✓ |
| data.3ds_initiate | string | 01. 开启3ds验证; 02.不开启3DS(需申请开通);03. SCA豁免(需申请开通); | ✓ |
S’applique à l’initiation de paiements par Token avec une carte de crédit
Une fois que le payeur a effectué une transaction standard par carte de crédit sur la page de paiement hébergée de YabandPay et donné son consentement, YabandPay convertit les données sensibles du titulaire en une chaîne numérique aléatoire (un Token) afin de supprimer les informations permettant de l’identifier. Le Token peut être utilisé pour les paiements suivants :
- Les utilisateurs peuvent payer en un clic sur la page de paiement, sans saisir les coordonnées de leur carte.
- Les marchands peuvent utiliser ce Token pour les paiements récurrents, les abonnements et des usages similaires.
[!TIP|style:flat] Workflow
- Activez les paiements par Token. Contactez votre chargé de compte pour activer cette fonctionnalité.
- Obtenez le consentement de l’utilisateur. Lors de l’activation des paiements express (paiements par Token), vous devez informer clairement les consommateurs et obtenir leur consentement afin d’éviter tout litige.
- Obtenez un Token. Commencez par initier une transaction standard par carte de crédit. YabandPay renvoie a payment url. After the user completes payment through that url and gives consent, YabandPay renvoie the Token in an asynchronous notification using the payment_token_object parameter.
- Initiez un paiement par Token. Incluez le Token dans la payment_token_object variable. Si la validation du Token réussit, YabandPay traite le paiement. Dans le cas contraire, YabandPay renvoie une erreur. Dans ce cas, nous recommandons d’initier une nouvelle transaction standard par carte de crédit pour obtenir un Token, puis de relancer le paiement.
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
| user | String | Cashier account UID | Obligatoire |
| sign | String | Signature | Obligatoire |
| method | String | v3.CreateCardPayments | Obligatoire |
| time | Long | Timestamp | Obligatoire |
- Parameters
| Paramètre | Type | Description | Obligatoire |
|---|---|---|---|
| pay_method | String | online | Obligatoire |
| sub_pay_method | String | Token | Obligatoire |
| operation | String | 11.Token for sales 12.Token for authorisation; | Obligatoire |
| order_id | String | Merchant order ID | Obligatoire |
| 3ds_initiate | String | 01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval). | Obligatoire |
| sca_exemption | String | LowValue | 3ds_initiate=03 Required |
| amount | String | Amount as a numeric string. For example, enter 24.99 for € 24.99. | Obligatoire |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Obligatoire |
| payment_token_object | String | Payment Token | Obligatoire |
| description | String | Order description | Obligatoire |
| demo | String | Custom field | Facultatif |
| timeout | String | Expiration time in minutes (0-1440) | Obligatoire |
| notify_url | String | Asynchronous notification URL after payment | Obligatoire |
| request_id | String | Unique request ID; a combination of digits and letters at least 24 characters is recommended | Obligatoire |
Signature example:
Sorted parameters concatenated into a URL-style query string
"3ds_initiate=01&amount=1¤cy=EUR&description=test&method=v3.CreateCardPayments¬ify_url=https://www.yabandpay.com/notify&operation=11&order_id=1725875543&pay_method=online&payment_token_object=VnXaRabcsedfsSlPFZXavcsdfasdEFDd&request_id=hjf5lv32i40lh7oh86j6az98tnscwv37&sub_pay_method=Token&time=1725875543&timeout=0&user=YOUR_CASHIER_UID"
Sign stringA using secret_key
Le champ resulting signature is:
"YOUR_SIGNATURE"
Exemple de requête:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreateCardPayments",
"time": 1725875543,
"data": {
"3ds_initiate": "01",
"description": "test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Token",
"operation": "11",
"order_id": 1725875543,
"amount": "1",
"currency": "EUR",
"payment_token_object": "VnXaRabcsedfsSlPFZXavcsdfasdEFDd",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "hjf5lv32i40lh7oh86j6az98tnscwv37"
}
}
Exemple de réponse:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "109bb0e9-e1fb-49cb-c537-ec944f33c388",
"amount": "1.00",
"currency": "EUR",
"state": "paid"
},
"message": "",
"response_id": "202409091752241912726578"
}
Informations complémentaires:
MIT & CIT :
MIT = Merchant Initiated subsequent transactions. Token payments initiated by the merchant.
CIT = Cardholder Initiated Subsequent transactions. Token payments involving the customer. When activating payments, specify whether you need MIT or CIT so the appropriate mode can be configured.
Résultat de la réponse:
-
Une requête réussie renvoie "status": true.
-
Si l’appel échoue, "status": false est renvoyé. If you receive Invalid Token, we recommend calling HPP Token again to obtain a new Token.
Le champ API returns the payment status synchronously. Nous recommandons vivement d’utiliser à la fois Order Query and Asynchronous Notifications afin de synchroniser et mettre à jour le statut du paiement et de maintenir les informations exactes en temps réel. a) If the order status state is paid, payment succeeded; b) if the order status state is authorized, authorization succeeded. To capture funds after successful authorization, call the authorization capture API.
3DS low-value exemption:
Les transactions respectant les limites suivantes peuvent être considérées comme des transactions de faible montant. Si le montant de la commande est inférieur ou égal au plafond applicable ci-dessous, le code de transaction 02 (low-value exemption) peut être utilisé sous réserve d’approbation.
| # | Currency | Amount |
|---|---|---|
| 1 | EUR | 30 |
| 2 | DKK | 225 |
| 3 | GBP | 27 |
| 4 | SEK | 310 |
| 5 | ISK | 5000 |
| 6 | NOK | 325 |
| 7 | CHF | 32 |
| 8 | PLN | 135 |
| 9 | USD | 36 |
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -1000 | Internal error |
| false | -403 | The signature Error |
| false | -2001 | The user not exist |
| false | -3001 | Required field is missing |
| false | -4118 | Incorrect request ID |
| false | -4119 | Invalid Token |
| false | -4120 | No operational permissions |
