Credit Card
Credit Card: Update
- Ruby
update_result = gateway.credit_card.update(credit_card.token,
:cardholder_name => "New Holder",
:cvv => "456",
:number => "4111111111111111",
:expiration_date => "06/2022",
:billing_address => { :region => 'IL' },
:options => {:verify_card => true}
)
Arguments
token
required, StringAn alphanumeric value that references a specific payment method stored in your Vault. Must be less than or equal to 36 characters. If using a custom integration, you can specify what you want the token to be. If not specified, the gateway will generate one that can be accessed on the result. If using our Drop-in UI with a customer ID to vault payment methods, you can't specify your own token. Length and format of gateway-generated tokens and IDs may change at any time.
Additional Parameters
:company
String:country_code_alpha2
String:country_code_alpha3
String:country_code_numeric
String:country_name
String:extended_address
String:first_name
String:last_name
String:locality
String:update_existing
bool:postal_code
String:region
String:street_address
String:cardholder_name
String:cvv
StringA 3 or 4 digit card verification value assigned to credit cards. The CVV will never be stored in the gateway, but it can be provided with one-time requests to verify the card.
:expiration_date
StringThe expiration date, formatted MM/YY
or MM/YYYY
. May be used instead of
:expiration_month
StringThe expiration month of a credit card, formatted MM
. May be used with
:expiration_year
StringThe two or four digit year associated with a credit card, formatted YYYY
or YY
. May be used with
:number
StringThe 12-19 digit value consisting of a bank identification number (BIN) and primary account number (PAN). Passing the number directly (rather than passing a nonce) should only be done in a PCI compliant environment. If in doubt, use payment_method_nonce
with Payment Method: Update
:make_default
bool:venmo_sdk_session
String:verification_amount
String:verify_card
boolThis option prompts the gateway to verify the card's number and expiration date. It also verifies the AVS and CVV information if you've enabled AVS and CVV rules.
In some cases, cardholders may see a temporary authorization on their account after their card has been verified. The authorization will fall off the cardholder's account within a few days and will never settle.
Only returns a Credit Card Verification
result if verification runs and is unsuccessful.",
Results of a merchant-performed 3D Secure authentication. You will only need to use these fields if you've performed your own integration with a 3D Secure MPI provider (e.g. Cardinal Centinel). Otherwise, Braintree's SDKs handle this for you in our standard 3D Secure integration.
:cavv
StringCardholder authentication verification value or CAVV. The main
encrypted message issuers and card networks use to verify authentication
has occurred. Mastercard uses an AVV message and American Express uses an
AEVV message, each of which should also be passed in the
:ds_transaction_id
StringTransaction identifier resulting from 3D Secure 2 authentication. This field must be supplied for Mastercard Identity Check.
:eci_flag
StringThe value of the electronic commerce indicator (ECI) flag, which indicates the outcome of the 3DS authentication.
Accepted values for Mastercard:
00
= Failed or not attempted01
= Attempted02
= Success04
= Data-Only (Applies to limited processors)
Accepted values for all other card brands:
07
= Failed or not attempted06
= Attempted05
= Success
:three_d_secure_version
StringThe version of 3D Secure authentication used for the transaction. Required
on Visa and Mastercard authentications. Must be composed of digits separated
by periods (e.g. 1.0.2
).
:xid
StringTransaction identifier resulting from 3D Secure authentication. Uniquely identifies the transaction and sometimes required in the authorization message. Must be base64-encoded. This field will no longer be used in 3D Secure 2 authentications.
Payment method nonces vs. raw card data
While it is possible to pass both raw card data and a payment method nonce in the same call, we recommend passing only a payment method nonce.
Passing both will result in a payment method that has a mix of their attributes, with precedence given to the fields individually, then to the attributes of the payment method nonce. For example, if you pass both a card number and a payment method nonce, the payment method will have the number you passed explicitly, but the rest of the attributes will be obtained through the nonce.