--- title: Working with Stripe Issuing cards subtitle: Learn how to integrate Stripe Issuing with Treasury. route: /treasury/account-management/issuing-cards --- # Working with Stripe Issuing cards Learn how to integrate Stripe Issuing with Treasury. [Stripe Issuing](https://docs.stripe.com/issuing.md) lets you create physical and virtual cards using a financial account as the source of funds. ## Enable Issuing on connected accounts Request the `card_issuing` [account capability](https://docs.stripe.com/connect/account-capabilities.md) for the connected accounts on your platform and provide the [required information](https://docs.stripe.com/issuing/connect.md#required-verification-information) for onboarding. If successful, the response returns the connected account [`Account` object](https://docs.stripe.com/api/accounts/object.md) with the `capabilities` hash listing the requested capabilities as `active`. If you haven’t already, also request access to the `card_issuing` feature on the financial account. If successful, the response returns the financial account object with the features listed in the `active_features` or `pending_features` array. ## Create a card After the `card_issuing` capability is active, the sellers and service providers that own your platform’s connected accounts can create cardholders and cards. You can issue cards only through the API. A [Cardholder object](https://docs.stripe.com/api/.md#issuing_cardholder_object) represents an individual or business entity that you can issue cards to. You can begin by creating a `Cardholder` with name, billing information, and whether they’re an `individual` or `company`. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Issuing.CardholderCreateOptions { Name = "Jenny Rosen", Email = "jenny.rosen@example.com", PhoneNumber = "+18008675309", Status = "active", Type = "individual", Individual = new Stripe.Issuing.CardholderIndividualOptions { FirstName = "Jenny", LastName = "Rosen", Dob = new Stripe.Issuing.CardholderIndividualDobOptions { Day = 1, Month = 11, Year = 1981, }, }, Billing = new Stripe.Issuing.CardholderBillingOptions { Address = new AddressOptions { Line1 = "1234 Main Street", City = "San Francisco", State = "CA", PostalCode = "94111", Country = "US", }, }, }; var service = new Stripe.Issuing.CardholderService(); Stripe.Issuing.Cardholder cardholder = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.IssuingCardholderParams{ Name: stripe.String("Jenny Rosen"), Email: stripe.String("jenny.rosen@example.com"), PhoneNumber: stripe.String("+18008675309"), Status: stripe.String(string(stripe.IssuingCardholderStatusActive)), Type: stripe.String(string(stripe.IssuingCardholderTypeIndividual)), Individual: &stripe.IssuingCardholderIndividualParams{ FirstName: stripe.String("Jenny"), LastName: stripe.String("Rosen"), DOB: &stripe.IssuingCardholderIndividualDOBParams{ Day: stripe.Int64(1), Month: stripe.Int64(11), Year: stripe.Int64(1981), }, }, Billing: &stripe.IssuingCardholderBillingParams{ Address: &stripe.AddressParams{ Line1: stripe.String("1234 Main Street"), City: stripe.String("San Francisco"), State: stripe.String("CA"), PostalCode: stripe.String("94111"), Country: stripe.String("US"), }, }, }; result, err := cardholder.New(params); ``` ```java Stripe.apiKey = "<>"; CardholderCreateParams params = CardholderCreateParams.builder() .setName("Jenny Rosen") .setEmail("jenny.rosen@example.com") .setPhoneNumber("+18008675309") .setStatus(CardholderCreateParams.Status.ACTIVE) .setType(CardholderCreateParams.Type.INDIVIDUAL) .setIndividual( CardholderCreateParams.Individual.builder() .setFirstName("Jenny") .setLastName("Rosen") .setDob( CardholderCreateParams.Individual.Dob.builder() .setDay(1L) .setMonth(11L) .setYear(1981L) .build() ) .build() ) .setBilling( CardholderCreateParams.Billing.builder() .setAddress( CardholderCreateParams.Billing.Address.builder() .setLine1("1234 Main Street") .setCity("San Francisco") .setState("CA") .setPostalCode("94111") .setCountry("US") .build() ) .build() ) .build(); Cardholder cardholder = Cardholder.create(params); ``` ```node const stripe = require('stripe')('<>'); const cardholder = await stripe.issuing.cardholders.create({ name: 'Jenny Rosen', email: 'jenny.rosen@example.com', phone_number: '+18008675309', status: 'active', type: 'individual', individual: { first_name: 'Jenny', last_name: 'Rosen', dob: { day: 1, month: 11, year: 1981, }, }, billing: { address: { line1: '1234 Main Street', city: 'San Francisco', state: 'CA', postal_code: '94111', country: 'US', }, }, }); ``` ```python import stripe stripe.api_key = "<>" cardholder = stripe.issuing.Cardholder.create( name="Jenny Rosen", email="jenny.rosen@example.com", phone_number="+18008675309", status="active", type="individual", individual={ "first_name": "Jenny", "last_name": "Rosen", "dob": {"day": 1, "month": 11, "year": 1981}, }, billing={ "address": { "line1": "1234 Main Street", "city": "San Francisco", "state": "CA", "postal_code": "94111", "country": "US", }, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $cardholder = $stripe->issuing->cardholders->create([ 'name' => 'Jenny Rosen', 'email' => 'jenny.rosen@example.com', 'phone_number' => '+18008675309', 'status' => 'active', 'type' => 'individual', 'individual' => [ 'first_name' => 'Jenny', 'last_name' => 'Rosen', 'dob' => [ 'day' => 1, 'month' => 11, 'year' => 1981, ], ], 'billing' => [ 'address' => [ 'line1' => '1234 Main Street', 'city' => 'San Francisco', 'state' => 'CA', 'postal_code' => '94111', 'country' => 'US', ], ], ]); ``` ```ruby Stripe.api_key = '<>' cardholder = Stripe::Issuing::Cardholder.create({ name: 'Jenny Rosen', email: 'jenny.rosen@example.com', phone_number: '+18008675309', status: 'active', type: 'individual', individual: { first_name: 'Jenny', last_name: 'Rosen', dob: { day: 1, month: 11, year: 1981, }, }, billing: { address: { line1: '1234 Main Street', city: 'San Francisco', state: 'CA', postal_code: '94111', country: 'US', }, }, }) ``` If successful, the response returns the newly created `Cardholder` object. Create a [Card](https://docs.stripe.com/api/.md#issuing_card_object) and assign it to both the `Cardholder` you just created and a financial account. To assign the cardholder and financial account, specify the cardholder ID in the `cardholder` parameter and the financial account ID in the `financial_account` parameter of the `/v1/issuing/cards` request. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Issuing.CardCreateOptions { Cardholder = "{{CARDHOLDER_ID}}", FinancialAccount = "<>", Currency = "usd", Type = "virtual", Status = "active", }; var service = new Stripe.Issuing.CardService(); Stripe.Issuing.Card card = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.IssuingCardParams{ Cardholder: stripe.String("{{CARDHOLDER_ID}}"), FinancialAccount: stripe.String("<>"), Currency: stripe.String(string(stripe.CurrencyUSD)), Type: stripe.String(string(stripe.IssuingCardTypeVirtual)), Status: stripe.String(string(stripe.IssuingCardStatusActive)), }; result, err := card.New(params); ``` ```java Stripe.apiKey = "<>"; CardCreateParams params = CardCreateParams.builder() .setCardholder("{{CARDHOLDER_ID}}") .setFinancialAccount("<>") .setCurrency("usd") .setType(CardCreateParams.Type.VIRTUAL) .setStatus(CardCreateParams.Status.ACTIVE) .build(); Card card = Card.create(params); ``` ```node const stripe = require('stripe')('<>'); const card = await stripe.issuing.cards.create({ cardholder: '{{CARDHOLDER_ID}}', financial_account: '<>', currency: 'usd', type: 'virtual', status: 'active', }); ``` ```python import stripe stripe.api_key = "<>" card = stripe.issuing.Card.create( cardholder="{{CARDHOLDER_ID}}", financial_account="<>", currency="usd", type="virtual", status="active", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $card = $stripe->issuing->cards->create([ 'cardholder' => '{{CARDHOLDER_ID}}', 'financial_account' => '<>', 'currency' => 'usd', 'type' => 'virtual', 'status' => 'active', ]); ``` ```ruby Stripe.api_key = '<>' card = Stripe::Issuing::Card.create({ cardholder: '{{CARDHOLDER_ID}}', financial_account: '<>', currency: 'usd', type: 'virtual', status: 'active', }) ``` If successful, the response returns the newly created `Card` object. ## Handle authorizations Review the [Issuing authorizations](https://docs.stripe.com/issuing/purchases/authorizations.md) guide to properly handle authorizations. ### Create test authorizations You can test the cards you just issued by following the steps in [Testing Issuing](https://docs.stripe.com/issuing/testing.md) to simulate purchases. If the financial account associated with the issued card has [outbound_flows](https://docs.stripe.com/api/treasury/financial_accounts/create.md#create_financial_account-platform_restrictions-outbound_flows) restricted, authorizations on the card aren’t allowed. See the [Issuing transactions](https://docs.stripe.com/issuing/purchases/transactions.md#handling-other-transactions) guide for information on different transaction types you might test against. ## Handle captures and refunds See the [Issuing transactions](https://docs.stripe.com/issuing/purchases/transactions.md) guide to learn how to handle refunds and captures. ## Handle disputes See the [Issuing disputes](https://docs.stripe.com/issuing/purchases/disputes.md) guide to learn how to properly handle disputes.