API FONDYVersion 1.0

Request parameters

ParameterTypeDescriptionSample
merchant_idinteger(12)Merchant unique ID. Generated during merchant registration.

mandatory
1396424
date_fromstring(10)Order datetime in fromat DD.MM.YYYY HH24:MI:SS

mandatory
15.04.2014 00:00:00
date_tostring(10)Order datetime in fromat DD.MM.YYYY HH24:MI:SS

mandatory
16.04.2014 23:59:59
signaturestring(40)Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response

mandatory
1773cf135bd89656131134b98637894dad42f808
versionstring(10)Protocol version

Default value: 1.0
1.0

Response parameters

See Parameters of final response

Parameters of response in case of error

See Parameters of response in case of error

Request generation

Report request always generated by merchant using host-to-host request to URL https://pay.fondy.eu/api/reports

Host-to-host API supports the following text formats:

Response is always returned in request context in the same content-type. So if request is sent in JSON, response will be sent in JSON format too.

Example host-to-host JSON

Content Type: application/json

Request

{
  "request": {
    "merchant_id": "1396424",
    "date_from": "16.04.2014 00:00:00",
    "date_to": "16.04.2014 23:59:59",
    "signature": "250ceec5ea86bc606cee4354c0d7126d0a2ab046"
  }
}

Normal response

{
   "response":[
      {
         "rrn":"",
         "masked_card":"",
         "sender_cell_phone":"",
         "response_status":"",
         "currency":"USD",
         "fee":"100",
         "reversal_amount":"",
         "settlement_amount":"900",
         "actual_amount":"1000",
         "order_status":"approved",
         "response_description":"",
         "order_time":"13.01.2014 15:10:47",
         "actual_currency":"USD",
         "order_id":"test7926651365",
         "tran_type":"",
         "eci":"",
         "settlement_date":"16.04.2014",
         "payment_system":"card",
         "approval_code":"530159",
         "merchant_id":"1396424",
         "settlement_currency":"",
         "payment_id":"2100",
         "card_bin":"",
         "response_code":"",
         "card_type":"",
         "amount":"1000",
         "sender_email":"",
         "signature":"3a587a6908e1b4119729e6b00f9f055a927728fd"
      },
      ...
      {
         "rrn":"",
         "masked_card":"",
         "sender_cell_phone":"",
         "response_status":"",
         "currency":"USD",
         "fee":"100",
         "reversal_amount":"",
         "settlement_amount":"900",
         "actual_amount":"1000",
         "order_status":"approved",
         "response_description":"",
         "order_time":"13.01.2014 15:10:47",
         "actual_currency":"USD",
         "order_id":"test7926651366",
         "tran_type":"",
         "eci":"",
         "settlement_date":"16.04.2014",
         "payment_system":"card",
         "approval_code":"530159",
         "merchant_id":"1396424",
         "settlement_currency":"",
         "payment_id":"2101",
         "card_bin":"",
         "response_code":"",
         "card_type":"",
         "amount":"1000",
         "sender_email":"",
         "signature":"3a587a6908e1b4119729e6b00f9f055a927728fd"
      }
   ]
}

Response in case of error

{
  "response": {
    "response_status": "failure",
    "error_message": "Order Not Found",
    "error_code": "1018"
  }
}

Example host-to-host XML

Content Type: application/xml

Request

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <date_from>15.04.2014 00:00:00</date_from>
  <date_to>16.04.2014 23:59:59</date_to>
  <merchant_id>1396424</merchant_id>
  <signature>250ceec5ea86bc606cee4354c0d7126d0a2ab046</signature>
</request>

Normal response

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <order>
    <actual_amount>1000</actual_amount>
    <actual_currency>USD</actual_currency>
    <amount>1000</amount>
    <approval_code>530159</approval_code>
    <card_bin />
    <card_type />
    <currency>USD</currency>
    <eci />
    <fee>100</fee>
    <masked_card />
    <merchant_id>1396424</merchant_id>
    <order_id>test7926651365</order_id>
    <order_status>approved</order_status>
    <order_time>13.01.2014 15:10:47</order_time>
    <payment_id>2100</payment_id>
    <payment_system>card</payment_system>
    <response_code />
    <response_description />
    <response_status />
    <reversal_amount />
    <rrn />
    <sender_cell_phone />
    <sender_email />
    <settlement_amount>900</settlement_amount>
    <settlement_currency />
    <settlement_date>16.04.2014</settlement_date>
    <signature>3a587a6908e1b4119729e6b00f9f055a927728fd</signature>
    <tran_type />
  </order>
...
  <order>
    <actual_amount>1000</actual_amount>
    <actual_currency>USD</actual_currency>
    <amount>1000</amount>
    <approval_code>530159</approval_code>
    <card_bin />
    <card_type />
    <currency>USD</currency>
    <eci />
    <fee>100</fee>
    <masked_card />
    <merchant_id>1396424</merchant_id>
    <order_id>test7926651366</order_id>
    <order_status>approved</order_status>
    <order_time>13.01.2014 15:10:47</order_time>
    <payment_id>2101</payment_id>
    <payment_system>card</payment_system>
    <response_code />
    <response_description />
    <response_status />
    <reversal_amount />
    <rrn />
    <sender_cell_phone />
    <sender_email />
    <settlement_amount>900</settlement_amount>
    <settlement_currency />
    <settlement_date>16.04.2014</settlement_date>
    <signature>3a587a6908e1b4119729e6b00f9f055a927728fd</signature>
    <tran_type />
  </order>
</response>

Response in case of error

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <response_status>failure</response_status>
  <error_message>Order Not Found</error_message>
  <error_code>1018</error_code>
</response>

Connect to FONDY and learn more!