Select payment methods
Par défaut, l'acheteur a le choix parmi tous les moyens de paiement éligibles (en fonction de la devise, du montant minimum ou maximum, des contraintes techniques) associés à la boutique.
Pour sélectionner les moyens de paiement proposés à l'acheteur, utilisez le champ paymentMethods
, lors la création du formToken (voir : Etape 3 : Créer un formToken).
Consultez le tableau de l'attribut kr-payment-method pour connaître les valeurs des moyens de paiement.
Query examples
Offer only the following payment methods:
payment by cards and PayPal
/en/rest/V4.0/api/kb/authentication.html
https://api.lyra.com/api-payment/V4/Charge/CreatePayment
{ "amount": 10000, "currency": "EUR", "paymentMethods": [ "PAYPAL", "PAYPAL_BNPL", "CARDS" ], "customer": { "email": "sample@example.com" }, "orderId": "myOrderId-1234" }
payment by cards and Alma
/en/rest/V4.0/api/kb/authentication.html
https://api.lyra.com/api-payment/V4/Charge/CreatePayment
{ "amount": 10000, "currency": "EUR", "paymentMethods": [ "ALMA_2X", "ALMA_3X", "ALMA_4X", "ALMA_10X", "ALMA_12X", "CARDS" ], "customer": { "email": "sample@example.com" }, "orderId": "myOrderId-1234" }
payment by cards and Apple Pay
/en/rest/V4.0/api/kb/authentication.html
https://api.lyra.com/api-payment/V4/Charge/CreatePayment
{ "amount": 10000, "currency": "EUR", "paymentMethods": [ "APPLE_PAY", "CARDS" ], "customer": { "email": "sample@example.com" }, "orderId": "myOrderId-1234" }
To view the fields and their description, go to the playground: Charge/CreatePayment (menu on the left).
Une fois le formToken généré, affichez le formulaire de paiement :