Payment Gateway – Shopping cart management
Request parameters
To create a new transaction on the HiPay Enterprise Payment Gateway including your shopping cart details, you must send these complementary parameters in your transaction creation call under a JSON “basket” array parameter.
(For further details, please refer to the technical documentation.)
Example
{ "email": "john.doe@hipay.com", "eci": "7", "firstname": "john", "lastname": "doe", "description": "basket integration test", "currency": "EUR", "payment_product": "visa", "orderid": "578cdb0fda266", "cardtoken": "6ce4138d2dc6377738c4765b13b85b424a2608ad", "amount": "52.99", "basket": [ { "european_article_numbering": "4711892728946", "product_reference": "NF-a1690", "name": "My first product", "type": "good", "quantity": 1, "unit_price": 8.99, "discount": 0, "tax_rate": "8.20", "total_amount": 8.99 }, { "european_article_numbering": "4713716322385", "product_reference": "NF-a0351", "name": "My second product", "type": "good", "quantity": 4, "unit_price": 10.5, "discount": -2.5, "tax_rate": "20", "total_amount": 39.5 }, { "product_reference": "SHIP-e23a6", "name": "Shippingfees", "type": "fee", "quantity": 1, "unit_price": 10, "discount": 0, "tax_rate": "0", "total_amount": 10 }, { "product_reference": "DISC-00f5a", "name": "Birthdaygift", "type": "discount", "quantity": 1, "unit_price": 0, "discount": -5.5, "tax_rate": "0", "total_amount": -5.5 } ] }
Maintenance operations
To perform maintenance operations on a transaction including a basket, you must send these complementary parameters in your maintenance call.
(For further details, please refer to the technical documentation.)
Example
{
"operation": "capture",
"orderId": "578ce1871cd30",
"amount": "15.50",
"currency": "EUR",
"basket": [
{
"quantity": 1,
"product_reference": "My product",
"type": "good",
"unit_price": 20.50,
"discount": 0,
"total_amount": 20.50
},
{
"quantity": 1,
"product_reference": "Birthdaygift",
"type": "discount",
"unit_price": -5,
"discount": 0,
"total_amount": -5
}
]
}
API response
In addition to traditional response parameters sent on “order”, “hpayment” or “transaction” APIs, the following parameters will be added at the end of the response if a basket is sent.
(For further details, please refer to the technical documentation.)
Server-to-server notification
In addition to traditional server-to-server notification information sent, the following parameters will be added at the end of the notification if a basket is sent.
(For further details, please refer to the technical documentation.)