Skip to content

Instantly share code, notes, and snippets.

@briancollins
Created February 7, 2012 15:29
Show Gist options
  • Save briancollins/9ce1a97c0453581044bb to your computer and use it in GitHub Desktop.
Save briancollins/9ce1a97c0453581044bb to your computer and use it in GitHub Desktop.
Create token using the old API
$.ajax({
type: "POST",
url: "https://api.stripe.com/v1",
data: {
"card[number]": "4111111111111111",
"card[exp_month]": "12",
"card[exp_year]": "2013",
"card[cvc]": "123",
"key": "pk_dl4LcpeAxUEPHN3FxzuAQQmhCGmx5",
"method": "create_token"
}
}).done(function( msg ) {
console.log(msg);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment