8

Is it possible to just update a customer's stored address on Stripe and not the card as well? Reason I am asking is the way I have it now, the customer can update their info, but it requires their card to be entered as well even if it is just a city change.

I'm using the following to create a token and update the customer's info

$("#payment-form").submit(function(event) {
    // disable the submit button to prevent repeated clicks
    $('#stripe-submit').attr("disabled", "disabled");

    // combine first & last name
    var fullname = $('[name="first-name"]').val() + " " + $('[name="last-name"]').val();

    // send the card details to Stripe
    Stripe.createToken({
        number: $('.card-number').val(),
        cvc: $('.card-cvc').val(),
        exp_month: $('.card-month').val(),
        exp_year: $('.card-year').val(),
        name: fullname,
        address_line1: $('[name="address"]').val(),
        address_city: $('[name="city"]').val(),
        address_state: $('[name="state"]').val(),
        address_zip: $('[name="zip"]').val(),
        address_country: $('[name="country"]').val()
    }, stripeResponseHandler);

    // prevent the form from submitting with the default action
    return false;
});

Is there something like an updateToken I could use? So I could change only certain values.

Kdeveloper
  • 13,679
  • 11
  • 41
  • 49
souporserious
  • 2,079
  • 2
  • 27
  • 47

2 Answers2

6

At the moment, no. To update any property of the card you'll need to re-collect the full card details from the customer.

brian
  • 3,344
  • 2
  • 26
  • 35
  • Is this doc'd somewhere? It's just sooo hard to believe (though I couldn't determine a way in which to do so, either). – Madbreaks May 20 '13 at 15:47
  • 3
    I work for Stripe, so I can confirm that it's not possible to update properties a card. – brian May 23 '13 at 12:09
  • Thanks Brian - it would be *extremely helpful* if this functionality were available. ;) – Madbreaks May 23 '13 at 19:45
  • @brian is there any way to update all the card details via js? From what I can tell you have to create a new card and add it to a customer, and then delete the old card... – Peter P. Feb 08 '14 at 22:17
  • @brian not sure if you still work at Stripe, but is this possible at all now? – souporserious Aug 09 '15 at 21:01
1

Looks like this has been available for a while now:

emertechie
  • 3,607
  • 2
  • 22
  • 22