Skip to content

Instantly share code, notes, and snippets.

@mattkelley
Created June 18, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattkelley/e0ab41912169ccd2d658593980404043 to your computer and use it in GitHub Desktop.
Save mattkelley/e0ab41912169ccd2d658593980404043 to your computer and use it in GitHub Desktop.
Stripe preview invoice response
{
"object": "invoice",
"account_country": "US",
"account_name": "Spanning Cloud Apps, LLC",
"amount_due": 10825,
"amount_paid": 0,
"amount_remaining": 10825,
"application_fee": null,
"attempt_count": 0,
"attempted": false,
"billing": "charge_automatically",
"billing_reason": "subscription_update",
"charge": null,
"closed": false,
"collection_method": "charge_automatically",
"created": 1560887077,
"currency": "usd",
"custom_fields": null,
"customer": "cus_FH0IZ4WcMHQje2",
"customer_address": {
"city": "Austin",
"country": "US",
"line1": "5412 Downs Drive",
"line2": "",
"postal_code": "78721",
"state": "TX"
},
"customer_email": "sal@mattkelley.tech",
"customer_name": null,
"customer_phone": null,
"customer_shipping": {
"address": {
"city": "Austin",
"country": "US",
"line1": "5412 Downs Drive",
"line2": "",
"postal_code": "78721",
"state": "TX"
},
"name": "",
"phone": ""
},
"customer_tax_exempt": "none",
"customer_tax_ids": [],
"date": 1560887077,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [
{
"id": "txr_0EmnBKHNa3RVAUcqujtjJZdZ",
"object": "tax_rate",
"active": true,
"created": 1560886886,
"description": null,
"display_name": "Tax",
"inclusive": false,
"jurisdiction": null,
"livemode": false,
"metadata": {},
"percentage": 8.25
}
],
"description": null,
"discount": null,
"due_date": null,
"ending_balance": 0,
"finalized_at": null,
"footer": null,
"forgiven": false,
"lines": {
"object": "list",
"data": [
{
"id": "sub_FHLwGRg38ppHCO",
"object": "line_item",
"amount": 10000,
"currency": "usd",
"description": null,
"discountable": true,
"livemode": false,
"metadata": {},
"period": {
"end": 1592509477,
"start": 1560887077
},
"plan": {
"id": "stab-year-4800",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 100,
"billing_scheme": "per_unit",
"created": 1560443447,
"currency": "usd",
"interval": "year",
"interval_count": 1,
"livemode": false,
"metadata": {},
"name": "Spanning Backup for O365 $48/yr",
"nickname": "Stab for 1 year bro",
"product": "prod_FFQf82JgxbeA1c",
"statement_descriptor": "enterprise",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"proration": false,
"quantity": 100,
"subscription": null,
"subscription_item": "si_FHLwri9fk8xsha",
"tax_amounts": [
{
"amount": 825,
"inclusive": false,
"tax_rate": "txr_0EmnBKHNa3RVAUcqujtjJZdZ"
}
],
"tax_rates": [],
"type": "subscription",
"unique_line_item_id": "sli_c8d1ee77a3a012"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/upcoming/lines?customer=cus_FH0IZ4WcMHQje2&subscription_tax_percent=8.25"
},
"livemode": false,
"metadata": {},
"next_payment_attempt": 1560890677,
"number": "460904CF-0020",
"paid": false,
"payment_intent": null,
"period_end": 1560887077,
"period_start": 1560887077,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": null,
"status": "draft",
"status_transitions": {
"finalized_at": null,
"marked_uncollectible_at": null,
"paid_at": null,
"voided_at": null
},
"subscription": "sub_FHLwGRg38ppHCO",
"subscription_proration_date": 1560887077,
"subtotal": 10000,
"tax": 825,
"tax_percent": 8.25,
"total": 10825,
"total_tax_amounts": [
{
"amount": 825,
"inclusive": false,
"tax_rate": "txr_0EmnBKHNa3RVAUcqujtjJZdZ"
}
],
"webhooks_delivered_at": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment