{"html":"\u003Cheader\u003E\n \u003Ch1\u003ETesting Stripe Issuing \u003Cspan class=\"beta tag\"\u003EInvite Only\u003C/span\u003E\u003C/h1\u003E\n \u003Cp\u003E\nTest your integration before going live by issuing cards and simulating purchases in test mode.\n \u003C/p\u003E\n\u003C/header\u003E\n\n\u003Csection\u003E\n\u003Caside class=\"note\"\u003E\n \u003Ch3 id=\"testing-payments\"\u003ETesting payments\u003C/h3\u003E\n \u003Cp\u003ERefer to our \u003Ca href=\"/docs/testing\"\u003Etesting\u003C/a\u003E documentation to learn more about testing your Stripe integration.\u003C/p\u003E\n\u003C/aside\u003E\n\n\u003Cp\u003EYou can issue cards and \u003Ca href=\"#simulating-purchases\"\u003Esimulate purchases\u003C/a\u003E using your own Stripe integration in test mode. This allows you to test your integration before you go live and issue cards that can be used to make real purchases.\u003C/p\u003E\n\n\u003Cp\u003ENo account balance is needed when issuing cards in test mode, and these cards can only be used for testing within your Stripe account.\u003C/p\u003E\n\n\u003Caside class=\"important amber\"\u003E\n \u003Cp\u003EWhen testing your \u003Ca href=\"/docs/issuing/authorizations#authorization-handling\"\u003Eauthorization endpoint\u003C/a\u003E, make sure that you have set the endpoint for test mode in your \u003Ca href=\"https://dashboard.stripe.com/account/issuing\"\u003EIssuing settings\u003C/a\u003E. Toggle \u003Cstrong\u003EViewing test data\u003C/strong\u003E to switch between test and live mode data and settings.\u003C/p\u003E\n\u003C/aside\u003E\u003C/section\u003E\n\n\u003Csection\u003E\n\u003Ch2 id=\"simulating-purchases\"\u003ESimulating purchases\u003C/h2\u003E\n\n\u003Cp\u003EYou can simulate a card purchase using your test \u003Ca href=\"/docs/keys\"\u003EAPI keys\u003C/a\u003E with the following process:\u003C/p\u003E\n\n\u003Col\u003E\n \u003Cli\u003E\u003Ca href=\"#create-cardholder\"\u003ECreate\u003C/a\u003E a cardholder\u003C/li\u003E\n \u003Cli\u003E\u003Ca href=\"#create-card\"\u003ECreate\u003C/a\u003E a card\u003C/li\u003E\n \u003Cli\u003E\u003Ca href=\"#retrieve-card-details\"\u003ERetrieve\u003C/a\u003E the new card’s details\u003C/li\u003E\n \u003Cli\u003E\u003Ca href=\"#create-source\"\u003ECreate\u003C/a\u003E a \u003Ca href=\"/docs/api#source_object\"\u003ESource\u003C/a\u003E object using the card\u003C/li\u003E\n \u003Cli\u003E\u003Ca href=\"#create-charge\"\u003ECreate\u003C/a\u003E an uncaptured charge using the source\u003C/li\u003E\n\u003C/ol\u003E\u003Ch3 id=\"create-cardholder\"\u003E\u003Cspan class=\"step\"\u003EStep 1: \u003C/span\u003E Create a cardholder\u003C/h3\u003E\n\u003Cp\u003EFirst, \u003Ca href=\"/docs/api#create_issuing_cardholder\"\u003Ecreate a cardholder\u003C/a\u003E with a name, billing address, and entity type. You can also provide additional information, if necessary.\u003C/p\u003E \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/issuing/cardholders \\\n-u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n-d name=\u0026quot;Jenny Rosen\u0026quot; \\\n-d email=\u0026quot;jenny.rosen@example.com\u0026quot; \\\n-d phone_number=\u0026quot;+18008675309\u0026quot; \\\n-d status=active \\\n-d type=individual \\\n-d billing[name]=\u0026quot;Jenny Rosen\u0026quot; \\\n-d billing[address][line1]=\u0026quot;1234 Main Street\u0026quot; \\\n-d billing[address][city]=\u0026quot;San Francisco\u0026quot; \\\n-d billing[address][state]=CA \\\n-d billing[address][postal_code]=94111 \\\n-d billing[address][country]=US\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncardholder = Stripe::Issuing::Cardholder.create({\n name: \u0026#39;Jenny Rosen\u0026#39;,\n email: \u0026#39;jenny.rosen@example.com\u0026#39;,\n phone_number: \u0026#39;+18008675309\u0026#39;,\n status: \u0026#39;active\u0026#39;,\n type: \u0026#39;individual\u0026#39;,\n billing: {\n name: \u0026#39;Jenny Rosen\u0026#39;,\n address: {\n line1: \u0026#39;1234 Main Street\u0026#39;,\n city: \u0026#39;San Francisco\u0026#39;,\n state: \u0026#39;CA\u0026#39;,\n postal_code: \u0026#39;94111\u0026#39;,\n country: \u0026#39;US\u0026#39;,\n },\n },\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncardholder = stripe.issuing.Cardholder.create(\n name=\u0026#39;Jenny Rosen\u0026#39;,\n email=\u0026#39;jenny.rosen@example.com\u0026#39;,\n phone_number=\u0026#39;+18008675309\u0026#39;,\n status=\u0026#39;active\u0026#39;,\n type=\u0026#39;individual\u0026#39;,\n billing={\n \u0026#39;name\u0026#39;: \u0026#39;Jenny Rosen\u0026#39;,\n \u0026#39;address\u0026#39;: {\n \u0026#39;line1\u0026#39;: \u0026#39;1234 Main Street\u0026#39;,\n \u0026#39;city\u0026#39;: \u0026#39;San Francisco\u0026#39;,\n \u0026#39;state\u0026#39;: \u0026#39;CA\u0026#39;,\n \u0026#39;postal_code\u0026#39;: \u0026#39;94111\u0026#39;,\n \u0026#39;country\u0026#39;: \u0026#39;US\u0026#39;\n }\n }\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$cardholder = \\Stripe\\Issuing\\Cardholder::create([\n \u0026#39;name\u0026#39; =\u0026gt; \u0026#39;Jenny Rosen\u0026#39;,\n \u0026#39;email\u0026#39; =\u0026gt; \u0026#39;jenny.rosen@example.com\u0026#39;,\n \u0026#39;phone_number\u0026#39; =\u0026gt; \u0026#39;+18008675309\u0026#39;,\n \u0026#39;status\u0026#39; =\u0026gt; \u0026#39;active\u0026#39;,\n \u0026#39;type\u0026#39; =\u0026gt; \u0026#39;individual\u0026#39;,\n \u0026#39;billing\u0026#39; =\u0026gt; [\n \u0026#39;name\u0026#39; =\u0026gt; \u0026#39;Jenny Rosen\u0026#39;,\n \u0026#39;address\u0026#39; =\u0026gt; [\n \u0026#39;line1\u0026#39; =\u0026gt; \u0026#39;1234 Main Street\u0026#39;,\n \u0026#39;city\u0026#39; =\u0026gt; \u0026#39;San Francisco\u0026#39;,\n \u0026#39;state\u0026#39; =\u0026gt; \u0026#39;CA\u0026#39;,\n \u0026#39;postal_code\u0026#39; =\u0026gt; \u0026#39;94111\u0026#39;,\n \u0026#39;country\u0026#39; =\u0026gt; \u0026#39;US\u0026#39;,\n ],\n ],\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; addressParams = new HashMap\u0026lt;String, Object\u0026gt;();\naddressParams.put(\u0026quot;line1\u0026quot;, \u0026quot;1234 Main Street\u0026quot;);\naddressParams.put(\u0026quot;city\u0026quot;, \u0026quot;San Francisco\u0026quot;);\naddressParams.put(\u0026quot;state\u0026quot;, \u0026quot;CA\u0026quot;);\naddressParams.put(\u0026quot;postal_code\u0026quot;, \u0026quot;94111\u0026quot;);\naddressParams.put(\u0026quot;country\u0026quot;, \u0026quot;US\u0026quot;);\n\nMap\u0026lt;String, Object\u0026gt; billingParams = new HashMap\u0026lt;String, Object\u0026gt;();\nbillingParams.put(\u0026quot;name\u0026quot;, \u0026quot;Jenny Rosen\u0026quot;);\nbillingParams.put(\u0026quot;address\u0026quot;, addressParams);\n\nMap\u0026lt;String, Object\u0026gt; cardholderParams = new HashMap\u0026lt;\u0026gt;();\ncardholderParams.put(\u0026quot;name\u0026quot;, \u0026quot;Jenny Rosen\u0026quot;);\ncardholderParams.put(\u0026quot;email\u0026quot;, \u0026quot;jenny.rosen@example.com\u0026quot;);\ncardholderParams.put(\u0026quot;phone_number\u0026quot;, \u0026quot;+18008675309\u0026quot;);\ncardholderParams.put(\u0026quot;status\u0026quot;, \u0026quot;active\u0026quot;);\ncardholderParams.put(\u0026quot;type\u0026quot;, \u0026quot;individual\u0026quot;);\ncardholderParams.put(\u0026quot;billing\u0026quot;, billingParams);\n\nCardholder cardholder = Cardholder.create(cardholderParams);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst cardholder = stripe.issuing.cardholders.create({\n name: \u0026#39;Jenny Rosen\u0026#39;,\n email: \u0026#39;jenny.rosen@example.com\u0026#39;,\n phone_number: \u0026#39;+18008675309\u0026#39;,\n status: \u0026#39;active\u0026#39;,\n type: \u0026#39;individual\u0026#39;,\n billing: {\n name: \u0026#39;Jenny Rosen\u0026#39;,\n address: {\n line1: \u0026#39;1234 Main Street\u0026#39;,\n city: \u0026#39;San Francisco\u0026#39;,\n state: \u0026#39;CA\u0026#39;,\n postal_code: \u0026#39;94111\u0026#39;,\n country: \u0026#39;US\u0026#39;,\n },\n },\n});\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\ncardholder, err := New(\u0026amp;stripe.IssuingCardholderParams{\n Billing: \u0026amp;stripe.IssuingBillingParams{\n Address: \u0026amp;stripe.AddressParams{\n Country: stripe.String(\u0026quot;US\u0026quot;),\n Line1: stripe.String(\u0026quot;1234 Main Street\u0026quot;),\n City: stripe.String(\u0026quot;San Francisco\u0026quot;),\n PostalCode: stripe.String(\u0026quot;94111\u0026quot;),\n State: stripe.String(\u0026quot;CA\u0026quot;),\n },\n Name: stripe.String(\u0026quot;Jenny Rosen\u0026quot;),\n },\n Email: stripe.String(\u0026quot;jenny.rosen@example.com\u0026quot;),\n Name: stripe.String(\u0026quot;Jenny Rosen\u0026quot;),\n PhoneNumber: stripe.String(\u0026quot;+18008675309\u0026quot;),\n Status: stripe.String(string(stripe.IssuingCardholderStatusActive)),\n Type: stripe.String(string(stripe.IssuingCardholderTypeIndividual)),\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new CardholderCreateOptions\n{\n Billing = new BillingOptions\n {\n Name = \u0026quot;Jenny Rosen\u0026quot;,\n Address = new AddressOptions\n {\n Line1 = \u0026quot;1234 Main Street\u0026quot;,\n City = \u0026quot;San Francisco\u0026quot;,\n State = \u0026quot;CA\u0026quot;,\n PostalCode = \u0026quot;94111\u0026quot;,\n Country = \u0026quot;US\u0026quot;,\n },\n },\n Email = \u0026quot;jenny.rosen@example.com\u0026quot;,\n PhoneNumber = \u0026quot;+18008675309\u0026quot;,\n Name = \u0026quot;Jenny Rosen\u0026quot;,\n Status = \u0026quot;active\u0026quot;,\n Type = \u0026quot;individual\u0026quot;,\n};\n\nvar service = new CardholderService();\nCardholder card = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\u003Ch3 id=\"create-card\"\u003E\u003Cspan class=\"step\"\u003EStep 2: \u003C/span\u003E Create a card\u003C/h3\u003E\n\u003Cp\u003EAfter creating a cardholder, you can \u003Ca href=\"/docs/api#create_issuing_card\"\u003Ecreate a card\u003C/a\u003E for them. Provide the \u003Ccode\u003Eid\u003C/code\u003E of the \u003Ccode\u003ECardholder\u003C/code\u003E object and currency. For immediate testing, create a virtual card and set its \u003Ccode\u003Estatus\u003C/code\u003E to \u003Ccode\u003Eactive\u003C/code\u003E.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/issuing/cards \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d cardholder=ich_1Cm3pZIyNTgGDVfzI83rasFP \\\n -d type=virtual \\\n -d currency=usd \\\n -d status=active\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncard = Stripe::Issuing::Card.create({\n cardholder: \u0026#39;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026#39;,\n type: \u0026#39;virtual\u0026#39;,\n currency: \u0026#39;usd\u0026#39;,\n status: \u0026#39;active\u0026#39;,\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncard = stripe.issuing.Card.create(\n cardholder=\u0026#39;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026#39;,\n type=\u0026#39;virtual\u0026#39;,\n currency=\u0026#39;usd\u0026#39;,\n status=\u0026#39;active\u0026#39;\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$card = \\Stripe\\Issuing\\Card::create([\n \u0026#39;cardholder\u0026#39; =\u0026gt; \u0026#39;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026#39;,\n \u0026#39;type\u0026#39; =\u0026gt; \u0026#39;virtual\u0026#39;,\n \u0026#39;currency\u0026#39; =\u0026gt; \u0026#39;usd\u0026#39;,\n \u0026#39;status\u0026#39; =\u0026gt; \u0026#39;active\u0026#39;,\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;cardholder\u0026quot;, \u0026quot;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026quot;);\nparams.put(\u0026quot;type\u0026quot;, \u0026quot;virtual\u0026quot;);\nparams.put(\u0026quot;currency\u0026quot;, \u0026quot;usd\u0026quot;);\nparams.put(\u0026quot;status\u0026quot;, \u0026quot;active\u0026quot;);\nCard card = Card.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst card = stripe.issuing.cards.create({\n cardholder: \u0026#39;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026#39;,\n type: \u0026#39;virtual\u0026#39;,\n currency: \u0026#39;usd\u0026#39;,\n status: \u0026#39;active\u0026#39;,\n});\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\ncard, err := New(\u0026amp;stripe.IssuingCardParams{\n Cardholder: stripe.String(\u0026quot;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026quot;),\n Currency: stripe.String(string(stripe.CurrencyUSD)),\n Type: stripe.String(string(stripe.IssuingCardTypeVirtual)),\n Status: stripe.String(string(stripe.IssuingCardStatusInactive)),\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new CardCreateOptions {\n Cardholder = \u0026quot;ich_1Cm3pZIyNTgGDVfzI83rasFP\u0026quot;,\n Type = \u0026quot;virtual\u0026quot;,\n Currency = \u0026quot;usd\u0026quot;,\n Status = \u0026quot;active\u0026quot;,\n};\n\nvar service = new CardService();\nCard card = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\u003Ch3 id=\"retrieve-card-details\"\u003E\u003Cspan class=\"step\"\u003EStep 3: \u003C/span\u003E Retrieve sensitive card details\u003C/h3\u003E\n\u003Cp\u003EFor security reasons, API responses returning a card object will not include sensitive details like the full card number, expiry date, or CVC code by default. For virtual cards, you can \u003Ca href=\"/docs/api#retrieve_issuing_card_details\"\u003Eretrieve these details\u003C/a\u003E when required.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/issuing/cards/ic_1Cm3paIyNTgGDVfzBqq1uqxR/details \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncard_details = Stripe::Issuing::Card.details(\u0026#39;ic_1Cm3paIyNTgGDVfzBqq1uqxR\u0026#39;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncard_details = stripe.issuing.Card.details(\u0026#39;ic_1Cm3paIyNTgGDVfzBqq1uqxR\u0026#39;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$card = \\Stripe\\Issuing\\Card::retrieve(\u0026#39;ic_1Cm3paIyNTgGDVfzBqq1uqxR\u0026#39;);\n$details = $card-\u0026gt;details();\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nCard card = Card.retrieve(\u0026quot;ic_1Cm3paIyNTgGDVfzBqq1uqxR\u0026quot;);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nstripe.issuing.cards.retrieveDetails(\n \u0026#39;ic_1CoYuRKEl2ztzE5GIEDjQiUI\u0026#39;,\n function (err, details) {\n // asynchronously called\n }\n);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\ndetails, err := Get(\u0026quot;ic_1CoYuRKEl2ztzE5GIEDjQiUI\u0026quot;, nil)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar service = new CardService();\nCardDetails details = service.Details(\u0026quot;ic_1CoYuRKEl2ztzE5GIEDjQiUI\u0026quot;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\n\u003Ch3 id=\"create-source\"\u003E\u003Cspan class=\"step\"\u003EStep 4: \u003C/span\u003E Create a source\u003C/h3\u003E\n\u003Cp\u003EUsing the newly issued card’s details, \u003Ca href=\"/docs/api#create_source\"\u003Ecreate a source\u003C/a\u003E. A source will allow you to create a test charge as it simulates the swipe or entry of an issue card at the time of purchase.\n If you provide address details or a CVC, these will be compared to the values that you define when creating the card, and the results of this comparison will be provided\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/sources \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d type=card \\\n -d card[number]=4000009990000006 \\\n -d card[exp_month]=8 \\\n -d card[exp_year]=2019\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nsource = Stripe::Source.create({\n type: \u0026#39;card\u0026#39;,\n card: {\n number: \u0026#39;4000009990000006\u0026#39;,\n exp_month: 8,\n exp_year: 2019,\n },\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nsource = stripe.Source.create(\n type=\u0026#39;card\u0026#39;,\n card={\n \u0026#39;number\u0026#39;: \u0026#39;4000009990000006\u0026#39;,\n \u0026#39;exp_month\u0026#39;: 8,\n \u0026#39;exp_year\u0026#39;: 2019\n }\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$source = \\Stripe\\Source::create([\n \u0026#39;type\u0026#39; =\u0026gt; \u0026#39;card\u0026#39;,\n \u0026#39;card\u0026#39; =\u0026gt; [\n \u0026#39;number\u0026#39; =\u0026gt; \u0026#39;4000009990000006\u0026#39;,\n \u0026#39;exp_month\u0026#39; =\u0026gt; 8,\n \u0026#39;exp_year\u0026#39; =\u0026gt; 2019\n ],\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; cardParams = new HashMap\u0026lt;String, Object\u0026gt;();\ncardParams.put(\u0026quot;number\u0026quot;, \u0026quot;4000009990000006\u0026quot;);\ncardParams.put(\u0026quot;exp_month\u0026quot;, 8)\ncardParams.put(\u0026quot;exp_year\u0026quot;, 2019)\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;type\u0026quot;, \u0026quot;card\u0026quot;);\nparams.put(\u0026quot;card\u0026quot;, sourceParams);\n\nSource source = Source.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst source = stripe.sources.create({\n type: \u0026#39;card\u0026#39;,\n card: {\n number: \u0026#39;4000009990000006\u0026#39;,\n exp_month: 8,\n exp_year: 2019,\n },\n);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nparams := \u0026amp;stripe.SourceObjectParams{\n Type: stripe.String(\u0026quot;card\u0026quot;),\n Currency: stripe.String(string(stripe.CurrencyUSD)),\n Card: \u0026amp;stripe.SourceOwnerParams{\n Number: stripe.String(\u0026quot;4000009990000006\u0026quot;),\n ExpMonth: stripe.String(\u0026quot;8\u0026quot;),\n ExpYear: stripe.String(\u0026quot;2019\u0026quot;),\n },\n}\ns, err := source.New(params)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\n var sourceOptions = new SourceCreateOptions\n{\n Type = SourceType.Card,\n Currency = \u0026quot;usd\u0026quot;,\n Card = new CreditCardOptions {\n Number = \u0026quot;4000009990000006\u0026quot;,\n ExpMonth = 8,\n ExpYear = 2019\n }\n};\n\nvar sourceService = new SourceService();\nSource source = sourceService.Create(sourceOptions);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\u003Ch3 id=\"create-charge\"\u003E\u003Cspan class=\"step\"\u003EStep 5: \u003C/span\u003E Create an uncaptured charge\u003C/h3\u003E\n\n\u003Cp\u003EUsing \u003Ca href=\"/docs/charges#auth-and-capture\"\u003Eauth and capture\u003C/a\u003E, create a charge that is not immediately captured.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/charges \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d source=src_1Cn6EvIyNTgGDVfzosvqD8ld \\\n -d amount=2000 \\\n -d currency=usd \\\n -d capture=false\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncharge = Stripe::Charge.create({\n source: \u0026#39;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026#39;,\n amount: 2000,\n currency: \u0026#39;usd\u0026#39;,\n capture: false,\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncharge = stripe.Charge.create(\n source=\u0026#39;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026#39;,\n amount=2000,\n currency=\u0026#39;usd\u0026#39;,\n capture=False\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$charge = \\Stripe\\Charge::create([\n \u0026#39;source\u0026#39; =\u0026gt; \u0026#39;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026#39;,\n \u0026#39;amount\u0026#39; =\u0026gt; 2000,\n \u0026#39;currency\u0026#39; =\u0026gt; \u0026#39;usd\u0026#39;,\n \u0026#39;capture\u0026#39; =\u0026gt; false,\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;source\u0026quot;, \u0026quot;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026quot;);\nparams.put(\u0026quot;amount\u0026quot;, 2000);\nparams.put(\u0026quot;currency\u0026quot;, \u0026quot;usd\u0026quot;);\nparams.put(\u0026quot;capture\u0026quot;, false);\nCharge charge = Charge.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst charge = stripe.charges.create({\n source: \u0026#39;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026#39;,\n amount: 2000,\n currency: \u0026#39;usd\u0026#39;,\n capture: false,\n);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nparams := \u0026amp;stripe.ChargeParams{\n Amount: 2000,\n Currency: \u0026quot;usd\u0026quot;,\n Capture: false,\n}\nparams.SetSource(\u0026quot;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026quot;)ch, _ := charge.New(params)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new ChargeCreateOptions {\n SourceId = \u0026quot;src_1Cn6EvIyNTgGDVfzosvqD8ld\u0026quot;,\n Amount = 2000,\n Currency = \u0026quot;usd\u0026quot;,\n Capture = false,\n};\nvar service = new ChargeService();\nCharge charge = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\u003Cp\u003EThis step results in an \u003Ca href=\"/docs/issuing/authorizations\"\u003Eauthorization request\u003C/a\u003E. If there are \u003Ca href=\"/docs/issuing/authorizations#authorization-controls\"\u003Eauthorization controls\u003C/a\u003E on the card, they are applied. If your integration is configured to receive and \u003Ca href=\"/docs/issuing/authorizations#authorization-handling\"\u003Ehandle authorization requests\u003C/a\u003E, Stripe also sends the \u003Ccode\u003Eissuing_authorization.request\u003C/code\u003E event to your test authorization endpoint.\u003C/p\u003E\n\n\u003Cp\u003EYou can test \u003Ca href=\"/docs/issuing/authorizations#purchase-currency\"\u003Einternational purchases\u003C/a\u003E by creating a charge in a currency that’s different to the card’s own currency (e.g., create a \u003Ccode\u003Egbp\u003C/code\u003E charge for a \u003Ccode\u003Eusd\u003C/code\u003E card).\u003C/p\u003E\u003C/section\u003E\n\u003Csection\u003E\n\u003Ch2 id=\"handling-authorizations\"\u003EHandling authorizations\u003C/h2\u003E\n\n\u003Cp\u003EYou can test how your integration handles changes to authorizations by replicating the possible actions that can occur.\u003C/p\u003E\n\n\u003Ch3 id=\"capturing-an-authorization-uncaptured-charge\"\u003ECapturing an authorization (uncaptured charge)\u003C/h3\u003E\n\n\u003Cp\u003ETo settle an uncaptured charge, which results in the creation of a \u003Ca href=\"/docs/api#issuing_transaction_object\"\u003ETransaction\u003C/a\u003E object, \u003Ca href=\"/docs/api#capture_charge\"\u003Ecapture the charge\u003C/a\u003E.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/charges/ch_1CmMk3IyNTgGDVfzqgWGCQr5/capture \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncharge = Stripe::Charge.capture(\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\ncharge = stripe.Charge.capture(\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$charge = \\Stripe\\Charge::retrieve(\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;);\n$charge.capture();\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nCharge charge = Charge.retrieve(\u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;);\ncharge.capture();\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst charge = stripe.Charges.capture(\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nch, _ := charge.Capture(\u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar service = new ChargeService();\nCharge charge = chargeService.Capture(\u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;, null);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\u003Ch4 id=\"partial-capture\"\u003EPartial capture\u003C/h4\u003E\n\n\u003Cp\u003EAn authorization can be captured for any amount below what has been authorized. You can partially capture a test charge by providing a value for \u003Ccode\u003Eamount\u003C/code\u003E when capturing a charge.\u003C/p\u003E\n\u003Cp\u003EPartially capturing a charge creates a \u003Ccode\u003ETransaction\u003C/code\u003E object for the amount captured, and a reversal of the remaining amount. This reversal is represented as an update to the \u003Ca href=\"/docs/api#issuing_authorization_object\"\u003EAuthorization\u003C/a\u003E object.\u003C/p\u003E\n\n\u003Ch3 id=\"reversing-an-authorization\"\u003EReversing an authorization\u003C/h3\u003E\n\n\u003Cp\u003EYou can reverse (void) an authorization that has not been captured by \u003Ca href=\"/docs/api#create_refund\"\u003Ecreating a refund\u003C/a\u003E for the uncaptured charge.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/refunds \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d charge=ch_1CmMk3IyNTgGDVfzqgWGCQr5\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nrefund = Stripe::Refund.create({\n charge: \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nrefund = stripe.Refund.create(\n charge=\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$refund = \\Stripe\\Refund::create([\n \u0026#39;charge\u0026#39; =\u0026gt; \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;charge\u0026quot;, \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;);\nRefund refund = Refund.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst refund = stripe.refunds.create({\n charge: \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n});\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nparams := \u0026amp;stripe.RefundParams{\n Charge: \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;,\n}\nref, _ := refund.New(params)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new RefundCreateOptions {\n ChargeId = \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;,\n};\nvar service = new RefundService();\nRefund refund = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\u003C/section\u003E\n\n\u003Csection\u003E\n\u003Ch2 id=\"refunding-a-captured-charge\"\u003ERefunding a captured charge\u003C/h2\u003E\n\n\u003Cp\u003ERefunding a captured charge uses the same method as refunding an uncaptured one. A \u003Ca href=\"/docs/api#issuing_transaction_object\"\u003ETransaction\u003C/a\u003E object of type \u003Ccode\u003Erefund\u003C/code\u003E is created that references the original authorization.\u003C/p\u003E \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/refunds \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d charge=ch_1CmMk3IyNTgGDVfzqgWGCQr5 \\\n -d amount=2000\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nrefund = Stripe::Refund.create({\n charge: \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n amount: 2000,\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nrefund = stripe.Refund.create(\n charge=\u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n amount=2000\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$refund = \\Stripe\\Refund::create([\n \u0026#39;charge\u0026#39; =\u0026gt; \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n \u0026#39;amount\u0026#39; =\u0026gt; 2000,\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;charge\u0026quot;, \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;);\nparams.put(\u0026quot;amount\u0026quot;, 2000);\nRefund refund = Refund.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst refund = stripe.refunds.create({\n charge: \u0026#39;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026#39;,\n amount: 2000,\n});\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nparams := \u0026amp;stripe.RefundParams{\n Charge: \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;,\n Amount: 2000,\n}\nref, _ := refund.New(params)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new RefundCreateOptions {\n ChargeId = \u0026quot;ch_1CmMk3IyNTgGDVfzqgWGCQr5\u0026quot;,\n Amount = 2000,\n};\nvar service = new RefundService();\nRefund refund = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\u003C/section\u003E\n\u003Csection\u003E\n\u003Ch2 id=\"testing-verification-outcomes\"\u003ETesting verification outcomes\u003C/h2\u003E\n\n\u003Cp\u003EIssued cards support \u003Ca href=\"/docs/issuing/authorizations#card-verification\"\u003EAVS and CVC checks\u003C/a\u003E. You can simulate authorizations that either provide the wrong information so these checks fail, or no information so the checks cannot be run. The results of these checks are represented on \u003Ccode\u003EAuthorization\u003C/code\u003E objects as values for \u003Ccode\u003Everification_data\u003C/code\u003E.\u003C/p\u003E\n\n\u003Ch3 id=\"avs-and-cvc-check\"\u003EAVS and CVC check\u003C/h3\u003E\n\n\u003Cp\u003EWhen creating a \u003Ccode\u003ESource\u003C/code\u003E object for an issued card, providing address and CVC information is optional. If they are not provided, the resulting postal code, street address, and CVC checks return \u003Ccode\u003Enot_provided\u003C/code\u003E. To test AVS and CVC checks, provide an address, a CVC, or both during source creation.\u003C/p\u003E\n \u003Cdiv class=\"tabs tabs-code animated\"\u003E\n \u003Cnav class=\"nav-languages\"\u003E\n \u003Ca data-language=\"curl\"\n \u003Ecurl\u003C/a\u003E\n \u003Ca data-language=\"ruby\"\n \u003ERuby\u003C/a\u003E\n \u003Ca data-language=\"python\"\n \u003EPython\u003C/a\u003E\n \u003Ca data-language=\"php\"\n \u003EPHP\u003C/a\u003E\n \u003Ca data-language=\"java\"\n \u003EJava\u003C/a\u003E\n \u003Ca data-language=\"node\"\n \u003ENode\u003C/a\u003E\n \u003Ca data-language=\"go\"\n \u003EGo\u003C/a\u003E\n \u003Ca data-language=\"dotnet\"\n \u003E.NET\u003C/a\u003E\n \u003C/nav\u003E\n \u003Cdiv class=\"tabs-content\"\u003E\n \n\u003Cdiv class=\"code\" data-language=\"curl\"\u003E\n \u003Cpre class=\"language-curl numbered\" \u003E\u003Ccode\u003Ecurl https://api.stripe.com/v1/sources \\\n -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \\\n -d type=card \\\n -d card[number]=4000009990000006 \\\n -d card[exp_month]=8 \\\n -d card[exp_year]=2019 \\\n -d card[cvc]=123 \\\n -d owner[address][line1]=\u0026quot;1234 Main Street\u0026quot; \\\n -d owner[address][city]=\u0026quot;San Francisco\u0026quot; \\\n -d owner[address][state]=CA \\\n -d owner[address][postal_code]=94111 \\\n -d owner[address][country]=US\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"ruby\"\u003E\n \u003Cpre class=\"language-ruby numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nsource = Stripe::Source.create({\n card: {\n number: \u0026#39;4000009990000006\u0026#39;,\n exp_month: 8,\n exp_year: 2019,\n cvc: 123,\n },\n type: \u0026#39;card\u0026#39;,\n owner: {\n address: {\n line1: \u0026#39;1234 Main Street\u0026#39;,\n city: \u0026#39;San Francisco\u0026#39;,\n state: \u0026#39;CA\u0026#39;,\n postal_code: \u0026#39;94111\u0026#39;,\n country: \u0026#39;US\u0026#39;,\n },\n },\n})\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"python\"\u003E\n \u003Cpre class=\"language-python numbered\" \u003E\u003Ccode\u003E# Set your secret key: remember to change this to your live secret key in production\n# See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.api_key = \u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;\n\nsource = stripe.Source.create(\n type=\u0026#39;card\u0026#39;,\n card={\n \u0026#39;number\u0026#39;: \u0026#39;4000009990000006\u0026#39;,\n \u0026#39;exp_month\u0026#39;: 8,\n \u0026#39;exp_year\u0026#39;: 2019,\n \u0026#39;cvc\u0026#39;: 123\n },\n owner={\n \u0026#39;address\u0026#39;: {\n \u0026#39;line1\u0026#39;: \u0026#39;1234 Main Street\u0026#39;,\n \u0026#39;city\u0026#39;: \u0026#39;San Francisco\u0026#39;,\n \u0026#39;state\u0026#39;: \u0026#39;CA\u0026#39;,\n \u0026#39;postal_code\u0026#39;: \u0026#39;94111\u0026#39;,\n \u0026#39;country\u0026#39;: \u0026#39;US\u0026#39;,\n }\n }\n)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"php\"\u003E\n \u003Cpre class=\"language-php numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\n\\Stripe\\Stripe::setApiKey(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\n$source = \\Stripe\\Source::create([\n \u0026#39;type\u0026#39; =\u0026gt; \u0026#39;card\u0026#39;,\n \u0026#39;card\u0026#39; =\u0026gt; [\n \u0026#39;number\u0026#39; =\u0026gt; \u0026#39;4000009990000006\u0026#39;,\n \u0026#39;exp_month\u0026#39; =\u0026gt; 8,\n \u0026#39;exp_year\u0026#39; =\u0026gt; 2019,\n \u0026#39;cvc\u0026#39; =\u0026gt; 123\n ],\n \u0026#39;owner\u0026#39; =\u0026gt; [\n \u0026#39;address\u0026#39; =\u0026gt; [\n \u0026#39;line1\u0026#39; =\u0026gt; \u0026#39;1234 Main Street\u0026#39;,\n \u0026#39;city\u0026#39; =\u0026gt; \u0026#39;San Francisco\u0026#39;,\n \u0026#39;state\u0026#39; =\u0026gt; \u0026#39;CA\u0026#39;,\n \u0026#39;postal_code\u0026#39; =\u0026gt; \u0026#39;94111\u0026#39;,\n \u0026#39;country\u0026#39; =\u0026gt; \u0026#39;US\u0026#39;,\n ],\n ],\n]);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"java\"\u003E\n \u003Cpre class=\"language-java numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripe.apiKey = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;;\n\nMap\u0026lt;String, Object\u0026gt; addressParams = new HashMap\u0026lt;String, Object\u0026gt;();\naddressParams.put(\u0026quot;line1\u0026quot;, \u0026quot;1234 Main Street\u0026quot;);\naddressParams.put(\u0026quot;city\u0026quot;, \u0026quot;San Francisco\u0026quot;);\naddressParams.put(\u0026quot;state\u0026quot;, \u0026quot;CA\u0026quot;);\naddressParams.put(\u0026quot;postal_code\u0026quot;, \u0026quot;94111\u0026quot;);\naddressParams.put(\u0026quot;country\u0026quot;, \u0026quot;US\u0026quot;);\n\nMap\u0026lt;String, Object\u0026gt; ownerParams = new HashMap\u0026lt;String, Object\u0026gt;();\nownerParams.put(\u0026quot;address\u0026quot;, addressParams);\n\nMap\u0026lt;String, Object\u0026gt; cardParams = new HashMap\u0026lt;String, Object\u0026gt;();\ncardParams.put(\u0026quot;number\u0026quot;, \u0026quot;4000009990000006\u0026quot;);\ncardParams.put(\u0026quot;exp_month\u0026quot;, 8)\ncardParams.put(\u0026quot;exp_year\u0026quot;, 2019)\ncardParams.put(\u0026quot;cvc\u0026quot;, 123)\n\nMap\u0026lt;String, Object\u0026gt; params = new HashMap\u0026lt;\u0026gt;();\nparams.put(\u0026quot;type\u0026quot;, \u0026quot;card\u0026quot;);\nparams.put(\u0026quot;card\u0026quot;, cardParams);\nparams.put(\u0026quot;owner\u0026quot;, ownerParams);\nSource source = Source.create(params);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"node\"\u003E\n \u003Cpre class=\"language-javascript numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nconst stripe = require(\u0026#39;stripe\u0026#39;)(\u0026#39;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026#39;);\n\nconst source = stripe.sources.create({\n type: \u0026#39;card\u0026#39;,\n card: {\n number: \u0026#39;4000009990000006\u0026#39;,\n exp_month: 8,\n exp_year: 2019,\n cvc: 123,\n },\n owner: {\n address: {\n line1: \u0026#39;1234 Main Street\u0026#39;,\n city: \u0026#39;San Francisco\u0026#39;,\n state: \u0026#39;CA\u0026#39;,\n postal_code: \u0026#39;94111\u0026#39;,\n country: \u0026#39;US\u0026#39;,\n },\n },\n);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"go\"\u003E\n \u003Cpre class=\"language-go numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nstripe.Key = \u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;\n\nparams := \u0026amp;stripe.SourceParams{\n Type: \u0026quot;card\u0026quot;,\n Card: \u0026amp;stripe.SourceOwnerParams{\n Number: stripe.String(\u0026quot;4000009990000006\u0026quot;),\n ExpMonth: stripe.String(\u0026quot;8\u0026quot;),\n ExpYear: stripe.String(\u0026quot;2019\u0026quot;),\n Cvc: stripe.String(\u0026quot;123\u0026quot;),\n },\n Owner: \u0026amp;stripe.IssuingOwnerParams{\n Address: \u0026amp;stripe.AddressParams{\n Country: stripe.String(\u0026quot;US\u0026quot;),\n Line1: stripe.String(\u0026quot;1234 Main Street\u0026quot;),\n City: stripe.String(\u0026quot;San Francisco\u0026quot;),\n PostalCode: stripe.String(\u0026quot;94111\u0026quot;),\n State: stripe.String(\u0026quot;CA\u0026quot;),\n },\n },\n}\nsou, _ := source.New(params)\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n\u003Cdiv class=\"code\" data-language=\"dotnet\"\u003E\n \u003Cpre class=\"language-dotnet numbered\" \u003E\u003Ccode\u003E// Set your secret key: remember to change this to your live secret key in production\n// See your keys here: https://dashboard.stripe.com/account/apikeys\nStripeConfiguration.SetApiKey(\u0026quot;sk_test_4eC39HqLyjWDarjtT1zdp7dc\u0026quot;);\n\nvar options = new SourceCreateOptions {\n Card = new CreditCardOptions {\n Number = \u0026quot;4000009990000006\u0026quot;,\n ExpMonth = 8,\n ExpYear = 2019,\n Cvc = 123\n }\n Type = \u0026quot;card\u0026quot;,\n Owner = new SourceOwnerOptions\n {\n Address = new AddressOptions\n {\n City = \u0026quot;San Francisco\u0026quot;,\n Country = \u0026quot;US\u0026quot;,\n Line1 = \u0026quot;1234 Main Street\u0026quot;,\n PostalCode = \u0026quot;94111\u0026quot;,\n State = \u0026quot;CA\u0026quot;,\n },\n },\n\n};\nvar service = new SourceService();\nSource source = service.Create(options);\n\u003C/code\u003E\u003C/pre\u003E\n\n\u003C/div\u003E\n\n \u003C/div\u003E\n \u003C/div\u003E\n\n\u003Cp\u003EProviding the same address as the billing address on the card results in a successful AVS check (the respective \u003Ccode\u003Everification_data\u003C/code\u003E fields return \u003Ccode\u003Ematch\u003C/code\u003E), as well as providing the correct CVC (the value \u003Ca href=\"#retrieve-card-details\"\u003Ereturned in the card details\u003C/a\u003E) for the CVC check.\u003C/p\u003E\n\n\u003Cp\u003ETo test for a failed check, create a source that has a different postal code, street address, and CVC—this results in \u003Ccode\u003Everification_data\u003C/code\u003E returning \u003Ccode\u003Emismatch\u003C/code\u003E.\u003C/p\u003E\u003C/section\u003E\n\u003Cfooter\u003E\n\n\u003Ch2 data-no-anchor\u003EQuestions?\u003C/h2\u003E\n\n\u003Cp\u003E\n We're always happy to help with code or other questions you might have. \u003Ca href='#' id='search-link' class='search-link'\u003ESearch our documentation\u003C/a\u003E, \u003Ca href='https://support.stripe.com/contact'\u003Econtact support\u003C/a\u003E, or \u003Ca href='https://stripe.com/contact/sales'\u003Econnect with our sales team\u003C/a\u003E. You can also chat live with other developers in \u003Ca href=\"irc://irc.freenode.net/stripe\"\u003E#stripe\u003C/a\u003E on freenode.\n\u003C/p\u003E\n\u003Cscript nonce=\"ueaKczkCBHV+H374/VkV0A==\"\u003E document.getElementById(\"search-link\").addEventListener(\"click\", focusSearch);\n function focusSearch() {\n document.querySelector(\".search input\").focus();\n window.scrollTo(0,0);\n }\n\u003C/script\u003E\n\u003Cp data-csat-step=\"poll\" class=\"csat-widget\"\u003E\n \u003Cspan class=\"csat-widget-text\"\u003EWas this page helpful?\u003C/span\u003E\n \u003Cspan data-csat-poll=\"yes\" class=\"csat-button csat-button-yes common-Button\"\u003EYes\u003C/span\u003E\n \u003Cspan data-csat-poll=\"no\" class=\"csat-button csat-button-no common-Button\"\u003ENo\u003C/span\u003E\n\u003C/p\u003E\n\n\u003Cdiv data-csat-step=\"input\" class=\"csat-widget\"\u003E\n \u003Cdiv class=\"csat-input\"\u003E\n \u003Cinput id=\"csat-input-text\" placeholder=\"Feedback about this page?\" class=\"common-Input\"\u003E\n \u003Cspan id=\"csat-input-submit\" class=\"csat-button common-Link\"\u003ESend\u003C/span\u003E\n \u003C/div\u003E\n \u003Cp class=\"csat-contact\"\u003E\n \u003Clabel class=\"csat-contact-option\"\u003E\n \u003Cinput id=\"csat-contact-optin-checkbox\" type=\"checkbox\"\u003E\n Yes, it’s okay to follow up by email.\n \u003C/label\u003E\n \u003C/p\u003E\n\u003C/div\u003E\n\n\u003Cp data-csat-step=\"reply\" class=\"csat-widget\"\u003E\n \u003Cspan class=\"csat-reply-main\"\u003EThank you for helping improve Stripe's documentation.\u003C/span\u003E\n \u003Cspan class=\"csat-reply-extended\"\u003EIf you need help or have any questions, please consider \u003Ca href=\"https://support.stripe.com/email\"\u003Econtacting support\u003C/a\u003E.\u003C/span\u003E\n\u003C/p\u003E\n\n\n\u003C/footer\u003E\n","head_css":"","documentation_footer_js":"","title":"Testing Stripe Issuing | Stripe Issuing","translated":null}