Service endpoints
There are two endpoints (base URLs) to which you can make your API calls:
- Stage, if you are testing your integration,
- and Production, when you have finished testing and want your application to go live.
Environment | Endpoint |
---|---|
Stage |
|
Production |
Request parameters
To create a Divido transaction on the HiPay Enterprise Payment Gateway, you must send these mandatory/complementary parameters in your transaction creation call.
Please note: only the hpayment API is available for this payment method.
The payment page display is managed by HiPay.
(For further details, please refer to the technical documentation.)
Format abbreviation | Description |
A | Alphabetic characters only (a-z, A-Z) |
AN | Alphanumeric characters (a-z, A-Z, 0-9) |
N | Numeric characters only |
R | Decimal number with explicit decimal point, signed |
JSON | JavaScript Object Notation |
Field name | Format | Req. | Description |
orderid | AN |
M |
Order ID |
operation |
A |
M |
|
payment_product_list | AN | M | divido |
description | AN | M | Description of the order |
currency | A | M | Required value: GBP |
amount | R | M | Use decimal point as separator |
AN | Customer's email address | ||
phone | N |
Customer's phone number E.g.: 07xxx xxxxxx |
|
birthdate | AN | Customer's birthdate (YYYYMMDD) | |
firstname | AN | Customer's first name | |
lastname | AN | Customer's last name | |
streetaddress | AN | Customer's billing address | |
city |
A |
City of the customer's billing address | |
zipcode | N | Postal code of the customer's billing address | |
country | A |
Country code of the customer's billing address This two-letter country code complies with ISO 3166-1 (alpha 2). E.g.: UK |
|
shipto_firstname | AN | First name of the order's recipient | |
shipto_lastname | AN | Last name of the order's recipient | |
shipto_phone | N | Recipient's phone number |
|
shipto_streetaddress | AN | Recipient's shipping address | |
shipto_city | AN | City of the recipient's shipping address | |
shipto_zipcode | N | Postal code of the recipient's shipping address | |
shipto_country | AN |
Country code of the recipient's shipping address This two-letter country code complies with ISO 3166-1 (alpha 2). |
|
eci | N |
7: E-commerce with SSL/TLS Encryption |
|
accept_url | AN | M | Mandatory if not configured in the back office |
decline_url | AN | M | Mandatory if not configured in the back office |
exception_url | AN | M | Mandatory if not configured in the back office |
cancel_url | AN | M | Mandatory if not configured in the back office |
basket | JSON | M |
product_category:
|
Request example
{
“currency” : “GBP”,
“payment_product_list” : “divido”,
“orderid” : “123abc0cba321”,
“amount” : “576.51”,
“description” : “Description of the order”,
“country” : “UK”,
“decline_url” : “http://www.mysite.com/decline”,
“exception_url” : “http://www.mysite.com/exception,
“cancel_url” : “http://www.mysite.com/cancel”,
“accept_url” : “http://www.mysite.com/accept”,
“basket” : [
{
"product_reference": "334566",
"type": "good",
"quantity": "1",
"name": "Yellow Jersey Exercise bike E.g. Series", "unit_price": "475.19",
"tax_rate": "20.00",
"discount": "0",
"total_amount": "475.19",
"product_category": 12
},
{"product_reference": "120034",
"type": "good",
"quantity": "1",
"name": "STAMINA Cycling shorts Black L",
"unit_price": "46.73",
"tax_rate": "20.00",
"discount": "0",
"total_amount": "46.73",
"product_category": 12
},
{"product_reference": "654321",
"type": "good",
"quantity": "1",
"name": "High-performance cycling gloves Black M",
"unit_price": "24.6",
"tax_rate": "20.00",
"discount": "0",
"total_amount": "24.6",
"product_category": 12
},
{"product_reference": "SHIPPING-123",
"name": "UK Express",
"type": "fee",
"quantity": "1",
"unit_price": "29.99",
"discount": "0",
"tax_rate": "16.67",
"total_amount": "29.99",
"product_category": 12
}
]
“eci” : “7”,
“firstname” : “John”,
“lastname” : “Doe”,
“streetaddress” : “12 Main Street”,
“city” : “Inverurie”,
“zipcode” : “AB51 6BA”,
“country” : “UK”,
“shipto_lastname” : “Champs”,
“shipto_streetaddress” : “12 Mountain Road”,
“shipto_city” : “MANCHESTER”,
“shipto_zipcode” : “M16 0EA”,
“shipto_country” : “UK”,
“birthdate” : “19800701”,
“operation” : “sale”,
“phone” : “07012654321”,
“email” : “john.doe@mail.com”,
“shipto_firstname” : “Hugo”
}
API response
This service returns a forward URL, which displays the available payment facilities (e.g., payment in 6/9/12/36 installments). Once they have made their choice, customers are redirected to Divido’s application form.
(For further details, please refer to the technical documentation.)
Response example
<response>
<forward_url>https://stage-secure-gateway.hipay-tpp.com/payment/web/pay/12a3cb4a-d50c-6a5b-7c65-5d6efef6e56f</forward_url>
<test>true</test>
<mid>00001236543</mid>
<cdata1>
<![CDATA[]]>
</cdata1>
<cdata2>
<![CDATA[]]>
</cdata2>
<cdata3>
<![CDATA[]]>
</cdata3>
<cdata4>
<![CDATA[]]>
</cdata4>
<cdata5>
<![CDATA[]]>
</cdata5>
<cdata6>
<![CDATA[]]>
</cdata6>
<cdata7>
<![CDATA[]]>
</cdata7>
<cdata8>
<![CDATA[]]>
</cdata8>
<cdata9>
<![CDATA[]]>
</cdata9>
<cdata10>
<![CDATA[]]>
</cdata10>
<order>
<id>
<![CDATA[1122334455]]>
</id>
<date_created>
<![CDATA[2018-10-19T17:14:01+0000]]>
</date_created>
<attempts>
<![CDATA[0]]>
</attempts>
<amount>
<![CDATA[576.51]]>
</amount>
<shipping>
<![CDATA[0.00]]>
</shipping>
<tax>
<![CDATA[0.00]]>
</tax>
<decimals>
<![CDATA[2]]>
</decimals>
<currency>
<![CDATA[GBP]]>
</currency>
<customer_id>
<![CDATA[]]>
</customer_id>
<language>
<![CDATA[en_US]]>
</language>
<email>
<![CDATA[example@mail.com]]>
</email>
</order>
<basket>
<item>
<type>
<![CDATA[good]]>
</type>
<product_reference>
<![CDATA[332211]]>
</product_reference>
<quantity>
<![CDATA[1]]>
</quantity>
<unit_price>
<![CDATA[475.19]]>
</unit_price>
<discount>
<![CDATA[0]]>
</discount>
<total_amount>
<![CDATA[475.19]]>
</total_amount>
</item>
<item>
<type>
<![CDATA[good]]>
</type>
<product_reference>
<![CDATA[221100]]>
</product_reference>
<quantity>
<![CDATA[1]]>
</quantity>
<unit_price>
<![CDATA[46.73]]>
</unit_price>
<discount>
<![CDATA[0]]>
</discount>
<total_amount>
<![CDATA[46.73]]>
</total_amount>
</item>
<item>
<type>
<![CDATA[good]]>
</type>
<product_reference>
<![CDATA[654321]]>
</product_reference>
<quantity>
<![CDATA[1]]>
</quantity>
<unit_price>
<![CDATA[24.6]]>
</unit_price>
<discount>
<![CDATA[0]]>
</discount>
<total_amount>
<![CDATA[24.6]]>
</total_amount>
</item>
<item>
<type>
<![CDATA[fee]]>
</type>
<product_reference>
<![CDATA[SHIPPING-123]]>
</product_reference>
<quantity>
<![CDATA[1]]>
</quantity>
<unit_price>
<![CDATA[29.99]]>
</unit_price>
<discount>
<![CDATA[0]]>
</discount>
<total_amount>
<![CDATA[29.99]]>
</total_amount>
</item>
</basket>
</response>
Commentaires
0 commentaire
Cet article n'accepte pas de commentaires.