Skip to content

Stripe: Deliver a testmode card

Stripe testHelpers.postTestHelpersIssuingCardsCardShippingDeliver: arguments, response, policy and SDK examples.

← Test helpers operations · Get started

Operation stripe.posttesthelpersissuingcardscardshippingdeliver

Provider route: POST /v1/test_helpers/issuing/cards/{card}/shipping/deliver. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["testHelpers"]["postTestHelpersIssuingCardsCardShippingDeliver"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.testHelpers.postTestHelpersIssuingCardsCardShippingDeliver(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.test_helpers.post_test_helpers_issuing_cards_card_shipping_deliver(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.cardstringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Fail a testmode card — response body

Referenced models: Fail a testmode card — response body

29 more schemas are linked from the tables above, on the schema pages.

Fail a testmode card — response body
FieldTypePresenceDescription and constraints
$objectRootYou can [create physical or virtual cards](https://docs.stripe.com/issuing) that are issued to cardholders.
brandstringRequired within parentThe brand of the card.
Maximum length: 5000
cancellation_reasonJSONOptional
cancellation_reason (anyOf 1)stringAlternativeThe reason why the card was canceled.
Known values: design_rejected, fulfillment_error, lost, stolen
cancellation_reason (anyOf 2)nullAlternative
cardholderModelRequired within parentExpand Create a cardholder — response body
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencystringRequired within parentThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
Format: currency
cvcstringOptionalThe card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
Maximum length: 5000
exp_monthJSONRequired within parent
exp_month (anyOf 1)integerAlternativeThe expiration month of the card.
exp_month (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
exp_yearJSONRequired within parent
exp_year (anyOf 1)integerAlternativeThe expiration year of the card.
exp_year (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
financial_accountJSONOptional
financial_account (anyOf 1)stringAlternativeThe financial account this card is attached to.
Maximum length: 5000
financial_account (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
last4stringRequired within parentThe last 4 digits of the card number.
Maximum length: 5000
latest_fraud_warningJSONOptional
latest_fraud_warning (anyOf 1)JSONAlternativeStripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
latest_fraud_warning (anyOf 1) (anyOf 1)ModelAlternativeExpand Fail a testmode card — response body — latest fraud warning value started at, type
latest_fraud_warning (anyOf 2)nullAlternative
lifecycle_controlsJSONOptional
lifecycle_controls (anyOf 1)JSONAlternativeRules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.
lifecycle_controls (anyOf 1) (anyOf 1)ModelAlternativeExpand Fail a testmode card — response body — lifecycle controls value cancel after
lifecycle_controls (anyOf 2)nullAlternative
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectRequired within parentSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
numberstringOptionalThe full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: issuing.card
personalization_designJSONOptional
personalization_design (anyOf 1)JSONAlternativeThe personalization design object belonging to this card.
personalization_design (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
personalization_design (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a personalization design — response body
personalization_design (anyOf 2)nullAlternative
replaced_byJSONOptional
replaced_by (anyOf 1)JSONAlternativeThe latest card that replaces this card, if any.
replaced_by (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
replaced_by (anyOf 1) (anyOf 2)ModelAlternativeExpand Fail a testmode card — response body
replaced_by (anyOf 2)nullAlternative
replacement_forJSONOptional
replacement_for (anyOf 1)JSONAlternativeThe card this card replaces, if any.
replacement_for (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
replacement_for (anyOf 1) (anyOf 2)ModelAlternativeExpand Fail a testmode card — response body
replacement_for (anyOf 2)nullAlternative
replacement_reasonJSONOptional
replacement_reason (anyOf 1)stringAlternativeThe reason why the previous card needed to be replaced.
Known values: damaged, expired, fulfillment_error, lost, stolen
replacement_reason (anyOf 2)nullAlternative
second_lineJSONOptional
second_line (anyOf 1)stringAlternativeText separate from cardholder name, printed on the card.
Maximum length: 5000
second_line (anyOf 2)nullAlternative
shippingJSONOptional
shipping (anyOf 1)JSONAlternativeWhere and how the card will be shipped.
shipping (anyOf 1) (anyOf 1)ModelAlternativeExpand Fail a testmode card — response body — shipping / Where and how the card will be shipped / service: express, priority, standard, type: bulk, individual
shipping (anyOf 2)nullAlternative
spending_controlsModelRequired within parentExpand Fail a testmode card — response body — spending controls
statusstringRequired within parentWhether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
Known values: active, canceled, inactive
typestringRequired within parentThe type of the card.
Known values: physical, virtual
walletsJSONOptional
wallets (anyOf 1)JSONAlternativeInformation relating to digital wallets (like Apple Pay and Google Pay).
wallets (anyOf 1) (anyOf 1)ModelAlternativeExpand Fail a testmode card — response body — wallets value apple pay, google pay, primary account identifier
wallets (anyOf 2)nullAlternative

Referenced models: Fail a testmode card — response body, Create a cardholder — response body, Create a personalization design — response body, Fail a testmode card — response body — spending controls, Fail a testmode card — response body — latest fraud warning value started at, type, Fail a testmode card — response body — lifecycle controls value cancel after, Fail a testmode card — response body — shipping / Where and how the card will be shipped / service: express, priority, standard, type: bulk, individual, Fail a testmode card — response body — wallets value apple pay, google pay, primary account identifier

Fail a testmode card — response body — latest fraud warning value started at, type
FieldTypePresenceDescription and constraints
$objectRoot
started_atJSONOptional
started_at (anyOf 1)JSONAlternative
started_at (anyOf 1) (anyOf 1)integerAlternativeTimestamp of the most recent fraud warning.
Format: unix-time
started_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
started_at (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)stringAlternativeThe type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card.
Known values: card_testing_exposure, fraud_dispute_filed, third_party_reported, user_indicated_fraud
type (anyOf 2)nullAlternative
Create a cardholder — response body — company value tax id provided
FieldTypePresenceDescription and constraints
$objectRoot
tax_id_providedbooleanRequired within parentWhether the company's business ID number was provided.

SDK function policy ID: stripe.posttesthelpersissuingcardscardshippingdeliver. Catalog operation: PostTestHelpersIssuingCardsCardShippingDeliver. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.