Operations (sample payloads)
Main operations
Create card (Advanced)
Create a card in a customer account. Sample Input Sample Output
Create charge
Creates a charge for a credit card or other payment source. Sample Input Sample Output
Create coupon
Creates a new coupon. Sample Input
{
"duration": "repeating",
"discount": {
"percent_off": 20
},
"duration_in_months": 3,
"id": "SUMMER20",
"max_redemptions": 100,
"redeem_by": "2023-08-31T23:59:59Z"
}
Sample Output
Create customer
Create a new customer. Sample Input Sample Output
{
"id": "cus_1234567890abcdef",
"object": "customer",
"created": 1623456789,
"email": "johndoe@example.com",
"name": "John Doe",
"description": "Loyal customer since 2020",
"phone": "+1234567890",
"livemode": false,
"currency": "usd",
"default_source": "card_1234567890abcdef",
"delinquent": false,
"discount": null,
"invoice_prefix": "ABC123",
"account_balance": 1000,
"shipping": {
"name": "John Doe",
"address": \{
"line1": "456 Elm St",
"city": "Othertown",
"country": "US",
"postal_code": "67890",
"state": "NY"
\},
"phone": "+1987654321"
},
"sources": {
"object": "list",
"data": [
{
"id": "card_1234567890abcdef"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_1234567890abcdef/sources"
},
"subscriptions": \{
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_1234567890abcdef/subscriptions"
\},
"metadata": {}
}
Create subscription
Creates a new subscription on an existing customer. Sample Input Sample Output
{
"id": "sub_1234567890abcdef",
"object": "subscription",
"billing_cycle_anchor": 1623456789,
"collection_method": "charge_automatically",
"created": 1623456789,
"current_period_end": 1626048789,
"current_period_start": 1623456789,
"customer": "cus_1234567890abcdef",
"default_payment_method": "pm_1234567890abcdef",
"items": {
"object": "list",
"data": [
{
"id": "si_1234567890abcdef",
"object": "subscription_item",
"created": 1623456789,
"plan": \{
"id": "price_1234567890abcdef",
"object": "plan",
"active": true,
"amount": 1000,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"product": "prod_1234567890abcdef"
\},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"currency": "usd",
"product": "prod_1234567890abcdef",
"recurring": \{
"interval": "month",
"interval_count": 1
\},
"unit_amount": 1000
},
"quantity": 1,
"subscription": "sub_1234567890abcdef"
}
],
"has_more": false,
"total_count": 1
},
"latest_invoice": "in_1234567890abcdef",
"livemode": false,
"metadata": {},
"start_date": 1623456789,
"status": "trialing",
"trial_end": 1624666389,
"trial_start": 1623456789
}
Delete card
Delete a card from a customer. Sample Input
\{
"customer_id": "cus_1234567890abcdef",
"card_id": "card_1234567890abcdef"
\}
Sample Output
\{
"id": "card_1234567890abcdef",
"object": "card",
"deleted": true
\}
Delete subscription
Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription. Its subscription status will be set to canceled. Sample Input
\{
"subscription_id": "sub_1234567890abcdef",
"invoice_now": true,
"prorate": false
\}
Sample Output
Get card
Returns information about a card. Sample Input Sample Output
Get charge
Retrieves the details of a charge that has previously been created. Sample Input
{
"charge_id": "ch_3N2XpKHSaWXyvFpK1eAyckQm"
}
Sample Output
{
"id": "ch_3N2XpKHSaWXyvFpK1eAyckQm",
"object": "charge",
"amount": 2000,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3N2XpKHSaWXyvFpK1eAyckQm",
"billing_details": {
"address": \{
"city": "San Francisco",
"country": "US",
"line1": "123 Market St",
"line2": null,
"postal_code": "94105",
"state": "CA"
\},
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+14155551234"
},
"calculated_statement_descriptor": "EXAMPLE INC",
"captured": true,
"created": 1620000000,
"currency": "usd",
"customer": "cus_4fdAW5ftNQow1a",
"description": "Example charge for product XYZ",
"destination": null,
"dispute": null,
"disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
"invoice": null,
"livemode": false,
"metadata": {},
"on_behalf_of": null,
"order": null,
"outcome": \{
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 32,
"seller_message": "Payment complete.",
"type": "authorized"
\},
"paid": true,
"payment_intent": "pi_3N2XpKHSaWXyvFpK1eAyckQm",
"payment_method": "pm_1N2XpKHSaWXyvFpK1eAyckQm",
"payment_method_details": {
"card": {
"brand": "visa",
"checks": \{
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
\},
"country": "US",
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "Xt5EWLLDS7FJjR1c",
"funding": "credit",
"installments": null,
"last4": "4242",
"network": "visa",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"receipt_email": "john.doe@example.com",
"receipt_number": "1234-5678",
"receipt_url": "https://pay.stripe.com/receipts/...",
"refunded": false,
"refunds": \{
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_3N2XpKHSaWXyvFpK1eAyckQm/refunds"
\},
"review": null,
"shipping": null,
"source": null,
"source_transfer": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
Get customer
Returns information about a customer. Sample Input
{
"customer_id": "cus_1234567890abcdef"
}
Sample Output
{
"id": "cus_1234567890abcdef",
"object": "customer",
"account_balance": 0,
"created": 1622505600,
"currency": "usd",
"default_source": "card_1234567890abcdef",
"delinquent": false,
"description": "John Doe - Premium Customer",
"discount": null,
"email": "john.doe@example.com",
"invoice_prefix": "INV",
"livemode": false,
"metadata": \{
"order_id": "ord_1234",
"customer_type": "premium"
\},
"shipping": {
"address": \{
"city": "San Francisco",
"country": "US",
"line1": "123 Main St",
"line2": "Apt 4B",
"postal_code": "94105",
"state": "CA"
\},
"name": "John Doe",
"phone": "+14155551234"
},
"sources": {
"object": "list",
"data": [
{
"id": "card_1234567890abcdef"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_1234567890abcdef/sources"
},
"subscriptions": {
"object": "list",
"data": [
{
"id": "sub_1234567890abcdef",
"object": "subscription",
"application_fee_percent": null,
"billing": "charge_automatically",
"billing_cycle_anchor": 1622505600,
"cancel_at_period_end": false,
"canceled_at": null,
"created": 1622505600,
"current_period_end": 1625097600,
"current_period_start": 1622505600,
"customer": "cus_1234567890abcdef",
"days_until_due": null,
"discount": null,
"ended_at": null,
"items": {
"object": "list",
"data": [
{
"id": "si_1234567890abcdef",
"object": "subscription_item",
"created": 1622505600,
"metadata": {},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"amount": 1999,
"billing_scheme": "per_unit",
"created": 1622419200,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"usage_type": "licensed"
},
"quantity": 1,
"subscription": "sub_1234567890abcdef"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/subscription_items?subscription=sub_1234567890abcdef"
},
"livemode": false,
"metadata": {},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"amount": 1999,
"billing_scheme": "per_unit",
"created": 1622419200,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"usage_type": "licensed"
},
"quantity": 1,
"start": 1622505600,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_1234567890abcdef/subscriptions"
}
}
Get invoice
Returns information about an invoice. Sample Input Sample Output
Get plan
Returns information about a plan. Sample Input Sample Output
Get product
Returns information about a product. Sample Input
{
"product_id": "prod_1234567890abcdef"
}
Sample Output
Get subscription
Returns information about a subscription. Sample Input
{
"subscription_id": "sub_1234567890abcdef"
}
Sample Output
{
"id": "sub_1234567890abcdef",
"object": "subscription",
"application_fee_percent": null,
"billing": "charge_automatically",
"billing_cycle_anchor": 1623456789,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"collection_method": "charge_automatically",
"created": 1623456789,
"current_period_end": 1626048789,
"current_period_start": 1623456789,
"customer": "cus_1234567890abcdef",
"days_until_due": null,
"default_payment_method": "pm_1234567890abcdef",
"default_source": null,
"default_tax_rates": [],
"discount": null,
"ended_at": null,
"invoice_customer_balance_settings": {
"consume_applied_balance_on_void": true
},
"items": {
"object": "list",
"data": [
{
"id": "si_1234567890abcdef",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1623456789,
"metadata": {},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1623456789,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1623456789,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_1234567890abcdef",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
\},
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"quantity": 1,
"subscription": "sub_1234567890abcdef",
"tax_rates": []
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/subscription_items?subscription=sub_1234567890abcdef"
},
"latest_invoice": "in_1234567890abcdef",
"livemode": false,
"metadata": {},
"next_pending_invoice_item_invoice": null,
"pause_collection": null,
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1623456789,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"quantity": 1,
"schedule": null,
"start": 1623456789,
"start_date": 1623456789,
"status": "active",
"tax_percent": null,
"transfer_data": null,
"trial_end": null,
"trial_start": null
}
Get subscription item
Returns information about a subscription item. Sample Input Sample Output
{
"id": "si_1234567890abcdef",
"object": "subscription_item",
"billing_thresholds": {
"usage_gte": "1000"
},
"created": 1623456789,
"metadata": {},
"plan": {
"id": "plan_9876543210fedcba",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1623400000,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1623400000,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "Premium Price",
"product": "prod_1234567890abcdef",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
\},
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"quantity": 1,
"subscription": "sub_9876543210fedcba",
"tax_rates": []
}
Get upcoming invoice
You can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer. Sample Input
{
"customer": "cus_1234567890abcdef",
"subscription": "sub_1234567890abcdef",
"subscription_items": [
{
"id": "si_1234567890abcdef",
"quantity": 2,
"price_options": {
"price": "price_1234567890abcdef"
}
}
]
}
Sample Output
List balance transactions by customer
Return a list of transactions that updated the customer's balances. Sample Input
\{
"customer_id": "cus_1234567890abcdef",
"limit": 3,
"starting_after": "txn_1234567890abcdef",
"ending_before": "txn_9876543210fedcba"
\}
Sample Output
{
"object": "list",
"data": [
{
"id": "txn_1H2G3F4E5D6C7B8A9",
"object": "balance_transaction",
"amount": 5000,
"created": 1623456789,
"credit_note": null,
"currency": "usd",
"customer": "cus_1234567890abcdef",
"description": "Payment for Invoice #INV-001",
"ending_balance": 10000,
"invoice": "in_1A2B3C4D5E6F7G8H9",
"livemode": false,
"metadata": {
"order_id": "ORD-12345"
},
"type": "payment"
},
{
"id": "txn_2I3J4K5L6M7N8O9P0",
"object": "balance_transaction",
"amount": -1000,
"created": 1623457890,
"credit_note": "cn_1X2Y3Z4A5B6C7D8E9",
"currency": "usd",
"customer": "cus_1234567890abcdef",
"description": "Refund for Invoice #INV-001",
"ending_balance": 9000,
"invoice": "in_1A2B3C4D5E6F7G8H9",
"livemode": false,
"metadata": {
"order_id": "ORD-12345"
},
"type": "refund"
},
{
"id": "txn_3Q4R5S6T7U8V9W0X1",
"object": "balance_transaction",
"amount": 7500,
"created": 1623458901,
"credit_note": null,
"currency": "usd",
"customer": "cus_1234567890abcdef",
"description": "Payment for Invoice #INV-002",
"ending_balance": 16500,
"invoice": "in_2B3C4D5E6F7G8H9I0",
"livemode": false,
"metadata": {
"order_id": "ORD-67890"
},
"type": "payment"
}
],
"has_more": true,
"url": "/v1/customers/cus_1234567890abcdef/balance_transactions"
}
List bank accounts by customer
Return a list of the bank accounts stored on the customer. Sample Input Sample Output
{
"object": "list",
"url": "/v1/customers/cus_1234567890abcdef/sources",
"has_more": true,
"data": [
{
"id": "ba_1H2I3J4K5L6M7N8O9P",
"object": "bank_account",
"account_holder_name": "John Doe",
"account_holder_type": "individual",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": "cus_1234567890abcdef",
"fingerprint": "1JWtPxqbdX5Gamtc",
"last4": "6789",
"metadata": {
"order_id": "6735"
},
"routing_number": "110000000",
"status": "verified"
},
{
"id": "ba_9Q8R7S6T5U4V3W2X1Y",
"object": "bank_account",
"account_holder_name": "Jane Smith",
"account_holder_type": "individual",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": "cus_1234567890abcdef",
"fingerprint": "2KXtQyrcfY6Hbnud",
"last4": "4321",
"metadata": {},
"routing_number": "110000000",
"status": "verified"
},
{
"id": "ba_0A1B2C3D4E5F6G7H8I",
"object": "bank_account",
"account_holder_name": "Acme Corp",
"account_holder_type": "company",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": "cus_1234567890abcdef",
"fingerprint": "3LYuTzsdgX7Ibpve",
"last4": "9012",
"metadata": {
"department": "finance"
},
"routing_number": "110000000",
"status": "verified"
}
]
}
List cards by customers
Returns a list of cards belonging to a customer. Sample Input
\{
"customer_id": "cus_1234567890abcdef",
"limit": 3,
"starting_after": "card_9876543210fedcba",
"ending_before": "card_abcdef1234567890"
\}
Sample Output
{
"object": "list",
"data": [
{
"id": "card_1234567890abcdef",
"object": "card",
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "123 Main St",
"address_line1_check": "pass",
"address_line2": "Apt 4B",
"address_state": "CA",
"address_zip": "94105",
"address_zip_check": "pass",
"brand": "Visa",
"country": "US",
"customer": "cus_1234567890abcdef",
"cvc_check": "pass",
"dynamic_last4": null,
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "abcdefghijklmnop",
"funding": "credit",
"last4": "4242",
"metadata": {
"A": "Custom metadata value"
},
"name": "John Doe",
"tokenization_method": null
},
{
"id": "card_2345678901bcdefg",
"object": "card",
"address_city": "New York",
"address_country": "US",
"address_line1": "456 Broadway",
"address_line1_check": "pass",
"address_line2": null,
"address_state": "NY",
"address_zip": "10013",
"address_zip_check": "pass",
"brand": "Mastercard",
"country": "US",
"customer": "cus_1234567890abcdef",
"cvc_check": "pass",
"dynamic_last4": null,
"exp_month": 6,
"exp_year": 2024,
"fingerprint": "qrstuvwxyz123456",
"funding": "debit",
"last4": "5678",
"metadata": {},
"name": "Jane Smith",
"tokenization_method": null
}
],
"has_more": true,
"url": "/v1/customers/cus_1234567890abcdef/cards"
}
List charges
Retrieves a list of charges. The charges are returned in sorted order, with the most recent charges appearing first. Sample Input Sample Output
List coupons
Returns a list of coupons. Sample Input
{
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-07-01T00:00:00Z"
\},
"limit": 3,
"starting_after": "coup_1234567890abcdef"
}
Sample Output
List customers
Return a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. Sample Input
{
"email": "john.doe@example.com",
"created": {
"gte": "2023-01-01T00:00:00Z"
},
"limit": 2
}
Sample Output
List files
Return a list of the files that your account has access to. Sample Input
{
"purpose": "dispute_evidence",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-06-01T00:00:00Z"
\},
"limit": 10,
"starting_after": "file_1234567890abcdef"
}
Sample Output
{
"object": "list",
"data": [
\{
"id": "file_1H2G3F4E5D6C7B8A9",
"object": "file",
"created": 1622505600,
"expires_at": 1654041600,
"filename": "dispute_evidence_001.pdf",
"purpose": "dispute_evidence",
"size": 1024000,
"title": "Dispute Evidence for Case #12345",
"type": "pdf",
"url": "https://files.stripe.com/v1/files/file_1H2G3F4E5D6C7B8A9/contents"
\},
\{
"id": "file_9A8B7C6D5E4F3G2H1",
"object": "file",
"created": 1623110400,
"expires_at": 1654646400,
"filename": "dispute_evidence_002.jpg",
"purpose": "dispute_evidence",
"size": 2048000,
"title": "Dispute Evidence for Case #67890",
"type": "jpg",
"url": "https://files.stripe.com/v1/files/file_9A8B7C6D5E4F3G2H1/contents"
\}
],
"has_more": true,
"url": "/v1/files"
}
List invoice items
Return a list of invoice items. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"invoice_id": "in_1234567890abcdef",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-12-31T23:59:59Z"
\},
"pending": true,
"starting_after": "ii_1234567890abcdef",
"ending_before": "ii_0987654321fedcba",
"limit": 50
}
Sample Output
List invoice's line items
Returns a list of line items for a given invoice. Sample Input
\{
"invoice_id": "in_1234567890abcdef",
"limit": 50,
"starting_after": "il_1234567890abcdef"
\}
Sample Output
{
"object": "list",
"data": [
{
"id": "il_1234567890abcdef",
"object": "line_item",
"amount": 2000,
"currency": "usd",
"description": "Monthly subscription",
"discount_amounts": [],
"discountable": true,
"discounts": [],
"livemode": false,
"metadata": {},
"period": \{
"end": 1625097600,
"start": 1622505600
\},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1620000000,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Standard Plan",
"product": "prod_1234567890abcdef",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1620000000,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "Standard Price",
"product": "prod_1234567890abcdef",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
\},
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"proration": false,
"quantity": 1,
"subscription": "sub_1234567890abcdef",
"subscription_item": "si_1234567890abcdef",
"tax_amounts": [],
"tax_rates": [],
"type": "subscription",
"unique_id": "il_1234567890abcdef",
"unique_line_item_id": "sli_1234567890abcdef"
}
],
"has_more": true,
"url": "/v1/invoices/in_1234567890abcdef/lines"
}
List invoices
Return a list of invoices from your Stripe account, based on criteria of your choosing. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"subscription_id": "sub_9876543210fedcba",
"status": "open",
"collection_method": "charge_automatically",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-12-31T23:59:59Z"
\},
"due_date": {
"gt": "2023-06-01T00:00:00Z"
},
"limit": 10
}
Sample Output
{
"object": "list",
"data": [
{
"id": "in_1234567890abcdef",
"object": "invoice",
"account_country": "US",
"account_name": "My Company",
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
"attempt_count": 0,
"attempted": false,
"auto_advance": true,
"billing_reason": "subscription_cycle",
"collection_method": "charge_automatically",
"created": 1625097600,
"currency": "usd",
"customer": "cus_1234567890abcdef",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"due_date": 1627776000,
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_123456789/inv_1234567890abcdef",
"invoice_pdf": "https://pay.stripe.com/invoice/acct_123456789/inv_1234567890abcdef/pdf",
"lines": {
"object": "list",
"data": [
{
"id": "il_1234567890abcdef",
"object": "line_item",
"amount": 10000,
"currency": "usd",
"description": "1 × My Product (at $100.00 / month)",
"discountable": true,
"livemode": false,
"period": \{
"end": 1627776000,
"start": 1625097600
\},
"plan": \{
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"amount": 10000,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"product": "prod_1234567890abcdef"
\},
"proration": false,
"quantity": 1,
"subscription": "sub_9876543210fedcba",
"type": "subscription"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/in_1234567890abcdef/lines"
},
"livemode": false,
"metadata": {},
"number": "INV-0001",
"paid": false,
"payment_intent": "pi_1234567890abcdef",
"period_end": 1625097600,
"period_start": 1622505600,
"status": "open",
"subscription": "sub_9876543210fedcba",
"subtotal": 10000,
"total": 10000
}
],
"has_more": false,
"url": "/v1/invoices"
}
List orders
Return a list of your orders. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"status": "paid",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-07-01T00:00:00Z"
\},
"order_ids": [
"or_1234567890abcdef",
"or_0987654321fedcba"
],
"order_status_transitions": {
"paid": {
"gte": "2023-01-15T00:00:00Z"
}
},
"limit": 50
}
Sample Output
List payment intents
Return a list of payment intents. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-04-01T00:00:00Z"
\},
"ending_before": "pi_1234567890abcdef",
"starting_after": "pi_0987654321fedcba",
"limit": 50
}
Sample Output
List payment methods
Return a list of payment methods for a given customer. Sample Input
\{
"customer_id": "cus_1234567890abcdef",
"type": "card",
"limit": 3
\}
Sample Output
{
"object": "list",
"data": [
{
"id": "pm_1234567890abcdef",
"object": "payment_method",
"billing_details": {
"address": \{
"city": "San Francisco",
"country": "US",
"line1": "123 Main St",
"line2": "Apt 4B",
"postal_code": "94105",
"state": "CA"
\},
"email": "john.doe@example.com",
"name": "John Doe",
"phone": "+14155551234"
},
"card": {
"brand": "visa",
"checks": \{
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
\},
"country": "US",
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "abcdefghijklmnop",
"funding": "credit",
"generated_from": {},
"last4": "4242",
"networks": \{
"available": [
"visa"
],
"preferred": "visa"
\},
"three_d_secure_usage": {
"supported": true
},
"wallet": {}
},
"created": 1619827200,
"customer": "cus_1234567890abcdef",
"livemode": false,
"metadata": {
"A": "Custom metadata value"
},
"type": "card"
},
{
"id": "pm_0987654321zyxwvu",
"object": "payment_method",
"billing_details": {
"address": \{
"city": "New York",
"country": "US",
"line1": "456 Broadway",
"line2": null,
"postal_code": "10013",
"state": "NY"
\},
"email": "jane.smith@example.com",
"name": "Jane Smith",
"phone": "+12125551234"
},
"card": {
"brand": "mastercard",
"checks": \{
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
\},
"country": "US",
"exp_month": 6,
"exp_year": 2024,
"fingerprint": "qrstuvwxyz123456",
"funding": "debit",
"generated_from": {},
"last4": "5678",
"networks": \{
"available": [
"mastercard"
],
"preferred": "mastercard"
\},
"three_d_secure_usage": {
"supported": true
},
"wallet": {}
},
"created": 1619740800,
"customer": "cus_1234567890abcdef",
"livemode": false,
"metadata": {},
"type": "card"
}
],
"has_more": false,
"url": "/v1/customers/cus_1234567890abcdef/payment_methods"
}
List persons by account
Return a list of people associated with the account's legal entity. Sample Input
{
"account_id": "acct_1234567890abcdef",
"relationship": \{
"director": true,
"executive": true,
"owner": true,
"representative": false
\},
"ending_before": "person_abcdefghijklmnop",
"starting_after": "person_qrstuvwxyz123456",
"limit": 50
}
Sample Output
{
"object": "list",
"data": [
{
"id": "person_1234567890abcdef",
"object": "person",
"account": "acct_1234567890abcdef",
"address": \{
"city": "San Francisco",
"country": "US",
"line1": "123 Market St",
"line2": "Suite 100",
"postal_code": "94105",
"state": "CA"
\},
"created": 1622505600,
"dob": \{
"day": 15,
"month": 5,
"year": 1980
\},
"email": "john.doe@example.com",
"first_name": "John",
"id_number_provided": true,
"last_name": "Doe",
"metadata": {
"employee_id": "EMP001"
},
"relationship": \{
"director": true,
"executive": true,
"owner": true,
"percent_ownership": 25,
"representative": false,
"title": "CEO"
\},
"requirements": \{
"currently_due": [],
"errors": [],
"eventually_due": [],
"past_due": [],
"pending_verification": []
\},
"ssn_last_4_provided": true,
"verification": {
"additional_document": \{
"back": null,
"details": null,
"details_code": null,
"front": null
\},
"details": null,
"details_code": null,
"document": \{
"back": "file_back_1234567890abcdef",
"details": null,
"details_code": null,
"front": "file_front_1234567890abcdef"
\},
"status": "verified"
}
}
],
"has_more": false,
"url": "/v1/accounts/acct_1234567890abcdef/persons"
}
List plans
Returns a list of plans in your Stripe account. Sample Input
{
"product_id": "prod_1234567890abcdef",
"created": \{
"gte": "2023-01-01T00:00:00Z",
"lt": "2023-06-01T00:00:00Z"
\},
"ending_before": "plan_9876543210fedcba",
"starting_after": "plan_abcdef1234567890",
"limit": 50
}
Sample Output
List products
Return a list of products. The products are returned sorted by creation date, with the most recently created products appearing first. Sample Input Sample Output
List setup intents
Return a list of setup intents. Sample Input Sample Output
{
"object": "list",
"data": [
{
"id": "seti_1234567890abcdef",
"object": "setup_intent",
"application": "ca_1234567890abcdef",
"cancellation_reason": null,
"client_secret": "seti_1234567890abcdef_secret_1234567890abcdef",
"created": 1672531200,
"customer": "cus_1234567890abcdef",
"description": "Setup for subscription",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
"mandate": null,
"metadata": {
"order_id": "order_123"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1234567890abcdef",
"payment_method_options": {
"card": {
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "succeeded",
"usage": "off_session"
}
],
"has_more": true,
"url": "/v1/setup_intents"
}
List subscription items
Returns a list of subscription items for a given subscription. Sample Input
\{
"subscription_id": "sub_1234567890abcdef",
"limit": 3,
"starting_after": "si_1234567890abcdef"
\}
Sample Output
{
"object": "list",
"data": [
{
"id": "si_1JKLMNOPQRSTUVWXYZabcd",
"object": "subscription_item",
"billing_thresholds": {
"usage_gte": "1000"
},
"created": 1634567890,
"metadata": {},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1623456789,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Premium Plan",
"product": "prod_1234567890abcdef",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1623456789,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "Premium Price",
"product": "prod_1234567890abcdef",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
\},
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"quantity": 1,
"subscription": "sub_1234567890abcdef",
"tax_rates": []
},
{
"id": "si_2JKLMNOPQRSTUVWXYZabcd",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1634567891,
"metadata": {},
"plan": {
"id": "plan_2345678901bcdefg",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 500,
"amount_decimal": "500",
"billing_scheme": "per_unit",
"created": 1623456790,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Add-on Plan",
"product": "prod_2345678901bcdefg",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_2345678901bcdefg",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1623456790,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": "Add-on Price",
"product": "prod_2345678901bcdefg",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
\},
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 500,
"unit_amount_decimal": "500"
},
"quantity": 2,
"subscription": "sub_1234567890abcdef",
"tax_rates": []
}
],
"has_more": true,
"url": "/v1/subscription_items?subscription=sub_1234567890abcdef"
}
List subscription schedules
Retrieve the list of your subscription schedules. Sample Input Sample Output
{
"object": "list",
"data": [
{
"id": "sub_sched_1234567890abcdef",
"object": "subscription_schedule",
"canceled_at": null,
"completed_at": null,
"created": 1672531200,
"current_phase": null,
"customer": "cus_1234567890abcdef",
"default_settings": \{
"application_fee_percent": null,
"billing_cycle_anchor": "automatic",
"billing_thresholds": null,
"collection_method": "charge_automatically",
"default_payment_method": null,
"default_source": null,
"invoice_settings": null,
"transfer_data": null
\},
"end_behavior": "release",
"livemode": false,
"metadata": {
"order_id": "ord_987654321"
},
"phases": [
{
"add_invoice_items": [],
"application_fee_percent": null,
"billing_cycle_anchor": "automatic",
"billing_thresholds": null,
"collection_method": null,
"coupon": null,
"default_payment_method": null,
"default_tax_rates": [],
"end_date": 1688169600,
"invoice_settings": null,
"plans": [
\{
"billing_thresholds": null,
"plan": "plan_9876543210fedcba",
"price": "price_1234567890abcdef",
"quantity": 1,
"tax_rates": []
\}
],
"prorate": true,
"proration_behavior": "create_prorations",
"start_date": 1672531200,
"tax_percent": null,
"transfer_data": null,
"trial_end": null
}
],
"released_at": null,
"released_subscription": null,
"renewal_interval": null,
"status": "not_started",
"subscription": null
}
],
"has_more": false,
"url": "/v1/subscription_schedules"
}
List subscriptions
Return a list of subscriptions in your Stripe account. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"price": "price_9876543210fedcba",
"status": "active",
"collection_method": "charge_automatically",
"created": {
"gte": "2023-01-01T00:00:00Z"
},
"current_period_start": {
"gt": "2023-06-01T00:00:00Z"
},
"current_period_end": {
"lt": "2023-12-31T23:59:59Z"
},
"limit": 10
}
Sample Output
List tax IDs by customer
Return a list of tax IDs for a customer. Sample Input Sample Output
{
"object": "list",
"url": "/v1/customers/cus_1234567890abcdef/tax_ids",
"has_more": false,
"data": [
{
"id": "txi_1234567890abcdef",
"object": "tax_id",
"country": "US",
"created": 1634567890,
"customer": "cus_1234567890abcdef",
"livemode": false,
"type": "us_ein",
"value": "12-3456789",
"verification": \{
"status": "verified",
"verified_address": "123 Main St, Anytown, USA",
"verified_name": "Sample Company Inc."
\}
},
{
"id": "txi_0987654321fedcba",
"object": "tax_id",
"country": "GB",
"created": 1634567891,
"customer": "cus_1234567890abcdef",
"livemode": false,
"type": "gb_vat",
"value": "GB123456789",
"verification": \{
"status": "pending",
"verified_address": null,
"verified_name": null
\}
}
]
}
Pay invoice
Attempt payment on an invoice. Sample Input Sample Output
{
"id": "in_1234567890abcdef",
"object": "invoice",
"account_country": "US",
"account_name": "My Company",
"amount_due": 10000,
"amount_paid": 10000,
"amount_remaining": 0,
"attempt_count": 1,
"attempted": true,
"auto_advance": true,
"billing_reason": "manual",
"charge": "ch_1234567890abcdef",
"collection_method": "charge_automatically",
"created": 1634567890,
"currency": "usd",
"customer": "cus_1234567890abcdef",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"date": 1634567890,
"default_source": "src_1234567890abcdef",
"description": "Invoice for October services",
"hosted_invoice_url": "https://invoice.stripe.com/i/acct_1234567890abcdef/invst_1234567890abcdef",
"invoice_pdf": "https://pay.stripe.com/invoice/acct_1234567890abcdef/invst_1234567890abcdef/pdf",
"lines": {
"data": [
{
"id": "il_1234567890abcdef",
"object": "line_item",
"amount": 10000,
"currency": "usd",
"description": "Monthly subscription",
"discountable": true,
"livemode": false,
"metadata": {},
"period": \{
"end": 1637246290,
"start": 1634567890
\},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1634567890,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_1234567890abcdef",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
\},
"type": "recurring",
"unit_amount": 10000,
"unit_amount_decimal": "10000"
},
"proration": false,
"quantity": 1,
"subscription": "sub_1234567890abcdef",
"tax_amounts": [],
"tax_rates": []
}
],
"has_more": false,
"object": "list",
"url": "/v1/invoices/in_1234567890abcdef/lines"
},
"livemode": false,
"metadata": {},
"number": "INV-0001",
"paid": true,
"payment_intent": "pi_1234567890abcdef",
"period_end": 1634567890,
"period_start": 1631889490,
"receipt_number": null,
"starting_balance": 0,
"status": "paid",
"subtotal": 10000,
"tax": 0,
"total": 10000,
"total_discount_amounts": [],
"total_tax_amounts": []
}
Raw HTTP request (advanced)
Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication. Sample Input
{
"method": "POST",
"url": {
"endpoint": "/v1/customers"
},
"headers": [
\{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded"
\}
],
"body": {
"form_urlencoded": \{
"email": "john.doe@example.com",
"name": "John Doe",
"description": "New customer"
\}
},
"include_raw_body": false,
"parse_response": "true"
}
Sample Output
{
"response": {
"status_code": 200,
"headers": \{
"server": "nginx",
"date": "Wed, 21 Jul 2023 12:34:56 GMT",
"content-type": "application/json",
"content-length": "1234",
"connection": "keep-alive",
"stripe-version": "2023-07-14",
"access-control-allow-origin": "*",
"access-control-allow-methods": "GET, POST, HEAD, OPTIONS, DELETE",
"access-control-allow-headers": "Authorization, Content-Type, Stripe-Version",
"access-control-expose-headers": "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required",
"access-control-max-age": "300",
"cache-control": "no-cache, no-store",
"request-id": "req_1234567890abcdef",
"stripe-should-retry": "false",
"strict-transport-security": "max-age=31556926; includeSubDomains; preload"
\},
"body": \{
"id": "cus_1234567890abcdef",
"object": "customer",
"created": 1689945296,
"email": "john.doe@example.com",
"livemode": false,
"name": "John Doe",
"description": "New customer",
"preferred_locales": []
\}
}
}
Update card
Update card information. Sample Input
\{
"card_id": "card_1Abc2DEFghIJklMN",
"customer_id": "cus_1OPqRsTuVwXyZ",
"name": "John Doe",
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "123 Main St",
"address_line2": "Apt 4B",
"address_state": "CA",
"address_zip": "94105",
"exp_month": "12",
"exp_year": "2025"
\}
Sample Output
Update customer
Update customer information. Sample Input
{
"customer_id": "cus_1234567890abcdef",
"name": "John Doe",
"email": "johndoe@example.com",
"phone": "+1 555-123-4567",
"description": "Loyal customer since 2020",
"address": \{
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
\},
"shipping": {
"name": "John Doe",
"address": \{
"line1": "456 Elm St",
"line2": "Suite 789",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90001",
"country": "US"
\},
"phone": "+1 555-987-6543"
},
"balance": 1000,
"coupon": "SUMMER2023",
"default_source": "card_1234567890abcdef",
"invoice_settings": {
"custom_fields": \{
"name": "Account Manager",
"value": "Jane Smith"
\},
"default_payment_method": "pm_1234567890abcdef",
"footer": "Thank you for your business!"
},
"source": \{
"object": "card",
"number": "4242424242424242",
"exp_month": "12",
"exp_year": "2025",
"cvc": "123",
"name": "John Doe",
"address_line1": "123 Main St",
"address_city": "New York",
"address_state": "NY",
"address_zip": "10001",
"address_country": "US"
\},
"promotion_code": "PROMO2023"
}
Sample Output
{
"id": "cus_1234567890abcdef",
"object": "customer",
"created": 1623456789,
"email": "johndoe@example.com",
"name": "John Doe",
"description": "Loyal customer since 2020",
"phone": "+1 555-123-4567",
"livemode": false,
"default_source": "card_1234567890abcdef",
"currency": "usd",
"account_balance": 1000,
"delinquent": false,
"discount": null,
"invoice_prefix": "ABC123",
"shipping": {
"name": "John Doe",
"address": \{
"line1": "456 Elm St",
"line2": "Suite 789",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90001",
"country": "US"
\},
"phone": "+1 555-987-6543"
},
"sources": {
"object": "list",
"data": [
{
"id": "card_1234567890abcdef"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_1234567890abcdef/sources"
},
"subscriptions": \{
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_1234567890abcdef/subscriptions"
\},
"metadata": {}
}
Update subscription
Updates a new subscription on an existing customer. Sample Input
{
"subscription_id": "sub_1234567890abcdef",
"items": [
{
"id": "si_1234567890abcdef",
"quantity": 2,
"billing_thresholds": {
"usage_gte": "1000"
},
"price_options": {
"price": "price_1234567890abcdef"
}
}
],
"default_payment_method": "pm_1234567890abcdef",
"billing_cycle_anchor": "now",
"coupon": "SUMMER2023",
"collection_method": "charge_automatically",
"days_until_due": 30,
"proration_behavior": "create_prorations",
"trial_end": "2023-08-31T23:59:59Z"
}
Sample Output
{
"id": "sub_1234567890abcdef",
"object": "subscription",
"billing_cycle_anchor": 1627776000,
"collection_method": "charge_automatically",
"created": 1625184000,
"current_period_end": 1630368000,
"current_period_start": 1627776000,
"customer": "cus_1234567890abcdef",
"days_until_due": 30,
"default_payment_method": "pm_1234567890abcdef",
"items": {
"object": "list",
"data": [
{
"id": "si_1234567890abcdef",
"object": "subscription_item",
"billing_thresholds": {
"usage_gte": 1000
},
"created": 1625184000,
"metadata": {},
"plan": {
"id": "plan_1234567890abcdef",
"object": "plan",
"active": true,
"amount": 2000,
"amount_decimal": "2000",
"billing_scheme": "per_unit",
"created": 1625097600,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"nickname": "Professional Plan",
"product": "prod_1234567890abcdef",
"usage_type": "licensed"
},
"price": {
"id": "price_1234567890abcdef",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1625097600,
"currency": "usd",
"livemode": false,
"metadata": {},
"nickname": "Professional Plan Monthly",
"product": "prod_1234567890abcdef",
"recurring": \{
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
\},
"type": "recurring",
"unit_amount": 2000,
"unit_amount_decimal": "2000"
},
"quantity": 2,
"subscription": "sub_1234567890abcdef",
"tax_rates": []
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/subscription_items?subscription=sub_1234567890abcdef"
},
"latest_invoice": "in_1234567890abcdef",
"livemode": false,
"metadata": {},
"status": "active",
"trial_end": 1630454399
}
DDL operations
List charges (DDL)
Sample Input
{}
Sample Output
List currency codes (DDL)
Sample Input
{}
Sample Output
[
\{
"value": "USD",
"label": "United States Dollar (USD)"
\},
\{
"value": "EUR",
"label": "Euro (EUR)"
\},
\{
"value": "GBP",
"label": "British Pound (GBP)"
\},
\{
"value": "JPY",
"label": "Japanese Yen (JPY)"
\},
\{
"value": "CAD",
"label": "Canadian Dollar (CAD)"
\},
\{
"value": "AUD",
"label": "Australian Dollar (AUD)"
\},
\{
"value": "CHF",
"label": "Swiss Franc (CHF)"
\},
\{
"value": "CNY",
"label": "Chinese Yuan (CNY)"
\},
\{
"value": "INR",
"label": "Indian Rupee (INR)"
\},
\{
"value": "MXN",
"label": "Mexican Peso (MXN)"
\}
]
List customers (DDL)
Sample Input
{}
Sample Output
List invoices (DDL)
Sample Input Sample Output
List orders (DDL)
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
{}
Sample Output
List plans (DDL)
Sample Input Sample Output
List products (DDL)
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input Sample Output
List subscriptions (DDL)
Sample Input Sample Output
{
"data": [
{
"id": "sub_1JKLMNOPQRSTUVWXYZabcd",
"object": "subscription",
"application_fee_percent": null,
"billing_cycle_anchor": 1625097600,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"collection_method": "charge_automatically",
"created": 1625097600,
"current_period_end": 1627776000,
"current_period_start": 1625097600,
"customer": "cus_ABCDEFGHIJKLMNop",
"days_until_due": null,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"discount": null,
"ended_at": null,
"items": {
"object": "list",
"data": [
{
"id": "si_ABCDEFGHIJKLMNop",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1625097600,
"metadata": {},
"price": {
"id": "price_1ABCDEFGHIJKLMNop",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1625097500,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_ABCDEFGHIJKLMNop",
"recurring": \{
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
\},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 1999,
"unit_amount_decimal": "1999"
},
"quantity": 1,
"subscription": "sub_1JKLMNOPQRSTUVWXYZabcd",
"tax_rates": []
}
],
"has_more": false,
"url": "/v1/subscription_items?subscription=sub_1JKLMNOPQRSTUVWXYZabcd"
},
"latest_invoice": "in_1ABCDEFGHIJKLMNop",
"livemode": false,
"metadata": {},
"next_pending_invoice_item_invoice": null,
"pause_collection": null,
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"schedule": null,
"start_date": 1625097600,
"status": "active",
"transfer_data": null,
"trial_end": null,
"trial_start": null
}
],
"has_more": false,
"url": "/v1/subscriptions"
}