Realex Gateway Guide

close

Services and Compatibility

Payment Gateway Company Name:
Realex
Services that work with Spreedly:
  • Realex
Supported operations:
Purchase, Authorize, Capture, Refund, Void, Verify
Supported payment types:
Credit Card, Apple Pay
Regions:
Europe, North America

Authentication and Security

Specific names for credentials:
Merchant ID, Sub Account, Refund Password, Secret

Onboarding Merchants in:

Adding a Realex gateway

To add a Realex gateway:


curl https://core.spreedly.com/v1/gateways.xml \
  -u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
  -H 'Content-Type: application/xml' \
  -d '<gateway>
        <gateway_type>realex</gateway_type>
        <merchant_id>merchantID</merchant_id>
        <secret>secret</secret>
        <refund_password>refundPassword</refund_password>
      </gateway>'

<gateway>
  <token>aJ5jzcrDAFYKj6edG0tjfElM0Wq</token>
  <gateway_type>realex</gateway_type>
  <name>Realex</name>
  <description nil="true"/>
  <merchant_id>merchantID</merchant_id>
  <sub_account nil="true"/>
  <characteristics>
    <supports_purchase type="boolean">true</supports_purchase>
    <supports_authorize type="boolean">true</supports_authorize>
    <supports_capture type="boolean">true</supports_capture>
    <supports_credit type="boolean">true</supports_credit>
    <supports_general_credit type="boolean">false</supports_general_credit>
    <supports_void type="boolean">true</supports_void>
    <supports_verify type="boolean">true</supports_verify>
    <supports_reference_purchase type="boolean">false</supports_reference_purchase>
    <supports_purchase_via_preauthorization type="boolean">false</supports_purchase_via_preauthorization>
    <supports_offsite_purchase type="boolean">false</supports_offsite_purchase>
    <supports_offsite_authorize type="boolean">false</supports_offsite_authorize>
    <supports_3dsecure_purchase type="boolean">false</supports_3dsecure_purchase>
    <supports_3dsecure_authorize type="boolean">false</supports_3dsecure_authorize>
    <supports_store type="boolean">false</supports_store>
    <supports_remove type="boolean">false</supports_remove>
    <supports_fraud_review type="boolean">false</supports_fraud_review>
  </characteristics>
  <credentials>
    <credential>
      <name>merchant_id</name>
      <value>merchantID</value>
    </credential>
    <credential>
      <name>sub_account</name>
      <value nil="true"/>
    </credential>
  </credentials>
  <gateway_specific_fields>
  </gateway_specific_fields>
  <payment_methods>
    <payment_method>credit_card</payment_method>
    <payment_method>apple_pay</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <created_at type="dateTime">2018-11-06T21:15:48Z</created_at>
  <updated_at type="dateTime">2018-11-06T21:15:48Z</updated_at>
</gateway>


env = Spreedly::Environment.new('C7cRfNJGODKh4Iu5Ox3PToKjniY', '4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ', base_url: 'https://core.spreedly.com')
env.add_gateway(:realex, merchant_id: "Your merchant_id", secret: "Your secret",
                refund_password: "Your refund_password")


#<Spreedly::Gateway:0x007fe3329d52c0
@token="W8ZtvpXBq9bCkYl0Vf9MayVagqR",
@created_at="2017-07-27T17:50:28Z",
@updated_at="2017-07-27T17:50:28Z",
@gateway_type="realex",
@state="retained",
@name="Realex",
@credentials={"merchant_id"=>"Your merchant_id", "sub_account"=>""}>

With Sub Account

Realex allows you to specify a sub-account if you’d like. To do so, you’d make the call like so:


curl https://core.spreedly.com/v1/gateways.xml \
  -u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
  -H 'Content-Type: application/xml' \
  -d '<gateway>
        <gateway_type>realex</gateway_type>
        <merchant_id>merchantID</merchant_id>
        <secret>secret</secret>
        <refund_password>refundPassword</refund_password>
        <sub_account>special_account</sub_account>
      </gateway>'

<gateway>
  <token>7H4wsv8fObH6DWO384ExcgoFm9w</token>
  <gateway_type>realex</gateway_type>
  <name>Realex</name>
  <description nil="true"/>
  <merchant_id>merchantID</merchant_id>
  <sub_account>special_account</sub_account>
  <characteristics>
    <supports_purchase type="boolean">true</supports_purchase>
    <supports_authorize type="boolean">true</supports_authorize>
    <supports_capture type="boolean">true</supports_capture>
    <supports_credit type="boolean">true</supports_credit>
    <supports_general_credit type="boolean">false</supports_general_credit>
    <supports_void type="boolean">true</supports_void>
    <supports_verify type="boolean">true</supports_verify>
    <supports_reference_purchase type="boolean">false</supports_reference_purchase>
    <supports_purchase_via_preauthorization type="boolean">false</supports_purchase_via_preauthorization>
    <supports_offsite_purchase type="boolean">false</supports_offsite_purchase>
    <supports_offsite_authorize type="boolean">false</supports_offsite_authorize>
    <supports_3dsecure_purchase type="boolean">false</supports_3dsecure_purchase>
    <supports_3dsecure_authorize type="boolean">false</supports_3dsecure_authorize>
    <supports_store type="boolean">false</supports_store>
    <supports_remove type="boolean">false</supports_remove>
    <supports_fraud_review type="boolean">false</supports_fraud_review>
  </characteristics>
  <credentials>
    <credential>
      <name>merchant_id</name>
      <value>merchantID</value>
    </credential>
    <credential>
      <name>sub_account</name>
      <value>special_account</value>
    </credential>
  </credentials>
  <gateway_specific_fields>
  </gateway_specific_fields>
  <payment_methods>
    <payment_method>credit_card</payment_method>
    <payment_method>apple_pay</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <created_at type="dateTime">2018-11-06T21:15:48Z</created_at>
  <updated_at type="dateTime">2018-11-06T21:15:48Z</updated_at>
</gateway>


env = Spreedly::Environment.new('C7cRfNJGODKh4Iu5Ox3PToKjniY', '4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ', base_url: 'https://core.spreedly.com')
env.add_gateway(:realex, merchant_id: "Your merchant_id", secret: "Your secret",
                refund_password: "Your refund_password",
                sub_account: "SpecialSubAccount")


#<Spreedly::Gateway:0x007fe333a0dc78
@token="QLAlzPXn6VbKoVgBe3ChN3g5Mpf",
@created_at="2017-07-27T17:50:29Z",
@updated_at="2017-07-27T17:50:29Z",
@gateway_type="realex",
@state="retained",
@name="Realex",
@credentials={"merchant_id"=>"Your merchant_id", "sub_account"=>"SpecialSubAccount"}>

Gateway Specific Response Fields

A response from a Realex gateway may contain an AuthCode and a Pasref from the underlying processor.

You can find this information in gateway_specific_response_fields. For example, a transaction could have something like this:

<transaction>
  <token>LgpTNGjsWQs9DwdxcbreUVz0R8p</token>
  <transaction_type>Purchase</transaction_type>
  <gateway_specific_response_fields>
     <realex>
      <authcode>2323214</authcode>
       <pasref>123456</pasref>
     </realex>
  </gateway_specific_response_fields>
</transaction>