API FONDYVersion 1.0

Purchase using card token

  1. Request parameters
  2. Response parameters
  3. Parameters of response in case of error
  4. Request generation

Request parameters

See Request parameters

Request must contain additional parameter rectoken

Parameters of response

See Parameters of final response

Parameters of response in case of error

See Parameters of response in case of error

Request generation

Purchase by token request always generated by merchant using host-to-host request to URL https://pay.fondy.eu/api/recurring

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 for interaction scheme B (JSON)

Content Type: application/json

Request

{
  "request":{
    "order_id":"test8037875286",
    "order_desc":"Test payment",
    "currency":"USD",
    "amount":"100",
    "rectoken":"544d3f86237886b6404d8b000f6a7d71c45410b7",
    "signature":"07bc309047a56275f8d89ae222e2af0ceb94fe79",
    "merchant_id":"1"
  }
}

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":"Parameter `amount` is mandatory",
  "error_code":"1008"
  }
}

Example host-to-host for interaction scheme B (XML)

Content Type: application/xml

Request

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <response_url>https://pay.fondy.eu/responsepage/</response_url>
  <order_id>test622138965</order_id>
  <order_desc>Test payment</order_desc>
  <currency>USD</currency>
  <amount>100</amount>
  <rectoken>544d3f86237886b6404d8b000f6a7d71c45410b7</rectoken>
  <signature>fad685643ed5375d6d08c27f4f600e848549b0c5</signature>
  <merchant_id>1</merchant_id>
</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>approved</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>Parameter `amount` is mandatory</error_message>
  <error_code>1008</error_code>
</response>

Example host-to-host for interaction scheme B (HTML form)

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

Request

order_id=test3600040034&order_desc=Test payment&currency=USD
&amount=100&merchant_id=1&signature=ea326b841f9a1e2e90fb392392d3ed6255a6698d

Normal response

rrn=401311593803&masked_card=444455XXXXXX1111&sender_cell_phone=&response_status=
&currency=USD&fee=&reversal_amount=&settlement_amount=&actual_amount=1000
&order_status=approved&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=Parameter%20%60amount%60%20is%20mandatory&error_code=1008

Connect to FONDY and learn more!