Initializing a single payment request
The merchant website initiates a payment request via a call to the Charge/CreatePayment Web Service.
In response, the merchant server retrieves a formToken, an encrypted object allowing to initialize the embedded form with the transaction details and the details corresponding to the shop configuration.
Use the fields below to build your request:
Field name | Description | Required |
---|---|---|
formAction | Type of desired behavior when a transaction is being created. Must be set to PAYMENT. | No |
amount | Amount to be paid, expressed in the smallest currency unit (cents for euro). | Yes |
currency | Payment currency. ISO 4217 alpha-3 code. E.g.: “EUR” for euro | Yes |
orderId | Order reference. This field is recommended. | No |
customer.email | E-mail address that will be used for sending the payment receipt to the buyer. This field is recommended. | No |
customer.reference | Buyer ID on the merchant website. This field is recommended. | No |
customer.billingDetails | Object containing details of the billing address. This field and its attributes are recommended. | No |
customer.shippingDetails | Object containing the details of the billing address. This field and its attributes are recommended. | No |
customer.shoppingCart | Object containing the details of the shopping cart. This field and its attributes are recommended. | No |
transactionOptions.cardOptions.manualValidation | Payment validation mode. | No |
transactionOptions.cardOptions.captureDelay | Capture delay. Any capture delay that exceeds 7 days will be ignored and reduced to 7 days. | No |
In order to obtain a more detailed description of the fields to use, test the Charge/CreatePayment Web Service using our playground.
Example of a request:
POST https://api.systempay.fr/api-payment/V4/Charge/CreatePayment
{ "amount": 1715, "currency": "EUR", "formAction": "PAYMENT", "orderId": "CMD012859" "customer": { "reference": "104123487", "email": "sample@example.com", "billingDetails": { "category": "PRIVATE", "firstName": "Jeanne", "lastName": "Gauthier", "phoneNumber": "0123456789", "cellPhoneNumber": "0612345678", "streetNumber": "109", "address": "Rue de l'innovation", "zipCode": "31670", "city": "Labège", "country": "FR", "language": "fr" }, "shoppingCart": { "cartItemInfo": [ { "productLabel": "La Végétarienne", "productType": "FOOD_AND_GROCERY", "productRef": "ZJJ5520", "productQty": 1, "productAmount": "1273" } ] }, "shippingDetails": { "firstName": "Jeanne", "lastName": "Gauthier", "phoneNumber": "0612345678", "address": "Rue de l'innovation", "streetNumber": "109", "zipCode": "31670", "city": "Labège", "country": "FR", "shippingMethod": "PACKAGE_DELIVERY_COMPANY" } } }
Example of a response
{ "webService": "Charge/CreatePayment", "version": "V4", "applicationVersion": "5.25.0", "status": "SUCCESS", "answer": { "formToken": "02izOLcBypiLCJWSVNBX0RFQklUIiwiVklTQV...", "_type": "V4/Charge/PaymentForm" }, "ticket": "111a64d6eb464bb8841f1c325af503af", "serverDate": "2021-06-29T12:37:33+00:00", "applicationProvider": "NPS", "metadata": null, "mode": "TEST", "serverUrl": "https://api.systempay.fr/", "_type": "V4/WebService/Response" }