Redact

PUT /v1/payment_methods/<payment_method_token>/redact.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==


HTTPS/1.1 200 OK
{
  "transaction": {
    "on_test_gateway": false,
    "created_at": "2022-04-15T11:25:39Z",
    "updated_at": "2022-04-15T11:25:39Z",
    "succeeded": true,
    "token": "6TW5FroKua8CaebJUMcEiXzxPBj",
    "state": "succeeded",
    "gateway_specific_fields": {
    },
    "gateway_specific_response_fields": {
    },
    "transaction_type": "RedactPaymentMethod",
    "order_id": null,
    "ip": null,
    "gateway_transaction_id": null,
    "gateway_latency_ms": null,
    "message_key": "messages.transaction_succeeded",
    "message": "Succeeded!",
    "payment_method": {
      "token": "NNgAp50f3BASpah2NLovmIMQDuE",
      "created_at": "2022-04-14T18:15:18Z",
      "updated_at": "2022-04-15T11:25:39Z",
      "email": "joey@example.com",
      "data": null,
      "storage_state": "redacted",
      "test": true,
      "metadata": {
        "key": "String Value",
        "another_key": "123",
        "final_key": "true"
      },
      "callback_url": null,
      "last_four_digits": "4444",
      "first_six_digits": "555555",
      "card_type": "master",
      "first_name": "Joey",
      "last_name": "Jones",
      "month": 3,
      "year": 2029,
      "address1": "33 Lane Road",
      "address2": "Apartment 4",
      "city": "Wanaque",
      "state": "NJ",
      "zip": "31331",
      "country": "US",
      "phone_number": "919.331.3313",
      "company": "Acme Inc.",
      "full_name": "Joey Jones",
      "eligible_for_card_updater": true,
      "shipping_address1": "33 Lane Road",
      "shipping_address2": "Apartment 4",
      "shipping_city": "Wanaque",
      "shipping_state": "NJ",
      "shipping_zip": "31331",
      "shipping_country": "US",
      "shipping_phone_number": "919.331.3313",
      "issuer_identification_number": "55555555",
      "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": "b5fe350d5135ab64a8f3c1097fadefd9effb",
      "verification_value": "",
      "number": ""
    }
  }
}
<transaction>
  <on_test_gateway type="boolean">false</on_test_gateway>
  <created_at type="dateTime">2022-04-15T11:25:38Z</created_at>
  <updated_at type="dateTime">2022-04-15T11:25:38Z</updated_at>
  <succeeded type="boolean">true</succeeded>
  <token>WdtgsGYLqq6BsybRX4Nqfmmj66n</token>
  <state>succeeded</state>
  <gateway_specific_fields>
  </gateway_specific_fields>
  <gateway_specific_response_fields>
  </gateway_specific_response_fields>
  <transaction_type>RedactPaymentMethod</transaction_type>
  <order_id nil="true"></order_id>
  <ip nil="true"></ip>
  <gateway_transaction_id nil="true"></gateway_transaction_id>
  <gateway_latency_ms nil="true"></gateway_latency_ms>
  <message key="messages.transaction_succeeded">Succeeded!</message>
  <payment_method>
    <token>NNgAp50f3BASpah2NLovmIMQDuE</token>
    <created_at type="dateTime">2022-04-14T18:15:18Z</created_at>
    <updated_at type="dateTime">2022-04-15T11:25:38Z</updated_at>
    <email>joey@example.com</email>
    <data nil="true"></data>
    <storage_state>redacted</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>4444</last_four_digits>
    <first_six_digits>555555</first_six_digits>
    <card_type>master</card_type>
    <first_name>Joey</first_name>
    <last_name>Jones</last_name>
    <month type="integer">3</month>
    <year type="integer">2029</year>
    <address1>33 Lane Road</address1>
    <address2>Apartment 4</address2>
    <city>Wanaque</city>
    <state>NJ</state>
    <zip>31331</zip>
    <country>US</country>
    <phone_number>919.331.3313</phone_number>
    <company>Acme Inc.</company>
    <full_name>Joey Jones</full_name>
    <eligible_for_card_updater type="boolean">true</eligible_for_card_updater>
    <shipping_address1>33 Lane Road</shipping_address1>
    <shipping_address2>Apartment 4</shipping_address2>
    <shipping_city>Wanaque</shipping_city>
    <shipping_state>NJ</shipping_state>
    <shipping_zip>31331</shipping_zip>
    <shipping_country>US</shipping_country>
    <shipping_phone_number>919.331.3313</shipping_phone_number>
    <issuer_identification_number>55555555</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></verification_value>
    <number></number>
    <fingerprint>b5fe350d5135ab64a8f3c1097fadefd9effb</fingerprint>
  </payment_method>
</transaction>

Redact (strip of any sensitive credentials and make inactive) a payment method.

URL Parameters

Parameter Description
payment_method_token
required
The token of the payment method
format
required
One of json or xml

Request Body

Element Description
transaction Root element
❯ remove_from_gateway If the payment method is also stored at the gateway (e.g., for third party vaulting or offsite authorizations), include the token of the gateway here and it will be removed from the gateway as well as being redacted from Spreedly. This element is optional. If required, gateway_specific_fields can be used in tandem with remove_from_gateway. See your gateways guide for gateway specific field options and formatting.
❯ remove_personal_data true if personally identifiable information should be removed from the payment method and related its transactions. This element is optional.

Response Body

Notable response elements include:

Element Description
transaction 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
❯ personal_data_removal Personal data redaction information as part of this transaction, if applicable.
❯ payment_method The payment method that was redacted
❯❯ storage_state The new state of the payment method (redacted)

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