Transactions

Every action performed against the Spreedly API is captured as a transaction. Transactions can represent local actions, such as storing a payment method, or an external action, such as performing a purchase against a gateway.

Confirm (Offsite transactions)

Attempts to confirm a pending offsite purchase, offsite synchronous purchase or offsite synchronous authorization.

POST /v1/transactions/D4EkbtWlUtWmfK5QvhttGsBktRj/confirm.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

{
  "transaction": {
    "payment_method_token": "56wyNnSmuA6CWYP7w0MiYCVIbW6"
  }
}
HTTPS/1.1 200 OK
{
  "transaction": {
    "on_test_gateway": true,
    "created_at": "2018-11-07T15:01:45Z",
    "updated_at": "2018-11-07T15:01:45Z",
    "succeeded": true,
    "state": "succeeded",
    "token": "a8CseM5RdIhHQwsgCKTZLi9UhSo",
    "transaction_type": "Purchase",
    "order_id": null,
    "ip": null,
    "sub_merchant_key": null,
    "description": null,
    "email": null,
    "merchant_name_descriptor": null,
    "merchant_location_descriptor": null,
    "gateway_specific_fields": null,
    "gateway_specific_response_fields": {
    },
    "gateway_transaction_id": "49",
    "gateway_latency_ms": 0,
    "amount": 100,
    "currency_code": "USD",
    "retain_on_success": false,
    "payment_method_added": true,
    "message_key": "messages.transaction_succeeded",
    "message": "Succeeded!",
    "gateway_token": "T11bJAANtTWnxl36GYjKWvbNK0g",
    "gateway_type": "test",
    "response": {
      "success": true,
      "message": "Successful purchase",
      "avs_code": null,
      "avs_message": null,
      "cvv_code": null,
      "cvv_message": null,
      "pending": false,
      "result_unknown": false,
      "error_code": null,
      "error_detail": null,
      "cancelled": false,
      "fraud_review": null,
      "created_at": "2018-11-07T15:01:45Z",
      "updated_at": "2018-11-07T15:01:45Z"
    },
    "shipping_address": {
      "name": "Joe Smith",
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null
    },
    "api_urls": [
      {
        "referencing_transaction": [

        ]
      }
    ],
    "payment_method": {
      "token": "ZjcXez8r5tOkQ4wjXDCv5lZ6pKg",
      "created_at": "2018-11-07T15:01:45Z",
      "updated_at": "2018-11-07T15:01:45Z",
      "email": null,
      "data": null,
      "storage_state": "cached",
      "test": true,
      "metadata": null,
      "last_four_digits": "1111",
      "first_six_digits": "411111",
      "card_type": "visa",
      "first_name": "Joe",
      "last_name": "Smith",
      "month": 12,
      "year": 2018,
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null,
      "company": null,
      "full_name": "Joe Smith",
      "eligible_for_card_updater": null,
      "shipping_address1": null,
      "shipping_address2": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_zip": null,
      "shipping_country": null,
      "shipping_phone_number": null,
      "payment_method_type": "credit_card",
      "errors": [

      ],
      "fingerprint": "e3cef43464fc832f6e04f187df25af497994",
      "verification_value": "XXX",
      "number": "XXXX-XXXX-XXXX-1111"
    }
  }
}
<transaction>
  <on_test_gateway type="boolean">true</on_test_gateway>
  <created_at type="dateTime">2018-11-07T15:01:44Z</created_at>
  <updated_at type="dateTime">2018-11-07T15:01:44Z</updated_at>
  <succeeded type="boolean">true</succeeded>
  <state>succeeded</state>
  <token>HlOybss40Zr3hwCqqwRKBlYmXsi</token>
  <transaction_type>Purchase</transaction_type>
  <order_id nil="true"></order_id>
  <ip nil="true"></ip>
  <sub_merchant_key nil="true"></sub_merchant_key>
  <description nil="true"></description>
  <email nil="true"></email>
  <merchant_name_descriptor nil="true"></merchant_name_descriptor>
  <merchant_location_descriptor nil="true"></merchant_location_descriptor>
  <gateway_specific_fields nil="true"></gateway_specific_fields>
  <gateway_specific_response_fields>
  </gateway_specific_response_fields>
  <gateway_transaction_id>47</gateway_transaction_id>
  <gateway_latency_ms type="integer">0</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">true</payment_method_added>
  <message key="messages.transaction_succeeded">Succeeded!</message>
  <gateway_token>T11bJAANtTWnxl36GYjKWvbNK0g</gateway_token>
  <gateway_type>test</gateway_type>
  <shipping_address>
    <name>Joey Jones</name>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
  </shipping_address>
  <response>
    <success type="boolean">true</success>
    <message>Successful purchase</message>
    <avs_code nil="true"></avs_code>
    <avs_message nil="true"></avs_message>
    <cvv_code nil="true"></cvv_code>
    <cvv_message nil="true"></cvv_message>
    <pending type="boolean">false</pending>
    <result_unknown type="boolean">false</result_unknown>
    <error_code nil="true"></error_code>
    <error_detail nil="true"></error_detail>
    <cancelled type="boolean">false</cancelled>
    <fraud_review nil="true"></fraud_review>
    <created_at type="dateTime">2018-11-07T15:01:44Z</created_at>
    <updated_at type="dateTime">2018-11-07T15:01:44Z</updated_at>
  </response>
  <api_urls>
  </api_urls>
  <payment_method>
    <token>TtdNEGumPZzS7RWBiwj4ejLpHbd</token>
    <created_at type="dateTime">2018-11-07T15:01:44Z</created_at>
    <updated_at type="dateTime">2018-11-07T15:01:44Z</updated_at>
    <email nil="true"></email>
    <data nil="true"></data>
    <storage_state>cached</storage_state>
    <test type="boolean">true</test>
    <metadata nil="true"></metadata>
    <last_four_digits>1111</last_four_digits>
    <first_six_digits>411111</first_six_digits>
    <card_type>visa</card_type>
    <first_name>Joey</first_name>
    <last_name>Jones</last_name>
    <month type="integer">3</month>
    <year type="integer">2020</year>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
    <company nil="true"></company>
    <full_name>Joey Jones</full_name>
    <eligible_for_card_updater nil="true"></eligible_for_card_updater>
    <shipping_address1 nil="true"></shipping_address1>
    <shipping_address2 nil="true"></shipping_address2>
    <shipping_city nil="true"></shipping_city>
    <shipping_state nil="true"></shipping_state>
    <shipping_zip nil="true"></shipping_zip>
    <shipping_country nil="true"></shipping_country>
    <shipping_phone_number nil="true"></shipping_phone_number>
    <payment_method_type>credit_card</payment_method_type>
    <errors>
    </errors>
    <verification_value>XXX</verification_value>
    <number>XXXX-XXXX-XXXX-1111</number>
    <fingerprint>e3cef43464fc832f6e04f187df25af497994</fingerprint>
  </payment_method>
