API FONDYVersion 1.0

Request parameters

ParameterTypeDescriptionSample
order_idstring(1024)Order ID which is generated by merchant.

mandatory
ID1234
merchant_idinteger(12)Merchant unique ID. Generated by FONDY during merchant registration.

mandatory
1
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

Status request always generated by merchant using host-to-host request to URL https://pay.fondy.eu/api/status/order_id

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": {
    "order_id": "test7926651365",
    "merchant_id": "1",
    "signature": "250ceec5ea86bc606cee4354c0d7126d0a2ab046"
  }
}

Normal response

{
  "response": {
    "rrn": "",
    "masked_card": "",
    "sender_cell_phone": "",
    "response_signature_string": "**********1000USD1000530159USDTest1test7926651365approved13.01.2014 15:10:472100Visa/MC",
    "response_status": "",
    "currency": "USD",
    "fee": "",
    "reversal_amount": "",
    "settlement_amount": "",
    "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": "",
    "payment_system": "Visa/MC",
    "approval_code": "530159",
    "merchant_id": "1",
    "settlement_currency": "",
    "payment_id": "2100",
    "card_bin": "",
    "response_code": "",
    "card_type": "",
    "amount": "1000",
    "sender_email": "",
    "signature": "3a587a6908e1b4119729e6b00f9f055a927728fd",
    "product_id": ""
  }
}

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>
  <order_id>test7926651365</order_id>
  <merchant_id>1</merchant_id>
  <signature>250ceec5ea86bc606cee4354c0d7126d0a2ab046</signature>
</request>

Normal response

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <rrn>401311593803</rrn>
  <masked_card>444455XXXXXX1111</masked_card>
  <sender_cell_phone />
  <response_status />
  <currency>USD</currency>
  <fee />
  <reversal_amount />
  <settlement_amount />
  <actual_amount>1000</actual_amount>
  <order_status>reversed</order_status>
  <response_description />
  <order_time>13.01.2014 15:10:47</order_time>
  <actual_currency>USD</actual_currency>
  <order_id>test7926651365</order_id>
  <tran_type />
  <eci />
  <settlement_date />
  <payment_system>Visa/MC</payment_system>
  <approval_code>530159</approval_code>
  <merchant_id>1</merchant_id>
  <settlement_currency />
  <payment_id>2100</payment_id>
  <card_bin>444455</card_bin>
  <response_code />
  <card_type>VISA</card_type>
  <amount>1000</amount>
  <sender_email />
  <signature>1f894ec8c9b9c0a619e87f92ad7d347431f705c0</signature>
  <product_id />
</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>

Example host-to-host HTML form

Content Type: application/x-www-form-urlencoded

Request

order_id=test7926651365&merchant_id=1&signature=250ceec5ea86bc606cee4354c0d7126d0a2ab046

Normal response

rrn=401311593803&masked_card=444455XXXXXX1111&sender_cell_phone=&response_status=
&currency=USD&fee=&reversal_amount=&settlement_amount=&actual_amount=1000
&order_status=reversed&response_description=&order_time=13.01.2014+15%3A10%3A47
&actual_currency=USD&order_id=test7926651365&tran_type=&eci=
&settlement_date=&payment_system=Visa%2FMC&approval_code=530159&merchant_id=1
&settlement_currency=&payment_id=2100&card_bin=444455&response_code=&
card_type=VISA&amount=1000&sender_email=&signature=1f894ec8c9b9c0a619e87f92ad7d347431f705c0&product_id=

Response in case of error

response_status=failure&error_message=Order+Not+Found&error_code=1018

Connect to FONDY and learn more!