Virtual IBAN look-up
Please note: the virtual IBAN is only available on the Production account.
1. Requirements
Production service endpoint | https://secure-gateway.hipay-tpp.com/rest/v2/virtual-iban/search |
Method | POST |
Authorization | Basic base64(":") |
Character encoding | UTF-8 |
HiPay Enterprise credentials | Private |
2. Request parameters
- external_reference:
ID defined by the merchant and provided in the virtual IBAN creation request
Example of a PHP request
// To make an API call $ch = curl_init();
// API call configuration: // In red: Parameters specific to the merchant – therefore to be customized // Production environment URL (to be used for production launch): https://secure-gateway.hipay-tpp.com/rest/v2/virtual-iban curl_setopt( $ch, CURLOPT_URL, 'https://secure-gateway.hipay-tpp.com/rest/v2/virtual-iban/search' ); curl_setopt( $ch, CURLOPT_USERPWD , "my_api_login:my_api_password"); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_HTTPHEADER, ["Accept: application/xml"]); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS , http_build_query( array( "external_ref" => "my_ID-00019" ) ));
// To execute the API call – the returned response is contained in the $response variable. $response = curl_exec($ch);
// To end the API call curl_close( $ch ); |
3. Returned responses to look-up requests
Format
- In XML by default
- Optionally in JSON if the “Accept” HTTPHEADER only contains “application/json”
Content
- code
For instance:
- 0 for success
- 1010201 for a problem with the input data
- message(explaining the code)
For instance:
- “Many virtual ibans have been found.”
- virtual_ibans
(including a list of 0 to N virtual_ibans containing the following parameters):
- iban
- bic
- creation_date (YYYY-MM-DD format)
- expiry_date (YYYY-MM-DD format)
- external_reference
Example of an XML response
<?xml version="1.0" encoding="UTF-8"?> <response> <code>0</code> <message><![CDATA[success]]></message> <description><![CDATA[Many virtual ibans have been found.]]></description> <virtual_ibans> <virtual_iban> <iban><![CDATA[XXXXXXXXXXXXX]]></iban> <bic><![CDATA[XXXXXXXX]]></bic> <creation_date><![CDATA[2022-02-02]]></creation_date> <expiry_date><![CDATA[2022-02-28]]></expiry_date> <external_reference><![CDATA[my_ID-00019]]></external_reference> </virtual_iban> <virtual_iban> <iban><![CDATA[YYYYYYYYYYYYY]]></iban> <bic><![CDATA[YYYYYYYY]]></bic> <creation_date><![CDATA[2022-02-23]]></creation_date> <expiry_date><![CDATA[2022-03-31]]></expiry_date> <external_reference><![CDATA[my_ID-00019]]></external_reference> </virtual_iban> <virtual_iban> <iban><![CDATA[ZZZZZZZZZZZZZZ]]></iban> <bic><![CDATA[ZZZZZZZZZZ]]></bic> <creation_date><![CDATA[2021-02-24]]></creation_date> <expiry_date><![CDATA[2022-03-22]]></expiry_date> <external_reference><![CDATA[my_ID-00019]]></external_reference> </virtual_iban> </virtual_ibans> </response> |
Example of a JSON response
{ "code":0, "message":"success", "description":"Many virtual ibans have been found.", "virtual_ibans": [ { "iban":"XXXXXXXXXXXXX", "bic":"XXXXXXXX", "creation_date":"2021-02-02", "expiry_date":"2021-02-28", "external_reference":"my_ID-00019" }, { "iban":"YYYYYYYYYYYYY", "bic":"YYYYYYYY", "creation_date":"2021-02-23", "expiry_date":"2021-03-31", "external_reference":"my_ID-00019" }, { "iban":"ZZZZZZZZZZZZZZ", "bic":"ZZZZZZZZZZ", "creation_date":"2021-02-24", "expiry_date":"2022-03-22", "external_reference":"my_ID-00019" } ] } |
Comentários
0 comentário
Artigo fechado para comentários.