Create a token without payment.
API documentation: Charge/CreateToken
Request
Sample query
Required fields:
- currency: EUR.
- buyer's email: "sample@example.com ".
. Recommended fields:
- Order reference: "myOrderId-1234".
- Buyer reference: "myCustomerRef-123456".
/doc/en-EN/rest/V4.0/api/kb/authentication.html
https://github.com/lyra/rest-php-examples/blob/master/www/minimalEmbeddedForm.php#L9-L44
https://api.scelliuspaiement.labanquepostale.fr/api-payment/V4/Charge/CreateToken
{ "currency": "EUR", "customer": { "email": "sample@example.com", "reference": "myCustomerRef-123456" }, "orderId": "myOrderId-1234" }
To view the fields and their description, go to the playground: Charge/CreateToken (menu on left).
Response
Retrieve the formToken
to display the payment form (More info: Display the form ).
At the end of the payment, a VERIFICATION transaction will be created. The alias will be returned in transactions[0].paymentMethodToken (More info: Parsing the payment result ).
Example of a response
{ "shopId": "123456",, "orderCycle": "CLOSED", "orderStatus": "PAID", (...) "_type": "V4/OrderDetails" }, (...) }, "transactions": [ { "shopId": "123456", "uuid": "46a7484af36344e2bf7445915ded1606", "amount": 0, "currency": "EUR", "paymentMethodType": "CARD", "paymentMethodToken": "5a8e308dfdd948c1adfed79d0bcf0b41", "status": "PAID", "detailedStatus": "ACCEPTED", "operationType": "VERIFICATION", (...) "_type": "V4/Payment" }
In this example, the alias (paymentMethodToken field) has the value: "5a8e308dfdd948c1adfed79d0bcf0b41" .
For completeness and field descriptions, see playground: answer/Transaction .