Initiating a payment request for placing an order
Payment requests are initiated via the call to the Charge/CreatePayment Web Service.
The choice of payment upon shipment is made at the moment of requesting payment when placing an order.
It generates an initial transaction of Verification type if the Payment upon shipment use case is transmitted in the request.
In response, the merchant server retrieves a formToken, an encrypted object allowing to initialize the form with the transaction details and the details corresponding to the shop configuration.
Use the fields below to build your request:
Field name | Description |
---|---|
formAction | Type of desired behavior when a transaction is being created. Must be set to PAYMENT. |
amount | Amount to be paid, expressed in the smallest currency unit (cents for euro). |
currency | Payment currency. ISO 4217 alpha-3 code. E.g.: “EUR” for euro |
orderId | Order reference. |
useCase | Allows to specify a payment upon shipment with multiple authorizations. Expected value: SHIPMENT_MULTIPLE_AUTHORISATION |
ipnTargetUrl | Allows to override the instant payment notification (IPN) in the form. |
paymentMethods | Type of payment method. |
customer.email | E-mail address that will be used for sending the payment receipt to the buyer. |
customer.reference | Buyer ID on the merchant website. |
customer.billingDetails.firstName | Buyer’s first name. |
customer.billingDetails.lastName | Buyer’s last name. |
customer.billingDetails.phoneNumber | Buyer’s phone number. |
customer.billingDetails.address | Buyer’s address. |
customer.billingDetails.zipCode | ZIP code. |
customer.billingDetails.city | City. |
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:
https://api.gateway.monetico-retail.com/api-payment/V4/Charge/CreatePayment
{ "amount": 7412, "currency": "EUR", "customer": { "email": "sample@example.com" }, "orderId": "myOrderId-385432", "useCase": "SHIPMENT_MULTIPLE_AUTHORISATION" }