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.)
Format abbreviation | Description |
AN | Alphanumeric characters (a-z, A-Z, 0-9) |
N | Numeric characters only |
R | Decimal number with explicit decimal point, signed |
Field name |
Format |
Req. |
Description |
european_article_numbering |
AN |
|
European article numbering |
product_reference |
AN |
M |
Unique product reference |
type |
AN |
M |
Type of product. - “good” - “discount” - “fee” |
quantity |
N |
M |
Product quantity |
name |
AN |
M |
Product description |
unit_price |
R |
M |
Unit price including taxes in order currency |
tax_rate |
R |
M |
Tax rate in percentage |
discount |
R |
|
Discount amount, always 0 or negative |
total_amount |
R |
M |
Unit price X quantity – discount (The sum of every “total_amount” must be equal to the “amount” sent in the call.) |
product_category |
N |
M(Oney) |
|
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.)
Field name |
Format |
Req. |
Description |
product_reference |
AN |
M |
Unique product reference |
type |
AN |
M |
Type of product - “good” - “discount” - “fee” |
quantity |
N |
M |
Product quantity |
unit_price |
R |
M |
Unit price including taxes in order currency |
discount |
R |
|
Discount amount, always 0 or negative |
total_amount |
R |
M |
Unit price X quantity – discount (The sum of every “total_amount” must be equal to the “amount” sent in the call.) |
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.)
Field name |
Description |
basket |
Array of items |
item |
Array of product details |
type |
Type of product - “good” - “discount” - “fee” |
product_reference |
Unique product reference |
quantity |
Product quantity |
unit_price |
Unit price including taxes in order currency |
discount |
Discount amount |
total_amount |
Unit price X quantity – discount |
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.)
Field name |
Description |
basket |
Array of items |
item |
Array of product details |
european_article_numbering |
European article numbering |
type |
Type of product - “good” - “discount” - “fee” |
product_reference |
Unique product reference |
name |
Product description |
quantity |
Product quantity |
unit_price |
Unit price including taxes in order currency |
tax_rate |
Tax rate in percentage |
discount |
Discount amount |
total_amount |
Unit price X quantity – discount |
Comments
0 comments
Article is closed for comments.