Recache

POST /v1/payment_methods/56wyNnSmuA6CWYP7w0MiYCVIbW6/recache.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

{
  "payment_method": {
    "credit_card": {
      "verification_value": "423"
    }
  }
}
<payment_method>
  <credit_card>
    <verification_value>423</verification_value>
  </credit_card>
</payment_method>

HTTPS/1.1 200 OK
{
  "transaction": {
    "token": "1W7ydsgjmXa9pI7uX4kkD3bOS7f",
    "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"
    }
  }
}
<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>

Update a credit card’s verification value (CVV) so the card can be transacted against.

Note: A credit card must be retained in your environment in order to re-cache its CVV.

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
payment_method Root element
❯ credit_card Credit card element
❯❯ verification_value The verification value (CVV/CVC) of the card

Response Body

Element Description
transaction Root element
❯ token The token uniquely identifying this transaction (not the payment method) at Spreedly
❯ succeeded true if the transaction request was successfully executed, false otherwise
❯ payment_method The payment method whose CVV was updated

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