Spreedly Test Gateway Guide

close

Services and Compatibility

Payment Gateway Company Name:
Spreedly
Services that work with Spreedly:
  • Spreedly Test
Supported operations:
Purchase, Authorize, Capture, Refund, Void, Verify, Store, General Credit
Supported payment types:
Credit Card, Bank Account, Apple Pay, Android Pay, Google Pay
Spreedly 3DS2 Global Supported
Yes
Gateway Specific 3DS1 Supported
Yes
Gateway Specific 3D2 Supported
Yes
Regions:
North America
API endpoint URL:
Multiple; contact success@spreedly.com for more information

Authentication and Security

Specific names for credentials:
No credentials!

Onboarding Merchants in:

Additional Notes

Spreedly’s Test gateway allows you to use a number of test cards to help you verify your integration. Any card not in the list of test cards is considered a real credit card and will fail when using a Test gateway.

If you’d like to use a real credit card (a card not listed in the list of test cards), then your Spreedly account must be upgraded to a paying account.

Test gateways are a cinch to add since there are no credentials to provide:


curl https://core.spreedly.com/v1/gateways.xml \
  -u 'C7cRfNJGODKh4Iu5Ox3PToKjniY:4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ' \
  -H 'Content-Type: application/xml' \
  -d '<gateway>
        <gateway_type>test</gateway_type>
      </gateway>'

That will give you back a gateway token you can use for all of your test transactions:


<gateway>
  <token>DuJcffYeABjOMAe1QQUD6VVeIXH</token>
  <gateway_type>test</gateway_type>
  <name>Spreedly Test</name>
  <description 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">true</supports_general_credit>
    <supports_void type="boolean">true</supports_void>
    <supports_verify type="boolean">true</supports_verify>
    <supports_reference_purchase type="boolean">true</supports_reference_purchase>
    <supports_purchase_via_preauthorization type="boolean">true</supports_purchase_via_preauthorization>
    <supports_offsite_purchase type="boolean">true</supports_offsite_purchase>
    <supports_offsite_authorize type="boolean">true</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">true</supports_remove>
    <supports_fraud_review type="boolean">false</supports_fraud_review>
    <supports_disburse type="boolean">true</supports_disburse>
    <supports_reference_authorization type="boolean">true</supports_reference_authorization>
  </characteristics>
  <credentials>
  </credentials>
  <gateway_specific_fields>
  </gateway_specific_fields>
  <payment_methods>
    <payment_method>credit_card</payment_method>
    <payment_method>sprel</payment_method>
    <payment_method>third_party_token</payment_method>
    <payment_method>bank_account</payment_method>
    <payment_method>apple_pay</payment_method>
    <payment_method>android_pay</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <created_at type="dateTime">2018-06-19T17:07:39Z</created_at>
  <updated_at type="dateTime">2018-06-19T17:07:39Z</updated_at>
</gateway>


env = Spreedly::Environment.new('C7cRfNJGODKh4Iu5Ox3PToKjniY', '4UIuWybmdythfNGPqAqyQnYha6s451ri0fYAo4p3drZUi7q2Jf4b7HKg8etDtoKJ', base_url: 'https://core.spreedly.com')
env.add_gateway(:test)

That will give you back a gateway token you can use for all of your test transactions:


#<Spreedly::Gateway:0x007fe33392d308
@token="MgzEke6mCnpumOe7HOXuDdf5jK7",
@created_at="2017-07-27T17:51:05Z",
@updated_at="2017-07-27T17:51:05Z",
@gateway_type="test",
@state="retained",
@name="Spreedly Test",
@credentials={}>

And you’re all set to use the gateway for testing. Our testing guide can walk you through the testing process.

Testing Capture and Credit with the Test Gateway

If you’d like to test an authorize with the test gateway, you can use one of the test credit cards listed here. On the test gateway, both the capture operation and the credit operation always succeed unless you use an amount of 44 cents. The test gateway knows that amount and returns a failure in that case to allow you to test your handling of capture and credit failures.

Offsite Gateway Testing Using the Test Gateway

If you’re using an offsite gateway, there’s a step in the process when your customer gets redirected to the offsite gateway’s site to actually pay. When you’re using the Test Gateway and the Sprel payment method, your customer gets redirected to a special UI on the Spreedly site. From there, you can trigger a number of different error conditions directly through the UI.

There’s a point though, before you redirect your customer offsite, that you need to initiate a purchase transaction which under the hood talks to the remote gateway to know the actual url you need to redirect your customer to. And of course, it’s possible for this process to fail.

If you’re using the Test Gateway and Sprel, you can simulate this type of error by specifying an amount of 44 cents.

If you’re using the Test Gateway and Sprel and you’d like to test delayed payments that take some time to settle (like eChecks), then you can use the Test Gateway’s api call to settle transactions.