{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-php/issues/200","labels_url":"https://api.github.com/repos/stripe/stripe-php/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-php/issues/200/comments","events_url":"https://api.github.com/repos/stripe/stripe-php/issues/200/events","html_url":"https://github.com/stripe/stripe-php/issues/200","id":109588223,"number":200,"title":"source parameter vs card parameter","user":{"login":"Wilburunion","id":14844599,"avatar_url":"https://avatars.githubusercontent.com/u/14844599?v=3","gravatar_id":"","url":"https://api.github.com/users/Wilburunion","html_url":"https://github.com/Wilburunion","followers_url":"https://api.github.com/users/Wilburunion/followers","following_url":"https://api.github.com/users/Wilburunion/following{/other_user}","gists_url":"https://api.github.com/users/Wilburunion/gists{/gist_id}","starred_url":"https://api.github.com/users/Wilburunion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wilburunion/subscriptions","organizations_url":"https://api.github.com/users/Wilburunion/orgs","repos_url":"https://api.github.com/users/Wilburunion/repos","events_url":"https://api.github.com/users/Wilburunion/events{/privacy}","received_events_url":"https://api.github.com/users/Wilburunion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-02T23:15:38Z","updated_at":"2015-10-03T02:35:56Z","closed_at":null,"body":"At https://stripe.com/blog/unifying-payment-types-in-the-api Max Lahey stated => \"Charge objects returned by the API now have a source property in place of the card property. . . . .  You can still create a charge using the card parameter, but it is now superseded by the source parameter.\"\r\n\r\nThe format to submit the charge is \"source' => $stripe_token\r\n\r\nPreviously our code was:\r\n\r\n```php\r\n  $data = array(\r\n    'amount' => $amount * 100, // amount in cents!\r\n    'currency' => 'usd',\r\n    'card' => array(\r\n      'number' => \r\n      'exp_month' => \r\n      'exp_year' => \r\n      'name' => \r\n      'address_line1' => \r\n      'address_zip' => \r\n      'address_state' => \r\n    ),\r\n```\r\n\r\nWhich does not work using 'source' => $stripe_token because if it is submitted as:\r\n\r\n```php\r\n  $data = array(\r\n    'amount' => $amount * 100, // amount in cents!\r\n    'currency' => 'usd',\r\n    'source' => $stripe_token,\r\n     'name' => \r\n     'address_line1' => \r\n     'address_zip' => \r\n     'address_state' => \r\n```\r\n\r\nThe API returns:\r\n\r\n```\r\nPayment failed for order  Credit card declined. Received unknown parameters: name, address_line1, address_city, address_zip, address_state\r\n```\r\n\r\nHow is this now done under the 'source' parameter ??\r\n\r\nOne would \"think\" it ishould be \r\n\r\n```php\r\n  $data = array(\r\n    'amount' => $amount * 100, // amount in cents!\r\n    'currency' => 'usd',\r\n    'source' => array(\r\n      'token' => $stripe_token,    // or something similar\r\n      'name' => \r\n      'address_line1' => \r\n      'address_zip' => \r\n      'address_state' => \r\n    ),\r\n```\r\n\r\nBut I do not see 'token' as a supported parameter\r\n\r\nCan anyone explain how is it done under the new source parameter method"},"comment":{"url":"https://api.github.com/repos/stripe/stripe-php/issues/comments/145194758","html_url":"https://github.com/stripe/stripe-php/issues/200#issuecomment-145194758","issue_url":"https://api.github.com/repos/stripe/stripe-php/issues/200","id":145194758,"user":{"login":"matthewarkin","id":1103529,"avatar_url":"https://avatars.githubusercontent.com/u/1103529?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewarkin","html_url":"https://github.com/matthewarkin","followers_url":"https://api.github.com/users/matthewarkin/followers","following_url":"https://api.github.com/users/matthewarkin/following{/other_user}","gists_url":"https://api.github.com/users/matthewarkin/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewarkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewarkin/subscriptions","organizations_url":"https://api.github.com/users/matthewarkin/orgs","repos_url":"https://api.github.com/users/matthewarkin/repos","events_url":"https://api.github.com/users/matthewarkin/events{/privacy}","received_events_url":"https://api.github.com/users/matthewarkin/received_events","type":"User","site_admin":false},"created_at":"2015-10-03T02:35:56Z","updated_at":"2015-10-03T02:35:56Z","body":"A token can also include billing address details. When you create the token you'd include those details so that they're part of the token. You can't do that seperate token just for card number and other fields for the other fields \n\n\n\n—\nSent from Mailbox\n\nOn Fri, Oct 2, 2015 at 7:33 PM, Wilburunion <notifications@github.com>\nwrote:\n\n> Yes I know that . . .  the token is only card number, ccv, exp month and year - I am asking how to submit the name and address etc - WITH a charge when the token is used.\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/stripe/stripe-php/issues/200#issuecomment-145194691"}}