One-click payment
This mode allows you to create a transaction from an alias. Thanks to the alias, the buyer does not need to re-enter their bank card number.
Prerequisites: create a token
- For more information: Token creation.
Using a token
Request
Sample query
Required fields:
amount : 9.90 €.
alias : champ ,
paymentMethodToken
,= "b6e51ba31f934ac5b25ccad2a52ccd56
,".
/en-EN/rest/V4.0/api/kb/authentication.html
https://github.com/lyra/rest-php-examples/blob/master/www/minimalEmbeddedForm.token.usage.php#L9-L44
https://api.lyra.com/api-payment/V4/Charge/CreatePayment
{ "amount": 990, "currency": "EUR", "paymentMethodToken": "b6e51ba31f934ac5b25ccad2a52ccd56" }
Response
Récupèrez le formToken
pour afficher le formulaire de paiement (Plus d'infos : Afficher le formulaire).
Analysez le résultat du paiement (Plus d'infos : Analyser le résultat du paiement).
Example of a response
{ "shopId": "123456", "orderCycle": "CLOSED", "orderStatus": "PAID", "serverDate": "2023-10-20T13:53:41+00:00", (...) "_type": "V4/OrderDetails" }, (...) "transactions": [ { "shopId": "123456", "uuid": "b72e91826ce14bfd802249d16eb30849", "amount": 990, "currency": "EUR", "paymentMethodType": "CARD", "paymentMethodToken": "b6e51ba31f934ac5b25ccad2a52ccd56", "status": "PAID", "detailedStatus": "AUTHORISED", "operationType": "DEBIT", "effectiveStrongAuthentication": "DISABLED", (...) "_type": "V4/Payment" }
For full details and descriptions of the fields, see the playground: answer/Payment.