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, Google Pay
Spreedly 3DS2 Global Supported
Yes
Gateway Specific 3DS2 Supported
Yes
Populate MIT GSF Support
Yes (Beta)
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>7tUozIeQUFZGd2M8M3GzmIqQ2pM</token>
  <gateway_type>test</gateway_type>
  <name>Spreedly Test</name>
  <description nil="true"/>
  <merchant_profile_key nil="true"/>
  <sub_merchant_key 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_adjust type="boolean">true</supports_adjust>
    <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_offsite_synchronous_purchase type="boolean">true</supports_offsite_synchronous_purchase>
    <supports_offsite_synchronous_authorize type="boolean">true</supports_offsite_synchronous_authorize>
    <supports_3dsecure_purchase type="boolean">true</supports_3dsecure_purchase>
    <supports_3dsecure_authorize type="boolean">true</supports_3dsecure_authorize>
    <supports_3dsecure_2_mpi_purchase type="boolean">true</supports_3dsecure_2_mpi_purchase>
    <supports_3dsecure_2_mpi_authorize type="boolean">true</supports_3dsecure_2_mpi_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_network_tokenization type="boolean">true</supports_network_tokenization>
    <supports_populate_mit_fields type="boolean">true</supports_populate_mit_fields>
    <supports_inquire_by_gateway_transaction_id type="boolean">false</supports_inquire_by_gateway_transaction_id>
    <supports_inquire_by_order_id type="boolean">false</supports_inquire_by_order_id>
    <supports_transaction_retry type="boolean">true</supports_transaction_retry>
    <supports_stored_stored_credentials type="boolean">false</supports_stored_stored_credentials>
    <supports_reference_authorization type="boolean">true</supports_reference_authorization>
    <supports_3dsecure_2_purchase type="boolean">true</supports_3dsecure_2_purchase>
    <supports_3dsecure_2_authorize type="boolean">true</supports_3dsecure_2_authorize>
    <supports_stored_credentials type="boolean">true</supports_stored_credentials>
  </characteristics>
  <credentials>
  </credentials>
  <gateway_settings>
  </gateway_settings>
  <gateway_specific_fields>
    <gateway_specific_field>simulate_error</gateway_specific_field>
    <gateway_specific_field>simulate_decline</gateway_specific_field>
    <gateway_specific_field>idempotency_key</gateway_specific_field>
    <gateway_specific_field>mit_override_demo</gateway_specific_field>
  </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>google_pay</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <sandbox type="boolean">false</sandbox>
  <mode>default</mode>
  <created_at type="dateTime">2023-06-06T17:11:33Z</created_at>
  <updated_at type="dateTime">2023-06-06T17:11:33Z</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 ACHs), then you can use the Test Gateway’s api call to settle transactions.