API integration
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 |
https://stage-secure-gateway.hipay-tpp.com/rest/v1/order |
Production |
https://secure-gateway.hipay-tpp.com/rest/v1/order |
Request parameters
To create an Oney CARTE CADEAU transaction on the HiPay Enterprise Payment Gateway, you must send these mandatory (M) / complementary (C) parameters in your transaction creation call.
(For further details, please refer to the technical documentation.)
Format abbreviation |
Description |
AN |
Alphanumeric characters (a-z, A-Z, 0-9) |
A |
Alphabetic characters only (a-z, A-Z) |
N |
Numeric characters only |
JSON |
JavaScript Object Notation |
Field name | Format | Req. | Description |
---|---|---|---|
payment_product | AN | M | carte-cadeau |
AN | M | Customer’s email address | |
amount | N | M | Transaction amount
Decimal number with explicit decimal point, signed (e.g.: 15.00) |
currency | A | M | Transaction base currency |
description | AN | M | Order description |
payment_product_parameters |
JSON |
M | { "prepaid_card_number": "XXXXX" , "prepaid_card_security_code": "XXX" } |
Request example
{
"currency": "EUR" ,
"payment_product": "carte-cadeau" ,
"operation": "sale" ,
"orderid": "1234567890" ,
"amount": "15.00" ,
"description": "Order description" ,
"email": "johndoe@ddress.com" ,
"payment_product_parameters":{
"prepaid_card_number": "XXXXXXXXXX" ,
"prepaid_card_security_code": "XXX"
}
}
Response example
{
"state": "completed" ,
"reason": "" ,
"forwardUrl": "" ,
"test": "true" ,
"mid": "000013XXXXX" ,
"attemptId": "1" ,
"authorizationCode": "123456" ,
"transactionReference": "123456789100" ,
"referenceToPay": "" ,
"dateCreated": "2017-09-18T12:49:06+0000" ,
"dateUpdated": "2017-09-18T12:49:13+0000" ,
"dateAuthorized": "2017-09-18T12:49:10+0000" ,
"status": "118" ,
"message": "Captured" ,
"authorizedAmount": "15.00" ,
"capturedAmount": "15.00" ,
"refundedAmount": "0.00" ,
"creditedAmount": "0.00" ,
"decimals": "2" ,
"currency": "EUR" ,
"ipAddress": "0.0.0.0" ,
"ipCountry": "" ,
"deviceId": "" ,
"cdata1": "" ,
"cdata2": "" ,
"cdata3": "" ,
"cdata4": "" ,
"cdata5": "" ,
"cdata6": "" ,
"cdata7": "" ,
"cdata8": "" ,
"cdata9": "" ,
"cdata10": "" ,
"avsResult": "" ,
"cvcResult": "" ,
"eci": "7" ,
"paymentProduct": "carte-cadeau" ,
"paymentMethod": "" ,
"threeDSecure": "" ,
"fraudScreening": {
"scoring": "0" ,
"result": "ACCEPTED" ,
"review": ""
},
"order": {
"id": "1234567890" ,
"dateCreated": "2017-09-18T12:49:06+0000" ,
"attempts": "1" ,
"amount": "15.00" ,
"shipping": "0.00" ,
"tax": "0.00" ,
"decimals": "2" ,
"currency": "EUR" ,
"customerId": "" ,
"language": "en_US" ,
"email": "johndoe@ddress.com"
},
"debitAgreement": {
"id": "" ,
"status": ""
}
}
Hosted Page integration
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 |
https://stage-secure-gateway.hipay-tpp.com/rest/v1/hpayment |
Production |
https://secure-gateway.hipay-tpp.com/rest/v1/hpayment |
Request parameters
To create an Oney CARTE CADEAU transaction on the HiPay Enterprise Payment Gateway, you must send these mandatory (M) / complementary (C) parameters in your transaction creation call.
(For further details, please refer to the technical documentation.)
Format abbreviation |
Description |
AN |
Alphanumeric characters (a-z, A-Z, 0-9) |
A |
Alphabetic characters only (a-z, A-Z) |
N |
Numeric characters only |
JSON |
JavaScript Object Notation |
Field name | Format | Req. | Description |
---|---|---|---|
payment_product_list | AN | M | carte-cadeau |
AN | M | Customer’s email address | |
amount | N | M | Transaction amount
Decimal number with explicit decimal point, signed (e.g.: 15.00) |
currency | A | M | Transaction base currency |
description | AN | M | Order description |
Request example
{
"currency": "EUR" ,
"payment_product_list": "carte-cadeau" ,
"operation": "sale" ,
"orderid": "1234567890" ,
"amount": "15.00" ,
"description": "Order description" ,
"email": "johndoe@ddress.com"
}
Response example
This service creates an order and returns a forward URL. This forward URL is dedicated to display an Oney CARTE CADEAU payment page. After payment validation, HiPay will send a server-to-server notification to inform the merchant about the result of the transaction.
(For further details, please refer to the technical documentation.)
{
"forwardUrl":"https:\/\/secure-gateway.hipay-tpp.com\/payment\/web\/pay\/83e40e67-5e34-4913-ae97-xxx",
"test":"true",
"mid":"0000000000",
"cdata1":"",
"cdata2":"",
"cdata3":"",
"cdata4":"",
"cdata5":"",
"cdata6":"",
"cdata7":"",
"cdata8":"",
"cdata9":"",
"cdata10":"",
"order":{
"id":"123456789",
"dateCreated":"2017-10-02T10:17:53+0000",
"attempts":"0",
"amount":"5.00",
"shipping":"0.00",
"tax":"0.00",
"decimals":"2",
"currency":"EUR",
"customerId":"51792e6256b5d",
"language":"fr_FR",
"email":"demo@hipay.com"
}
}
Comentários
0 comentário
Artigo fechado para comentários.