Transactions

GET /v1/payment_methods/56wyNnSmuA6CWYP7w0MiYCVIbW6/transactions.<format>?order=desc HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

Example response has been truncated for brevity

HTTPS/1.1 200 OK
{
  "transactions": [
    {
      "token": "Ni8rpmqfrbT1T1ss0Bew0WsnpUs",
      "transaction_type": "RecacheSensitiveData",
      "succeeded": true,
      "data": null,
      "created_at": "2022-04-15T11:25:38Z",
      "updated_at": "2022-04-15T11:25:38Z",
      "message_key": "messages.transaction_succeeded",
      "message": "Succeeded!",
      "payment_method": {
        "token": "1rpKvP8zOUhj4Y9EDrIoIYQzzD5",
        "created_at": "2017-06-26T17:04:38Z",
        "updated_at": "2022-04-15T11:25:38Z",
        "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",
          "another_key": "123",
          "final_key": "true"
        },
        "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,
        "issuer_identification_number": "41111111",
        "payment_method_type": "credit_card",
        "bin_metadata": {
          "card_brand": "DISCOVER",
          "card_category": "PERSONAL",
          "card_type": "CREDIT",
          "issuing_bank": "DISCOVER BANK",
          "issuing_country_iso_number": "840",
          "issuing_country_iso_a2_code": "US",
          "issuing_country_iso_a3_code": "USA",
          "issuing_country_iso_name": "UNITED STATES",
          "issuing_bank_phone_number": "1 (800) 347-7000",
          "issuing_bank_website": "HTTPS://WWW.DISCOVER.COM/",
          "bin_type": "PERSONAL",
          "regulated": "Y",
          "max_pan_length": 19,
          "message": "Successful"
        },
        "errors": [

        ],
        "fingerprint": "e3cef43464fc832f6e04f187df25af497994",
        "verification_value": "XXX",
        "number": "XXXX-XXXX-XXXX-1111"
      }
    }
  ]
}
<transactions>
  <transaction>
    <token>Ni8rpmqfrbT1T1ss0Bew0WsnpUs</token>
    <transaction_type>RecacheSensitiveData</transaction_type>
    <succeeded type="boolean">true</succeeded>
    <message key="messages.transaction_succeeded">Succeeded!</message>
    <data nil="true"></data>
    <payment_method>
      <token>1rpKvP8zOUhj4Y9EDrIoIYQzzD5</token>
      <created_at type="dateTime">2017-06-26T17:04:38Z</created_at>
      <updated_at type="dateTime">2022-04-15T11:25:38Z</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>
        <another_key>123</another_key>
        <final_key>true</final_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>
      <issuer_identification_number>41111111</issuer_identification_number>
      <payment_method_type>credit_card</payment_method_type>
      <bin_metadata>
        <card_brand>DISCOVER</card_brand>
        <card_category>PERSONAL</card_category>
        <card_type>CREDIT</card_type>
        <issuing_bank>DISCOVER BANK</issuing_bank>
        <issuing_country_iso_number>840</issuing_country_iso_number>
        <issuing_country_iso_a2_code>US</issuing_country_iso_a2_code>
        <issuing_country_iso_a3_code>USA</issuing_country_iso_a3_code>
        <issuing_country_iso_name>UNITED STATES</issuing_country_iso_name>
        <issuing_bank_phone_number>1 (800) 347-7000</issuing_bank_phone_number>
        <issuing_bank_website>HTTPS://WWW.DISCOVER.COM/</issuing_bank_website>
        <bin_type>PERSONAL</bin_type>
        <regulated>Y</regulated>
        <max_pan_length>19</max_pan_length>
        <message>Successful</message>
      </bin_metadata>
      <errors>
      </errors>
      <verification_value>XXX</verification_value>
      <number>XXXX-XXXX-XXXX-1111</number>
      <fingerprint>e3cef43464fc832f6e04f187df25af497994</fingerprint>
    </payment_method>
    <created_at type="dateTime">2022-04-15T11:25:38Z</created_at>
    <updated_at type="dateTime">2022-04-15T11:25:38Z</updated_at>
  </transaction>
</transactions>

Get an ordered and paginated list of transactions executed against a specific payment method.

URL Parameters

Parameter Description
payment_method_token
required
The token of the payment method whose transactions should be fetched
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)

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.
❯ transaction_metadata The hash of key/value pairs that was included in the transaction request body.

BIN metadata is available in the response if the card is enrolled in Advanced Vault. See BIN metadata for more information.