Barclaycard Smartpay Gateway Guide

close

Services and Compatibility

Payment Gateway Company Name:
Barclaycard Smartpay
Services that work with Spreedly:
  • Barclaycard Smartpay
Supported operations:
Purchase, Authorize, Capture, Refund, Void, Verify, Store, General Credit
Supported payment types:
Credit Card
Does Spreedly support 3D Secure with this gateway?
Yes
Regions:
Asia Pacific, Europe, Latin America, Middle East, North America

Authentication and Security

Specific names for credentials:
Company, Merchant, Review Payout Account, Store Payout Account, Password, Review Payout Password, Store Payout Password

Onboarding Merchants in:

Adding

To add a Barclaycard Smartpay gateway:


curl https://core.spreedly.com/v1/gateways.xml \
  -u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
  -H 'Content-Type: application/xml' \
  -d '<gateway>
        <gateway_type>barclaycard_smartpay</gateway_type>
        <company>Your company</company>
        <merchant>Your merchant name</merchant>
        <password>Your password</password>
        <store_payout_account>Your third-party payment storing account</store_payout_account>
        <store_payout_password>Your third-party payment storing account password</store_payout_password>
        <review_payout_account>Your third-party payment review account</review_payout_account>
        <review_payout_password>Your third-party payment review account password</review_payout_password>
      </gateway>'

<gateway>
  <token>LMZtkiKfvp0LISKYC7N21Q6spAS</token>
  <gateway_type>barclaycard_smartpay</gateway_type>
  <name>Barclaycard Smartpay</name>
  <description nil="true"/>
  <company>Your company</company>
  <merchant>Your merchant name</merchant>
  <store_payout_account>Your third-party payment storing account</store_payout_account>
  <review_payout_account>Your third-party payment review account</review_payout_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">true</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">true</supports_3dsecure_purchase>
    <supports_3dsecure_authorize type="boolean">true</supports_3dsecure_authorize>
    <supports_store type="boolean">true</supports_store>
    <supports_remove type="boolean">false</supports_remove>
    <supports_fraud_review type="boolean">false</supports_fraud_review>
  </characteristics>
  <credentials>
    <credential>
      <name>company</name>
      <value>Your company</value>
    </credential>
    <credential>
      <name>merchant</name>
      <value>Your merchant name</value>
    </credential>
    <credential>
      <name>store_payout_account</name>
      <value>Your third-party payment storing account</value>
    </credential>
    <credential>
      <name>review_payout_account</name>
      <value>Your third-party payment review account</value>
    </credential>
  </credentials>
  <gateway_specific_fields>
    <gateway_specific_field>customer</gateway_specific_field>
    <gateway_specific_field>street</gateway_specific_field>
    <gateway_specific_field>house_number</gateway_specific_field>
    <gateway_specific_field>shipping_street</gateway_specific_field>
    <gateway_specific_field>shipping_house_number</gateway_specific_field>
    <gateway_specific_field>date_of_birth</gateway_specific_field>
    <gateway_specific_field>entity_type</gateway_specific_field>
    <gateway_specific_field>nationality</gateway_specific_field>
    <gateway_specific_field>shopper_name</gateway_specific_field>
    <gateway_specific_field>user_agent</gateway_specific_field>
    <gateway_specific_field>accept_header</gateway_specific_field>
    <gateway_specific_field>shopper_interaction</gateway_specific_field>
    <gateway_specific_field>device_fingerprint</gateway_specific_field>
    <gateway_specific_field>third_party_payout</gateway_specific_field>
  </gateway_specific_fields>
  <payment_methods>
    <payment_method>credit_card</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <created_at type="dateTime">2018-10-11T15:49:23Z</created_at>
  <updated_at type="dateTime">2018-10-11T15:49:23Z</updated_at>
</gateway>


env = Spreedly::Environment.new('C7cRfNJGODKh4Iu5Ox3PToKjniY', '4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ', base_url: 'https://core.spreedly.com')
env.add_gateway(:barclaycard_smartpay, company: "Your company", merchant: "Your merchant name", password: "Your password")


#<Spreedly::Gateway:0x007fbc15975990
@token="6xsWpXPlVhkk1DcHvN94sGlT2xk",
@created_at="2018-01-31T15:42:08Z",
@updated_at="2018-01-31T15:42:08Z",
@gateway_type="barclaycard_smartpay",
@state="retained",
@name="Barclaycard Smartpay",
@credentials={"company"=>"Your company", "merchant"=>"Your merchant name"}>

Gateway specific response fields

A response from Barclaycard Smartpay gateway may contain an auth_code field which you can find in the 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>
     <barclaycard_smartpay>
       <auth_code>IJK2DZ</auth_code>
       <refusal_reason>Declined</refusal_reason>
       <refusal_reason_raw>Raw reason</refusal_reason_raw>
     </barclaycard_smartpay>
  </gateway_specific_response_fields>
</transaction>

Gateway specific request fields

When interacting with a Barclaycard Smartpay gateway to run transactions, there are gateway specific fields you can specify.

  • shopper_interaction
  • customer
  • house_number
  • street
  • shipping_house_number
  • shipping_street
  • date_of_birth
  • entity_type
  • nationality
  • shopper_name
  • user_agent
  • accept_header
  • device_fingerprint
  • third_party_payout

You can specify customer which is a value used to uniquely identify a customer. If supplied it can be also be used in fraud checking.

Greater address accuracy can be achieved when specifying house_number and street, and / or shipping_house_number and shipping_street, in addition to the standard address fields.

When issuing general credits (also known as payouts), the fields date_of_birth, entity_type, nationality, and shopper_name are required. They are not required for any other action.

Additionally, Barclaycard Smartpay is moving to requiring third-party payouts for general credits. To use this functionality, first ensure that you have created third-party store and review accounts and passwords and added them to your Spreedly gateway (via store_payout_account/store_payout_password and review_payout_account/review_payout_account, respectively), and then make sure to pass the third_party_payout gateway-specific flag to general credit transactions.

When using 3DS, you should use the user_agent and accept_header fields.


curl https://core.spreedly.com/v1/gateways/LlkjmEk0xNkcWrNixXa1fvNoTP4/purchase.xml \
  -u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
  -H 'Content-Type: application/xml' \
  -d '<transaction>
        <payment_method_token>56wyNnSmuA6CWYP7w0MiYCVIbW6</payment_method_token>
        <amount>100</amount>
        <currency_code>USD</currency_code>
        <gateway_specific_fields>
          <barclaycard_smartpay>
            <customer>3341</customer>
            <house_number>321</house_number>
            <street>Billing Rd.</street>
            <shipping_house_number>789</shipping_house_number>
            <shipping_street>Shipping Rd.</shipping_street>
            <date_of_birth>1990-10-11</date_of_birth>
            <entity_type>NaturalPerson</entity_type>
            <nationality>US</nationality>
            <shopper_interaction>ContAuth</shopper_interaction>
            <shopper_name>
              <firstName>Bob</firstName>
              <lastName>Jones</lastName>
              <gender>UNKNOWN</gender>
            </shopper_name>
            <user_agent>Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008052912 Firefox/3.0</user_agent>
            <accept_header>text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8</accept_header>
            <device_fingerprint>qpowl123</device_fingerprint>
          </barclaycard_smartpay>
        </gateway_specific_fields>
      </transaction>'


<transaction>
  <on_test_gateway type="boolean">true</on_test_gateway>
  <created_at type="dateTime">2018-09-05T18:18:50Z</created_at>
  <updated_at type="dateTime">2018-09-05T18:18:50Z</updated_at>
  <succeeded type="boolean">true</succeeded>
  <state>succeeded</state>
  <token>XeDdMBU3SUoelI7iUkuTpRwtPaJ</token>
  <transaction_type>Purchase</transaction_type>
  <order_id nil="true"/>
  <ip nil="true"/>
  <description nil="true"/>
  <email nil="true"/>
  <merchant_name_descriptor nil="true"/>
  <merchant_location_descriptor nil="true"/>
  <gateway_specific_fields>
    <barclaycard_smartpay>
      <customer>3341</customer>
      <house_number>321</house_number>
      <street>Billing Rd.</street>
      <shipping_house_number>789</shipping_house_number>
      <shipping_street>Shipping Rd.</shipping_street>
      <date_of_birth>1990-10-11</date_of_birth>
      <entity_type>NaturalPerson</entity_type>
      <nationality>US</nationality>
      <shopper_interaction>ContAuth</shopper_interaction>
      <shopper_name>
        <firstName>Bob</firstName>
        <lastName>Jones</lastName>
        <gender>UNKNOWN</gender>
      </shopper_name>
      <user_agent>Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008052912 Firefox/3.0</user_agent>
      <accept_header>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</accept_header>
      <device_fingerprint>qpowl123</device_fingerprint>
    </barclaycard_smartpay>
  </gateway_specific_fields>
  <gateway_specific_response_fields>
  </gateway_specific_response_fields>
  <gateway_transaction_id>66</gateway_transaction_id>
  <gateway_latency_ms type="integer">3</gateway_latency_ms>
  <amount type="integer">100</amount>
  <currency_code>USD</currency_code>
  <retain_on_success type="boolean">false</retain_on_success>
  <payment_method_added type="boolean">false</payment_method_added>
  <message key="messages.transaction_succeeded">Succeeded!</message>
  <gateway_token>Rzu5f7fDIhtqRyHBxZqCsx0BQf5</gateway_token>
  <gateway_type>test</gateway_type>
  <shipping_address>
    <name>Estevan Haag</name>
    <address1 nil="true"/>
    <address2 nil="true"/>
    <city nil="true"/>
    <state nil="true"/>
    <zip nil="true"/>
    <country nil="true"/>
    <phone_number nil="true"/>
  </shipping_address>
  <response>
    <success type="boolean">true</success>
    <message>Successful purchase</message>
    <avs_code nil="true"/>
    <avs_message nil="true"/>
    <cvv_code nil="true"/>
    <cvv_message nil="true"/>
    <pending type="boolean">false</pending>
    <result_unknown type="boolean">false</result_unknown>
    <error_code></error_code>
    <error_detail nil="true"/>
    <cancelled type="boolean">false</cancelled>
    <fraud_review nil="true"/>
    <created_at type="dateTime">2018-09-05T18:18:50Z</created_at>
    <updated_at type="dateTime">2018-09-05T18:18:50Z</updated_at>
  </response>
  <api_urls>
  </api_urls>
  <payment_method>
    <token>Jtcs8p3spY3DYSvaMS409xc4DrW</token>
    <created_at type="dateTime">2018-09-05T18:14:21Z</created_at>
    <updated_at type="dateTime">2018-09-05T18:17:10Z</updated_at>
    <email nil="true"/>
    <data nil="true"/>
    <storage_state>retained</storage_state>
    <test type="boolean">true</test>
    <last_four_digits>1111</last_four_digits>
    <first_six_digits>411111</first_six_digits>
    <card_type>visa</card_type>
    <first_name>Estevan</first_name>
    <last_name>Haag</last_name>
    <month type="integer">4</month>
    <year type="integer">2020</year>
    <address1 nil="true"/>
    <address2 nil="true"/>
    <city nil="true"/>
    <state nil="true"/>
    <zip nil="true"/>
    <country nil="true"/>
    <phone_number nil="true"/>
    <company nil="true"/>
    <full_name>Estevan Haag</full_name>
    <eligible_for_card_updater nil="true"/>
    <shipping_address1 nil="true"/>
    <shipping_address2 nil="true"/>
    <shipping_city nil="true"/>
    <shipping_state nil="true"/>
    <shipping_zip nil="true"/>
    <shipping_country nil="true"/>
    <shipping_phone_number nil="true"/>
    <payment_method_type>credit_card</payment_method_type>
    <errors>
    </errors>
    <verification_value></verification_value>
    <number>XXXX-XXXX-XXXX-1111</number>
    <fingerprint>f5ad8cbcd87e3253e1e57a817c3cde4df4f3</fingerprint>
  </payment_method>
</transaction>


env = Spreedly::Environment.new('C7cRfNJGODKh4Iu5Ox3PToKjniY', '4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ', base_url: 'https://core.spreedly.com')
env.purchase_on_gateway("LlkjmEk0xNkcWrNixXa1fvNoTP4", "56wyNnSmuA6CWYP7w0MiYCVIbW6", 4432,
  gateway_specific_fields: {
    barclaycard_smartpay: {
      customer: "19311"
    }
  }
)


#<Spreedly::Purchase:0x007fcffdc841f8
 @amount="4432",
 @created_at="2017-10-02T11:28:02Z",
 @currency_code="USD",
 @description="",
 @email="",
 @gateway_specific_fields={:barclaycard_smartpay=>{:customer=>"19311"}},
 @gateway_token="6BFNYDngHrv4RKitiOtzMaKhOJ0",
 @gateway_transaction_id="59",
 @ip="",
 @merchant_location_descriptor="",
 @merchant_name_descriptor="",
 @message="Succeeded!",
 @on_test_gateway="true",
 @order_id="",
 @payment_method=
  #<Spreedly::CreditCard:0x007fcfff96fd08
   @address1="",
   @address2="",
   @card_type="visa",
   @city="",
   @company="",
   @country="",
   @created_at="2017-09-13T08:30:12Z",
   @data="",
   @eligible_for_card_updater="",
   @email="hello@example.com",
   @errors=[],
   @fingerprint="",
   @first_name="Homer",
   @first_six_digits="411111",
   @full_name="Homer Simpson",
   @last_four_digits="1111",
   @last_name="Simpson",
   @month="3",
   @number="XXXX-XXXX-XXXX-1111",
   @phone_number="",
   @state="",
   @storage_state="retained",
   @token="FUk3o2H9KlIxHoYJ85lVrgtOk6T",
   @updated_at="2017-10-02T11:24:37Z",
   @verification_value="",
   @year="2032",
   @zip="">,
 @response=
  #<Spreedly::Response:0x007fcfff8f85a0
   @avs_code="",
   @avs_message="",
   @cancelled="false",
   @created_at="2017-10-02T11:28:02Z",
   @cvv_code="",
   @cvv_message="",
   @error_code="",
   @error_detail="",
   @fraud_review="",
   @message="Successful purchase",
   @pending="false",
   @success="true",
   @updated_at="2017-10-02T11:28:02Z">,
 @shipping_address=
  #<Spreedly::ShippingAddress:0x007fcfff93f298
   @address1="",
   @address2="",
   @city="",
   @country="",
   @name="Homer Simpson",
   @phone_number="",
   @state="",
   @zip="">,
 @state="succeeded",
 @succeeded="true",
 @token="7sRajZPiFTXczICRygp5G9iBkbt",
 @updated_at="2017-10-02T11:28:02Z">

If you’d like to request any gateway_specific_fields or gateway_specific_response_fields, please contact Support with your request and the gateway documentation for the fields of interest.