Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Headers

Idempotency-Key
string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Maximum string length: 255

Path Parameters

id
string
required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Body

application/json
name
string

Name on the test order. Defaults to the admin's name.

phone_number
string

Phone number on the test order, in E.164 format.

Response

Test order created

id
string
required
object
string
required
status
enum<string>
required
Available options:
succeeded,
pending,
failed,
refunded,
partially_refunded,
disputed
livemode
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
metadata
object | null
required
amount
integer
required

Amount charged after discounts, in the smallest currency unit (79 = $0.79).

currency
string
required
amount_refunded
integer
required

Amount refunded so far, in the smallest currency unit.

customer
required

ID by default, full object when expanded

checkout
string | null
required

Null for a renewal, which no checkout started.

billing_reason
enum<string> | null
required

As Stripe names the invoice: subscription_create for the purchase that started a subscription, subscription_cycle for each paid renewal after it. Null for a one-time purchase.

Available options:
subscription_create,
subscription_cycle,
null
subscription
string | null
required

The subscription this order started or renewed.

billing_address
object | null
required
shipping_address
object | null
required
charge
string | null
required
line_items
object[]