</transaction>

Braintree

  • A processing transaction with a payment_method_type of ‘paypal’ or 'venmo’ is needed to confirm this transaction.
  • A object returned in iFrame. This could contain the following parameters; state, nonce, payment_method, device_date, username

Please see our Braintree APM section for more information and reference implementations.

Response Body

Element Description
transaction Root element
❯ token The token uniquely identifying the transaction at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ message A human-readable string indicating the result of the transaction
❯ transaction_type The type of transaction, e.g., Authorization, Capture, Credit
❯ payment_method_token The token of the payment method to used

Stripe

For Stripe this offsite purchase is using APMs with a card payment.

  • A pending transaction with a payment_method of type 'stripe_apm’ is needed to confirm this transaction.
  • A payment_method_token or credit card details in a payment_method object must be passed.

Please see our Stripe APM guide for more information and reference implementations.

Request Body

Element Description
transaction Root request element
❯ payment_method_token
required
The token of the payment method to use

Response Body

Notable response elements include:

Element Description
transaction(s) Root element
❯ token The token uniquely identifying this transaction at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ message A human-readable string indicating the result of the transaction
❯ gateway_transaction_id The id of the transaction at the gateway. To be used when corresponding with the gateway or reconciling transactions
❯ retain_on_success If the payment method was set to be retained on successful completion of the transaction. To determine if the payment method was actually retained, see the payment_method/storage_state field
❯ payment_method_added If the payment method was added as part of this transaction (i.e. a direct pass-in of the payment information) vs. using an already tokenized payment method
❯ response Unmodified details of the gateway response, including the message and error_code, if applicable. For failed transactions these fields can help determine the root cause
❯ payment_method The payment method used in this transaction
❯ merchant_profile_key The token of the Merchant Profile associated with the gateway used for the transaction
❯ sub_merchant_key The token of the sub-merchant associated with the transaction.
❯ gateway_specific_response_fields A hash containing unique optional fields that a gateway may return based on certain customized options.
❯ sca_authentication The details of the SCA Authentication transaction created if performing a Spreedly Global 3DS2 transaction. See the SCA Authentication Show details for more information on this object.

Complete (3DS 2)

Attempts to complete or advance a pending 3DS 2 transaction. We require merchants to make authenticated calls to this endpoint in response to certain Spreedly.ThreeDS.Lifecycle events being emitted:

  • A pending transaction with a required_action of device_fingerprint will fire a trigger-completion event when the transaction status was updated due to a callback in the cardholder’s iFrame or when 10 seconds have elapsed. When this event is received, it is necessary to call complete so that the latest transaction state can be retrieved in case of a timeout.
  • A pending transaction with a required_action of challenge will fire a finalization-timeout when our Spreedly.ThreeDS.Lifecycle stops polling for updates after 10-15 minutes of not receiving a new status. When this event is received, it is recommended that merchants call complete so that the transaction state can be updated due to cardholder abandonment or missed callbacks.

Please see our 3DS 2 guides for more information and reference implementations.

POST /v1/transactions/D4EkbtWlUtWmfK5QvhttGsBktRj/complete.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

HTTPS/1.1 200 OK
{
  "transaction": {
    "on_test_gateway": true,
    "created_at": "2021-06-01T16:14:14Z",
    "updated_at": "2021-06-01T16:14:14Z",
    "succeeded": true,
    "state": "succeeded",
    "token": "WYWKUodgezds18eT6xdWde6TIQ6",
    "transaction_type": "Authorization",
    "order_id": null,
    "ip": null,
    "description": null,
    "email": null,
    "merchant_name_descriptor": null,
    "merchant_location_descriptor": null,
    "merchant_profile_key": null,
    "gateway_specific_fields": null,
    "gateway_specific_response_fields": {
    },
    "gateway_transaction_id": "55",
    "gateway_latency_ms": 0,
    "stored_credential_initiator": null,
    "stored_credential_reason_type": null,
    "warning": null,
    "application_id": null,
    "amount": 100,
    "currency_code": "USD",
    "retain_on_success": false,
    "payment_method_added": false,
    "smart_routed": false,
    "message_key": "messages.transaction_succeeded",
    "message": "Succeeded!",
    "gateway_token": "T11bJAANtTWnxl36GYjKWvbNK0g",
    "gateway_type": "test",
    "response": {
      "success": true,
      "message": "Successful authorize",
      "avs_code": null,
      "avs_message": null,
      "cvv_code": null,
      "cvv_message": null,
      "pending": false,
      "result_unknown": false,
      "error_code": null,
      "error_detail": null,
      "cancelled": false,
      "fraud_review": null,
      "created_at": "2021-06-01T16:14:14Z",
      "updated_at": "2021-06-01T16:14:14Z"
    },
    "shipping_address": {
      "name": "Newfirst Newlast",
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null
    },
    "api_urls": [
      {
        "referencing_transaction": [

        ]
      },
      {
        "failover_transaction": [

        ]
      }
    ],
    "attempt_3dsecure": false,
    "payment_method": {
      "token": "1rpKvP8zOUhj4Y9EDrIoIYQzzD5",
      "created_at": "2017-06-26T17:04:38Z",
      "updated_at": "2021-06-01T16:14:14Z",
      "email": "joey@example.com",
      "data": {
        "my_payment_method_identifier": "448",
        "extra_stuff": {
          "some_other_things": "Can be anything really"
        }
      },
      "storage_state": "retained",
      "test": true,
      "metadata": {
        "key": "string value"
      },
      "callback_url": null,
      "last_four_digits": "1111",
      "first_six_digits": "411111",
      "card_type": "visa",
      "first_name": "Newfirst",
      "last_name": "Newlast",
      "month": 3,
      "year": 2032,
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null,
      "company": null,
      "full_name": "Newfirst Newlast",
      "eligible_for_card_updater": true,
      "shipping_address1": null,
      "shipping_address2": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_zip": null,
      "shipping_country": null,
      "shipping_phone_number": null,
      "payment_method_type": "credit_card",
      "errors": [

      ],
      "fingerprint": "e3cef43464fc832f6e04f187df25af497994",
      "verification_value": "",
      "number": "XXXX-XXXX-XXXX-1111"
    }
  }
}
<transaction>
  <on_test_gateway type="boolean">true</on_test_gateway>
  <created_at type="dateTime">2021-06-01T16:14:13Z</created_at>
  <updated_at type="dateTime">2021-06-01T16:14:13Z</updated_at>
  <succeeded type="boolean">true</succeeded>
  <state>succeeded</state>
  <token>KMRQGOgdSGyyCOimswKxSpXFG6O</token>
  <transaction_type>Purchase</transaction_type>
  <order_id nil="true"></order_id>
  <ip nil="true"></ip>
  <description nil="true"></description>
  <email nil="true"></email>
  <merchant_name_descriptor nil="true"></merchant_name_descriptor>
  <merchant_location_descriptor nil="true"></merchant_location_descriptor>
  <merchant_profile_key nil="true"></merchant_profile_key>
  <gateway_specific_fields nil="true"></gateway_specific_fields>
  <gateway_specific_response_fields>
  </gateway_specific_response_fields>
  <gateway_transaction_id>50</gateway_transaction_id>
  <gateway_latency_ms type="integer">0</gateway_latency_ms>
  <stored_credential_initiator nil="true"></stored_credential_initiator>
  <stored_credential_reason_type nil="true"></stored_credential_reason_type>
  <warning nil="true"></warning>
  <application_id nil="true"></application_id>
  <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>
  <smart_routed type="boolean">false</smart_routed>
  <message key="messages.transaction_succeeded">Succeeded!</message>
  <gateway_token>T11bJAANtTWnxl36GYjKWvbNK0g</gateway_token>
  <gateway_type>test</gateway_type>
  <shipping_address>
    <name>Newfirst Newlast</name>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
  </shipping_address>
  <response>
    <success type="boolean">true</success>
    <message>Successful purchase</message>
    <avs_code nil="true"></avs_code>
    <avs_message nil="true"></avs_message>
    <cvv_code nil="true"></cvv_code>
    <cvv_message nil="true"></cvv_message>
    <pending type="boolean">false</pending>
    <result_unknown type="boolean">false</result_unknown>
    <error_code nil="true"></error_code>
    <error_detail nil="true"></error_detail>
    <cancelled type="boolean">false</cancelled>
    <fraud_review nil="true"></fraud_review>
    <created_at type="dateTime">2021-06-01T16:14:13Z</created_at>
    <updated_at type="dateTime">2021-06-01T16:14:13Z</updated_at>
  </response>
  <api_urls>
  </api_urls>
  <payment_method>
    <token>1rpKvP8zOUhj4Y9EDrIoIYQzzD5</token>
    <created_at>2017-06-26T17:04:38Z</created_at>
    <updated_at>2021-06-01T16:14:13Z</updated_at>
    <email>joey@example.com</email>
    <data>
      <my_payment_method_identifier>448</my_payment_method_identifier>
      <extra_stuff>
        <some_other_things>Can be anything really</some_other_things>
      </extra_stuff>
    </data>
    <storage_state>retained</storage_state>
    <test type="boolean">true</test>
    <metadata>
      <key>string value</key>
    </metadata>
    <callback_url nil="true"></callback_url>
    <last_four_digits>1111</last_four_digits>
    <first_six_digits>411111</first_six_digits>
    <card_type>visa</card_type>
    <first_name>Newfirst</first_name>
    <last_name>Newlast</last_name>
    <month type="integer">3</month>
    <year type="integer">2032</year>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
    <company nil="true"></company>
    <full_name>Newfirst Newlast</full_name>
    <eligible_for_card_updater type="boolean">true</eligible_for_card_updater>
    <shipping_address1 nil="true"></shipping_address1>
    <shipping_address2 nil="true"></shipping_address2>
    <shipping_city nil="true"></shipping_city>
    <shipping_state nil="true"></shipping_state>
    <shipping_zip nil="true"></shipping_zip>
    <shipping_country nil="true"></shipping_country>
    <shipping_phone_number nil="true"></shipping_phone_number>
    <payment_method_type>credit_card</payment_method_type>
    <errors>
    </errors>
    <verification_value></verification_value>
    <number>XXXX-XXXX-XXXX-1111</number>
    <fingerprint>e3cef43464fc832f6e04f187df25af497994</fingerprint>
  </payment_method>
  <attempt_3dsecure type="boolean">false</attempt_3dsecure>
