Skip to content

Instantly share code, notes, and snippets.

@nickdnk
Created July 11, 2019 23:34
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 nickdnk/82e5b058bf9f4d3a6eff05260e19276c to your computer and use it in GitHub Desktop.
Save nickdnk/82e5b058bf9f4d3a6eff05260e19276c to your computer and use it in GitHub Desktop.
Stripe
{
"id": "in_1EvBGIL7ilRdQXxEr6t9rumc",
"object": "invoice",
"account_country": "DK",
"account_name": "Nyx Systems ApS",
"amount_due": 7150,
"amount_paid": 0,
"amount_remaining": 7150,
"application_fee_amount": null,
"attempt_count": 1,
"attempted": true,
"auto_advance": true,
"billing": "charge_automatically",
"billing_reason": "subscription_cycle",
"charge": "ch_1EvBIVL7ilRdQXxEdijOtLrm",
"collection_method": "charge_automatically",
"created": 1562886070,
"currency": "eur",
"custom_fields": [
{
"name": "VAT No.",
"value": "DK36201215"
}
],
"customer": "cus_FPe9Zt1q8RpFw4",
"customer_address": {
"city": "Cupertino, Ca",
"country": "US",
"line1": "1 Infinite Loop",
"line2": null,
"postal_code": "95014",
"state": null
},
"customer_email": "customer@nyxapp.net",
"customer_name": "Apple Inc.",
"customer_phone": null,
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [
{
"type": "eu_vat",
"value": "GB117223643"
}
],
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"description": null,
"discount": null,
"due_date": 1563145410,
"ending_balance": 0,
"footer": null,
"hosted_invoice_url": "https:\/\/pay.stripe.com\/invoice\/invst_MXlrniKHuPmKnw7L32F86rGRj4",
"invoice_pdf": "https:\/\/pay.stripe.com\/invoice\/invst_MXlrniKHuPmKnw7L32F86rGRj4\/pdf",
"lines": {
"object": "list",
"data": [
{
"id": "sli_7d74d139da50c4",
"object": "line_item",
"amount": 500,
"currency": "eur",
"description": "1 100 \u00d7 Members (Tier 1 at \u20ac5.00 \/ month)",
"discountable": true,
"livemode": false,
"metadata": {
"nyx_venue_id": "4"
},
"period": {
"end": 1562886070,
"start": 1562886055
},
"plan": {
"id": "nyx_payment_plan_members",
"object": "plan",
"active": true,
"aggregate_usage": "max",
"amount": null,
"billing_scheme": "tiered",
"created": 1557343739,
"currency": "eur",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": [],
"nickname": "Standard",
"product": "prod_EpHNJXHbBF5xrJ",
"tiers": [
{
"flat_amount": null,
"unit_amount": 500,
"up_to": 10
},
{
"flat_amount": null,
"unit_amount": 200,
"up_to": 100
},
{
"flat_amount": null,
"unit_amount": 100,
"up_to": 200
},
{
"flat_amount": null,
"unit_amount": 0,
"up_to": null
}
],
"tiers_mode": "graduated",
"transform_usage": null,
"trial_period_days": null,
"usage_type": "metered"
},
"proration": false,
"quantity": 1,
"subscription": "sub_FQ1I7QJ3QidNQz",
"subscription_item": "si_FQ1IAUnotovmp0",
"tax_amounts": [],
"tax_rates": [],
"type": "subscription"
},
{
"id": "sli_914f904b6c1010",
"object": "line_item",
"amount": 6000,
"currency": "eur",
"description": "3 \u00d7 Identity (at \u20ac20.00 \/ month)",
"discountable": true,
"livemode": false,
"metadata": {
"nyx_venue_id": "4"
},
"period": {
"end": 1562886070,
"start": 1562886055
},
"plan": {
"id": "nyx_payment_plan_identities",
"object": "plan",
"active": true,
"aggregate_usage": "max",
"amount": 2000,
"billing_scheme": "per_unit",
"created": 1556821898,
"currency": "eur",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": [],
"nickname": "Standard",
"product": "prod_EpHZTcjrsXM1rf",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "metered"
},
"proration": false,
"quantity": 3,
"subscription": "sub_FQ1I7QJ3QidNQz",
"subscription_item": "si_FQ1IgPVfF184qp",
"tax_amounts": [],
"tax_rates": [],
"type": "subscription"
},
{
"id": "sli_a48960bfaf53a3",
"object": "line_item",
"amount": 650,
"currency": "eur",
"description": "2 \u00d7 User (at \u20ac3.25 \/ month)",
"discountable": true,
"livemode": false,
"metadata": {
"nyx_venue_id": "4"
},
"period": {
"end": 1562886070,
"start": 1562886055
},
"plan": {
"id": "nyx_payment_plan_users",
"object": "plan",
"active": true,
"aggregate_usage": "max",
"amount": 325,
"billing_scheme": "per_unit",
"created": 1557350214,
"currency": "eur",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": [],
"nickname": "Standard",
"product": "prod_EpHIKkRpDR8dCr",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "metered"
},
"proration": false,
"quantity": 2,
"subscription": "sub_FQ1I7QJ3QidNQz",
"subscription_item": "si_FQ1IGV8kKK0N8B",
"tax_amounts": [],
"tax_rates": [],
"type": "subscription"
}
],
"has_more": false,
"total_count": 3,
"url": "\/v1\/invoices\/in_1EvBGIL7ilRdQXxEr6t9rumc\/lines"
},
"livemode": false,
"metadata": [],
"next_payment_attempt": null,
"number": "444D2E73-0023",
"paid": false,
"payment_intent": {
"id": "pi_1EvBITL7ilRdQXxE4zyDbDWP",
"object": "payment_intent",
"amount": 7150,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
{
"id": "ch_1EvBIVL7ilRdQXxEdijOtLrm",
"object": "charge",
"amount": 7150,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": null,
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"captured": false,
"created": 1562886211,
"currency": "eur",
"customer": "cus_FPe9Zt1q8RpFw4",
"description": "Payment for invoice 444D2E73-0023",
"destination": null,
"dispute": null,
"failure_code": "authentication_required",
"failure_message": "Your card was declined. This transaction requires authentication.",
"fraud_details": [],
"invoice": "in_1EvBGIL7ilRdQXxEr6t9rumc",
"livemode": false,
"metadata": [],
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "declined_by_network",
"reason": "authentication_required",
"risk_level": "normal",
"risk_score": 47,
"seller_message": "The bank returned the decline code `authentication_required`.",
"type": "issuer_declined"
},
"paid": false,
"payment_intent": "pi_1EvBITL7ilRdQXxE4zyDbDWP",
"payment_method": "card_1Ev2QoL7ilRdQXxE1kFTa9t4",
"payment_method_details": {
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": null
},
"country": "IE",
"exp_month": 12,
"exp_year": 2032,
"fingerprint": "xM5pJuISl7wvqw8l",
"funding": "credit",
"last4": "3220",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https:\/\/pay.stripe.com\/receipts\/acct_17xDxxL7ilRdQXxE\/ch_1EvBIVL7ilRdQXxEdijOtLrm\/rcpt_FQ1L3TC4OwjoTY9IgUgQJY7kobv1LGc",
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "\/v1\/charges\/ch_1EvBIVL7ilRdQXxEdijOtLrm\/refunds"
},
"review": null,
"shipping": null,
"source": {
"id": "card_1Ev2QoL7ilRdQXxE1kFTa9t4",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "IE",
"customer": "cus_FPe9Zt1q8RpFw4",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 12,
"exp_year": 2032,
"fingerprint": "xM5pJuISl7wvqw8l",
"funding": "credit",
"last4": "3220",
"metadata": [],
"name": null,
"tokenization_method": null
},
"source_transfer": null,
"statement_descriptor": "INV:444D2E73-0023",
"status": "failed",
"transfer_data": null,
"transfer_group": null
}
],
"has_more": false,
"total_count": 1,
"url": "\/v1\/charges?payment_intent=pi_1EvBITL7ilRdQXxE4zyDbDWP"
},
"client_secret": "pi_1EvBITL7ilRdQXxE4zyDbDWP_secret_JTmdhcdqJ4MLobVk7tErWXmDY",
"confirmation_method": "automatic",
"created": 1562886209,
"currency": "eur",
"customer": "cus_FPe9Zt1q8RpFw4",
"description": "Payment for invoice 444D2E73-0023",
"invoice": "in_1EvBGIL7ilRdQXxEr6t9rumc",
"last_payment_error": null,
"livemode": false,
"metadata": [],
"next_action": {
"type": "use_stripe_sdk",
"use_stripe_sdk": {
"type": "three_d_secure_redirect",
"stripe_js": "https:\/\/hooks.stripe.com\/3d_secure_2_eap\/begin_test\/src_1EvBIVL7ilRdQXxEGgVgZ5Nc\/src_client_secret_FQ1LFbQybuiWcdn4d05UWSv9"
}
},
"on_behalf_of": null,
"payment_method": null,
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": "card_1Ev2QoL7ilRdQXxE1kFTa9t4",
"statement_descriptor": "INV:444D2E73-0023",
"status": "requires_action",
"transfer_data": null,
"transfer_group": null
},
"period_end": 1562886070,
"period_start": 1562886055,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": "INV:444D2E73-0023",
"status": "open",
"status_transitions": {
"finalized_at": 1562886209,
"marked_uncollectible_at": null,
"paid_at": null,
"voided_at": null
},
"subscription": "sub_FQ1I7QJ3QidNQz",
"subtotal": 7150,
"tax": null,
"tax_percent": null,
"total": 7150,
"total_tax_amounts": [],
"webhooks_delivered_at": 1562886077
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment