Barclaycard Smartpay gateway guide
Adding a Barclaycard Smartpay gateway
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_3dsecure_2_purchase type="boolean">true</supports_3dsecure_2_purchase>
<supports_3dsecure_2_authorize type="boolean">true</supports_3dsecure_2_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>shopper_statement</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>
Gateway specific fields
When interacting with a Barclaycard Smartpay gateway to run transactions, there are gateway specific fields you can specify:
shopper_interaction
shopper_statement
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_statement>One-year premium subscription</shopper_statement>
<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_statement>One-year premium subscription</shopper_statement>
<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>
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>
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.
3DS exemptions
By default, Barclaycard Smartpay will attempt to automatically apply for relevant exemptions using the Authentication Engine. There are a few cases where you will need to set specific fields in order to correctly mark your transaction, as outlined below:
MOTO
Pass in the field shopper_interaction
set to Moto
if you want to mark a transaction as MOTO.
MIT
Merchant initiated transactions are considered out-of-scope by default. By properly setting the shopper_interaction
and recurring_processing_model
, you can ensure that your recurring transactions have the best chance of being marked as such. Pass the appropriate values for these fields as defined here, or check out Spreedly’s implementation of stored credentials.
Updated 5 months ago