</transaction>

Response Body

Notable response elements include:

Element Description
transaction Root element
❯ token The token uniquely identifying the transaction at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ message A human-readable string indicating the result of the transaction
❯ transaction_type The type of transaction, e.g., Authorization, Capture, Credit
❯ merchant_profile_key The token of the Merchant Profile associated with the gateway used for the transaction
❯ required_action The required action in the 3DS 2 flow, e.g., none, device_fingerprint, challenge, etc

List

GET /v1/transactions.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

Example response has been truncated for brevity

HTTPS/1.1 200 OK
{
  "transactions": [
    {
      "token": "XWV55noINCMAAjXhr1ppj0kjvCd",
      "created_at": "2017-06-22T13:19:11Z",
      "updated_at": "2017-06-22T13:19:11Z",
      "succeeded": true,
      "transaction_type": "AddGateway",
      "state": "succeeded",
      "gateway": {
        "token": "CtehwikoMnllHsr3XFfAY1EzPkN",
        "gateway_type": "test",
        "description": null,
        "merchant_profile_key": null,
        "payment_methods": [
          "credit_card",
          "sprel",
          "third_party_token",
          "bank_account",
          "apple_pay",
          "android_pay",
          "google_pay"
        ],
        "state": "retained",
        "created_at": "2017-06-22T13:19:11Z",
        "updated_at": "2017-11-27T21:08:11Z",
        "name": "Spreedly Test",
        "characteristics": [
          "purchase",
          "authorize",
          "capture",
          "credit",
          "general_credit",
          "void",
          "adjust",
          "verify",
          "reference_purchase",
          "purchase_via_preauthorization",
          "offsite_purchase",
          "offsite_authorize",
          "3dsecure_purchase",
          "3dsecure_authorize",
          "3dsecure_2_mpi_purchase",
          "3dsecure_2_mpi_authorize",
          "store",
          "remove",
          "network_tokenization",
          "reference_authorization",
          "3dsecure_2_purchase",
          "3dsecure_2_authorize"
        ],
        "credentials": [

        ],
        "gateway_settings": {
        },
        "gateway_specific_fields": [
          "simulate_error",
          "idempotency_key"
        ],
        "redacted": false,
        "sandbox": false
      },
      "message_key": "messages.transaction_succeeded",
      "message": "Succeeded!"
    },
    {
      "token": "Xqdiohe6ue8Zgb7I52j6BA843Y1",
      "created_at": "2017-06-22T14:16:23Z",
      "updated_at": "2017-06-22T14:16:23Z",
      "succeeded": true,
      "transaction_type": "AddGateway",
      "state": "succeeded",
      "gateway": {
        "token": "7NTzuQfnaNU2Jr4cVgOt7jfTVGq",
        "gateway_type": "test",
        "description": null,
        "merchant_profile_key": null,
        "payment_methods": [
          "credit_card",
          "sprel",
          "third_party_token",
          "bank_account",
          "apple_pay",
          "android_pay",
          "google_pay"
        ],
        "state": "retained",
        "created_at": "2017-06-22T14:16:23Z",
        "updated_at": "2017-11-27T21:44:49Z",
        "name": "Spreedly Test",
        "characteristics": [
          "purchase",
          "authorize",
          "capture",
          "credit",
          "general_credit",
          "void",
          "adjust",
          "verify",
          "reference_purchase",
          "purchase_via_preauthorization",
          "offsite_purchase",
          "offsite_authorize",
          "3dsecure_purchase",
          "3dsecure_authorize",
          "3dsecure_2_mpi_purchase",
          "3dsecure_2_mpi_authorize",
          "store",
          "remove",
          "network_tokenization",
          "reference_authorization",
          "3dsecure_2_purchase",
          "3dsecure_2_authorize"
        ],
        "credentials": [

        ],
        "gateway_settings": {
        },
        "gateway_specific_fields": [
          "simulate_error",
          "idempotency_key"
        ],
        "redacted": false,
        "sandbox": false
      },
      "message_key": "messages.transaction_succeeded",
      "message": "Succeeded!"
    }
  ]
}
<transactions>
  <transaction>
    <token>XWV55noINCMAAjXhr1ppj0kjvCd</token>
    <created_at type="dateTime">2017-06-22T13:19:11Z</created_at>
    <updated_at type="dateTime">2017-06-22T13:19:11Z</updated_at>
    <succeeded type="boolean">true</succeeded>
    <transaction_type>AddGateway</transaction_type>
    <state>succeeded</state>
    <message key="messages.transaction_succeeded">Succeeded!</message>
    <gateway>
      <token>CtehwikoMnllHsr3XFfAY1EzPkN</token>
      <gateway_type>test</gateway_type>
      <name>Spreedly Test</name>
      <description nil="true"></description>
      <merchant_profile_key nil="true"></merchant_profile_key>
      <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_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_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>
      </characteristics>
      <credentials>
      </credentials>
      <gateway_settings>
      </gateway_settings>
      <gateway_specific_fields>
        <gateway_specific_field>simulate_error</gateway_specific_field>
        <gateway_specific_field>idempotency_key</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>android_pay</payment_method>
        <payment_method>google_pay</payment_method>
      </payment_methods>
      <state>retained</state>
      <redacted type="boolean">false</redacted>
      <sandbox type="boolean">false</sandbox>
      <created_at type="dateTime">2017-06-22T13:19:11Z</created_at>
      <updated_at type="dateTime">2017-11-27T21:08:11Z</updated_at>
    </gateway>
  </transaction>
  <transaction>
    <token>Xqdiohe6ue8Zgb7I52j6BA843Y1</token>
    <created_at type="dateTime">2017-06-22T14:16:23Z</created_at>
    <updated_at type="dateTime">2017-06-22T14:16:23Z</updated_at>
    <succeeded type="boolean">true</succeeded>
    <transaction_type>AddGateway</transaction_type>
    <state>succeeded</state>
    <message key="messages.transaction_succeeded">Succeeded!</message>
    <gateway>
      <token>7NTzuQfnaNU2Jr4cVgOt7jfTVGq</token>
      <gateway_type>test</gateway_type>
      <name>Spreedly Test</name>
      <description nil="true"></description>
      <merchant_profile_key nil="true"></merchant_profile_key>
      <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_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_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>
      </characteristics>
      <credentials>
      </credentials>
      <gateway_settings>
      </gateway_settings>
      <gateway_specific_fields>
        <gateway_specific_field>simulate_error</gateway_specific_field>
        <gateway_specific_field>idempotency_key</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>android_pay</payment_method>
        <payment_method>google_pay</payment_method>
      </payment_methods>
      <state>retained</state>
      <redacted type="boolean">false</redacted>
      <sandbox type="boolean">false</sandbox>
      <created_at type="dateTime">2017-06-22T14:16:23Z</created_at>
      <updated_at type="dateTime">2017-11-27T21:44:49Z</updated_at>
    </gateway>
  </transaction>
</transactions>

Retrieve an ordered and paginated list of all transactions in the authenticated environment.

URL Parameters

Parameter Description
format
required
One of json or xml
order The order of the returned list. Default is asc, which returns the oldest records first. To list newer records first, use desc.
since_token The token of the item to start from (e.g., the last token received in the previous list if iterating through records)
state The transaction state on which to filter the returned list. Can be one of succeeded, failed, gateway_processing_failed, gateway_processing_result_unknown.
count The number of transactions to return. By default returns 20, maximum allowed is 100.

Response Body

Notable response elements include:

Element Description
transactions Root element
❯ token The token uniquely identifying the transaction at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ message A human-readable string indicating the result of the transaction
❯ transaction_type The type of transaction, e.g., Authorization, Capture, Credit

Show

GET /v1/transactions/D4EkbtWlUtWmfK5QvhttGsBktRj.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

HTTPS/1.1 200 OK
{
  "transaction": {
    "on_test_gateway": true,
    "created_at": "2021-06-01T16:14:14Z",
    "updated_at": "2021-06-01T16:14:14Z",
    "succeeded": true,
    "state": "succeeded",
    "token": "WYWKUodgezds18eT6xdWde6TIQ6",
    "transaction_type": "Authorization",
    "order_id": null,
    "ip": null,
    "description": null,
    "email": null,
    "merchant_name_descriptor": null,
    "merchant_location_descriptor": null,
    "merchant_profile_key": null,
    "gateway_specific_fields": null,
    "gateway_specific_response_fields": {
    },
    "gateway_transaction_id": "55",
    "gateway_latency_ms": 0,
    "stored_credential_initiator": null,
    "stored_credential_reason_type": null,
    "warning": null,
    "application_id": null,
    "amount": 100,
    "currency_code": "USD",
    "retain_on_success": false,
    "payment_method_added": false,
    "smart_routed": false,
    "message_key": "messages.transaction_succeeded",
    "message": "Succeeded!",
    "gateway_token": "T11bJAANtTWnxl36GYjKWvbNK0g",
    "gateway_type": "test",
    "response": {
      "success": true,
      "message": "Successful authorize",
      "avs_code": null,
      "avs_message": null,
      "cvv_code": null,
      "cvv_message": null,
      "pending": false,
      "result_unknown": false,
      "error_code": null,
      "error_detail": null,
      "cancelled": false,
      "fraud_review": null,
      "created_at": "2021-06-01T16:14:14Z",
      "updated_at": "2021-06-01T16:14:14Z"
    },
    "shipping_address": {
      "name": "Newfirst Newlast",
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null
    },
    "api_urls": [
      {
        "referencing_transaction": [

        ]
      },
      {
        "failover_transaction": [

        ]
      }
    ],
    "attempt_3dsecure": false,
    "payment_method": {
      "token": "1rpKvP8zOUhj4Y9EDrIoIYQzzD5",
      "created_at": "2017-06-26T17:04:38Z",
      "updated_at": "2021-06-01T16:14:14Z",
      "email": "joey@example.com",
      "data": {
        "my_payment_method_identifier": "448",
        "extra_stuff": {
          "some_other_things": "Can be anything really"
        }
      },
      "storage_state": "retained",
      "test": true,
      "metadata": {
        "key": "string value"
      },
      "callback_url": null,
      "last_four_digits": "1111",
      "first_six_digits": "411111",
      "card_type": "visa",
      "first_name": "Newfirst",
      "last_name": "Newlast",
      "month": 3,
      "year": 2032,
      "address1": null,
      "address2": null,
      "city": null,
      "state": null,
      "zip": null,
      "country": null,
      "phone_number": null,
      "company": null,
      "full_name": "Newfirst Newlast",
      "eligible_for_card_updater": true,
      "shipping_address1": null,
      "shipping_address2": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_zip": null,
      "shipping_country": null,
      "shipping_phone_number": null,
      "payment_method_type": "credit_card",
      "errors": [

      ],
      "fingerprint": "e3cef43464fc832f6e04f187df25af497994",
      "verification_value": "",
      "number": "XXXX-XXXX-XXXX-1111"
    }
  }
}
<transaction>
  <on_test_gateway type="boolean">true</on_test_gateway>
  <created_at type="dateTime">2021-06-01T16:14:13Z</created_at>
  <updated_at type="dateTime">2021-06-01T16:14:13Z</updated_at>
  <succeeded type="boolean">true</succeeded>
  <state>succeeded</state>
  <token>KMRQGOgdSGyyCOimswKxSpXFG6O</token>
  <transaction_type>Purchase</transaction_type>
  <order_id nil="true"></order_id>
  <ip nil="true"></ip>
  <description nil="true"></description>
  <email nil="true"></email>
  <merchant_name_descriptor nil="true"></merchant_name_descriptor>
  <merchant_location_descriptor nil="true"></merchant_location_descriptor>
  <merchant_profile_key nil="true"></merchant_profile_key>
  <gateway_specific_fields nil="true"></gateway_specific_fields>
  <gateway_specific_response_fields>
  </gateway_specific_response_fields>
  <gateway_transaction_id>50</gateway_transaction_id>
  <gateway_latency_ms type="integer">0</gateway_latency_ms>
  <stored_credential_initiator nil="true"></stored_credential_initiator>
  <stored_credential_reason_type nil="true"></stored_credential_reason_type>
  <warning nil="true"></warning>
  <application_id nil="true"></application_id>
  <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>
  <smart_routed type="boolean">false</smart_routed>
  <message key="messages.transaction_succeeded">Succeeded!</message>
  <gateway_token>T11bJAANtTWnxl36GYjKWvbNK0g</gateway_token>
  <gateway_type>test</gateway_type>
  <shipping_address>
    <name>Newfirst Newlast</name>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
  </shipping_address>
  <response>
    <success type="boolean">true</success>
    <message>Successful purchase</message>
    <avs_code nil="true"></avs_code>
    <avs_message nil="true"></avs_message>
    <cvv_code nil="true"></cvv_code>
    <cvv_message nil="true"></cvv_message>
    <pending type="boolean">false</pending>
    <result_unknown type="boolean">false</result_unknown>
    <error_code nil="true"></error_code>
    <error_detail nil="true"></error_detail>
    <cancelled type="boolean">false</cancelled>
    <fraud_review nil="true"></fraud_review>
    <created_at type="dateTime">2021-06-01T16:14:13Z</created_at>
    <updated_at type="dateTime">2021-06-01T16:14:13Z</updated_at>
  </response>
  <api_urls>
  </api_urls>
  <payment_method>
    <token>1rpKvP8zOUhj4Y9EDrIoIYQzzD5</token>
    <created_at>2017-06-26T17:04:38Z</created_at>
    <updated_at>2021-06-01T16:14:13Z</updated_at>
    <email>joey@example.com</email>
    <data>
      <my_payment_method_identifier>448</my_payment_method_identifier>
      <extra_stuff>
        <some_other_things>Can be anything really</some_other_things>
      </extra_stuff>
    </data>
    <storage_state>retained</storage_state>
    <test type="boolean">true</test>
    <metadata>
      <key>string value</key>
    </metadata>
    <callback_url nil="true"></callback_url>
    <last_four_digits>1111</last_four_digits>
    <first_six_digits>411111</first_six_digits>
    <card_type>visa</card_type>
    <first_name>Newfirst</first_name>
    <last_name>Newlast</last_name>
    <month type="integer">3</month>
    <year type="integer">2032</year>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <state nil="true"></state>
    <zip nil="true"></zip>
    <country nil="true"></country>
    <phone_number nil="true"></phone_number>
    <company nil="true"></company>
    <full_name>Newfirst Newlast</full_name>
    <eligible_for_card_updater type="boolean">true</eligible_for_card_updater>
    <shipping_address1 nil="true"></shipping_address1>
    <shipping_address2 nil="true"></shipping_address2>
    <shipping_city nil="true"></shipping_city>
    <shipping_state nil="true"></shipping_state>
    <shipping_zip nil="true"></shipping_zip>
    <shipping_country nil="true"></shipping_country>
    <shipping_phone_number nil="true"></shipping_phone_number>
    <payment_method_type>credit_card</payment_method_type>
    <errors>
    </errors>
    <verification_value></verification_value>
    <number>XXXX-XXXX-XXXX-1111</number>
    <fingerprint>e3cef43464fc832f6e04f187df25af497994</fingerprint>
  </payment_method>
  <attempt_3dsecure type="boolean">false</attempt_3dsecure>
</transaction>

Get the transaction with the given token.

URL Parameters

Parameter Description
transaction_token
required
The token identifying this transaction at Spreedly
format
required
One of json or xml

Response Body

Notable response elements include:

Element Description
transaction Root element
❯ token The token uniquely identifying the transaction at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ message A human-readable string indicating the result of the transaction
❯ transaction_type The type of transaction, e.g., Authorization, Capture, Credit
❯ merchant_profile_key The token of the Merchant Profile associated with the gateway used for the transaction

Transcript

GET /v1/transactions/<transaction_token>/transcript HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==


HTTPS/1.1 200 OK
[*>] POST to https://spreedly-echo.herokuapp.com


          Content-Type: application/json
    X-App-Id: 1234
    X-App-Secret: [FILTERED]



          {
    "product_id":"916593",
    "card_number":"[FILTERED]",
    "card_cvv":"[FILTERED]",
    "first_name":"Newfirst",
    "last_name":"Newlast",
    "year":"2032",
    "month":"3"
  }


[<*] Response 200 received in 0s

Date: Thu, 27 Jul 2017 17:55:48 GMT
Connection: close
Host: spreedly-echo.herokuapp.com
Accept: */*
User_agent: spreedly-agent/Typhoeus 0.6.9
X_request_id: e7473785-4070-4780-9e3a-66a84bbd2ca6
X_forwarded_for: 167.88.149.182
X_forwarded_proto: https
X_forwarded_port: 443
Via: 1.1 vegur, 1.1 vegur
Connect_time: 2
X_request_start: 1501178148676
Total_route_time: 0
X-Runtime: 0.000143
Server: thin 1.6.2 codename Doc Brown

HOST: spreedly-echo.herokuapp.com
CONNECTION: close
ACCEPT: */*
USER_AGENT: spreedly-agent/Typhoeus 0.6.9
X_REQUEST_ID: e7473785-4070-4780-9e3a-66a84bbd2ca6
X_FORWARDED_FOR: 167.88.149.182
X_FORWARDED_PROTO: https
X_FORWARDED_PORT: 443
VIA: 1.1 vegur
CONNECT_TIME: 2
X_REQUEST_START: 1501178148676
TOTAL_ROUTE_TIME: 0


          {
    "product_id":"916593",
    "card_number":"[FILTERED]",
    "card_cvv":"",
    "first_name":"Newfirst",
    "last_name":"Newlast",
    "year":"2032",
    "month":"3"
  }

View the exchange between Spreedly and the external service (gateway, receiver, etc…) for the given transaction in a human-readable, text format. The transcript is scrubbed of sensitive information so you can email it to external support representatives to help in debugging and other support tasks.

As of December 31, 2022, Spreedly retains transaction transcripts for 90 days after the initial date of the transaction. Transcript requests for transactions which are older than 90 days will return a 404 http response.

URL Parameters

Parameter Description
transaction_token
required
The token identifying the transaction whose transcript is being requested

Response Body

Text formatted representation of the communication between Spreedly and the external service.