@onepresstech Thanks for your help with this, and sorry for the confusion! The api log was for a single transaction that double charged the customer, not the for the four sequential transactions that quadruple charged the customer which I first posted about.
Thank you for pointing out the fields that were not obscured in the previous log, I fixed it now.
Here are the obscured logs for the four sequential transactions that resulted in a quadruple charge:
==================================
Failure 1
payment_intent.created
{
"id": "pi_ddd",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "requires_source",
"allowed_source_types": [
"card"
],
"amount": 16800,
"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": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_ddd"
},
"client_secret": "pi_ddd_secret_eeee",
"confirmation_method": "automatic",
"created": 1585423212,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
payment_intent.canceled
{
"id": "pi_ddd",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "canceled",
"allowed_source_types": [
"card"
],
"amount": 16800,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"canceled_at": 1585423212,
"cancellation_reason": "failed_invoice",
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_ddd"
},
"client_secret": "pi_ddd_secret_eeee",
"confirmation_method": "automatic",
"created": 1585423212,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
==================================
Failure 2
payment_intent.created
{
"id": "pi_bbb",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "requires_source",
"allowed_source_types": [
"card"
],
"amount": 33600,
"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": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_bbb"
},
"client_secret": "pi_bbb_secret_aaa",
"confirmation_method": "automatic",
"created": 1585423262,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
payment_intent.canceled
{
"id": "pi_bbb",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "canceled",
"allowed_source_types": [
"card"
],
"amount": 33600,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"canceled_at": 1585423262,
"cancellation_reason": "failed_invoice",
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_bbb"
},
"client_secret": "pi_bbb_secret_aaa",
"confirmation_method": "automatic",
"created": 1585423262,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
==================================
Failure 3
payment_intent.created
{
"id": "pi_ggg",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "requires_source",
"allowed_source_types": [
"card"
],
"amount": 50400,
"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": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_ggg"
},
"client_secret": "pi_ggg_secret_hhh",
"confirmation_method": "automatic",
"created": 1585423304,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
payment_intent.canceled
{
"id": "pi_ggg",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "canceled",
"allowed_source_types": [
"card"
],
"amount": 50400,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"canceled_at": 1585423304,
"cancellation_reason": "failed_invoice",
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_ggg"
},
"client_secret": "pi_ggg_secret_hhh",
"confirmation_method": "automatic",
"created": 1585423304,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": null,
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}
==================================
Success - A request to create a subscription completed
POST /v1/subscriptions
200 OK
Request parameters
{
"customer": "cus_ccc",
"items": {
"0": {
"plan": "s2_plan_iii"
}
},
"trial_from_plan": "true",
"metadata": {
"tax_info": "{"trial_tax":"0.00","trial_tax_per":"0%","tax":"0.00","tax_per":"0%"}"
},
"expand": {
"0": "latest_invoice.payment_intent",
"1": "pending_setup_intent"
}
}
Response body
{
"id": "sub_lll",
"object": "subscription",
"customer": "cus_ccc",
"items": {
"object": "list",
"data": [
{
"id": "si_mmm",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1585423349,
"metadata": {
},
"plan": {
"id": "s2_plan_iii",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 6900,
"amount_decimal": "6900",
"billing_scheme": "per_unit",
"created": 1585332440,
"currency": "usd",
"interval": "day",
"interval_count": 31,
"livemode": true,
"metadata": {
"recurring": "true",
"recurring_times": "-1"
},
"nickname": null,
"product": "s2_prod_nnn",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": 31,
"usage_type": "licensed"
},
"quantity": 1,
"subscription": "sub_lll",
"tax_rates": [
]
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/subscription_items?subscription=sub_lll"
},
"livemode": true,
"metadata": {
"tax_info": "{"trial_tax":"0.00","trial_tax_per":"0%","tax":"0.00","tax_per":"0%"}"
},
"status": "trialing",
"application_fee_percent": null,
"billing": "charge_automatically",
"billing_cycle_anchor": 1588101748,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"collection_method": "charge_automatically",
"created": 1585423348,
"current_period_end": 1588101748,
"current_period_start": 1585423348,
"days_until_due": null,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [
],
"discount": null,
"ended_at": null,
"invoice_customer_balance_settings": {
"consume_applied_balance_on_void": true
},
"latest_invoice": {
"id": "in_ooo",
"object": "invoice",
"account_country": "CA",
"account_name": "CompanyName",
"amount_due": 67200,
"amount_paid": 67200,
"amount_remaining": 0,
"application_fee_amount": null,
"attempt_count": 1,
"attempted": true,
"auto_advance": false,
"billing": "charge_automatically",
"billing_reason": "subscription_create",
"charge": "ch_ppp",
"collection_method": "charge_automatically",
"created": 1585423348,
"currency": "usd",
"custom_fields": null,
"customer": "cus_ccc",
"customer_address": null,
"customer_email": "first.last@emailcompany.com",
"customer_name": "First Last",
"customer_phone": null,
"customer_shipping": null,
"customer_tax_exempt": "none",
"customer_tax_ids": [
],
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [
],
"description": null,
"discount": null,
"due_date": null,
"ending_balance": 0,
"footer": null,
"hosted_invoice_url": "https://pay.stripe.com/invoice/acct_ppp/invst_ttt",
"invoice_pdf": "https://pay.stripe.com/invoice/acct_ppp/invst_ttt/pdf",
"lines": {
"object": "list",
"data": [
{
"id": "ii_uuuI",
"object": "line_item",
"amount": 16800,
"currency": "usd",
"description": "Initial period",
"discountable": true,
"invoice_item": "ii_uuuI",
"livemode": true,
"metadata": {
},
"period": {
"end": 1585423348,
"start": 1585423348
},
"plan": null,
"proration": false,
"quantity": 1,
"subscription": null,
"tax_amounts": [
],
"tax_rates": [
],
"type": "invoiceitem",
"unique_id": "il_vvv"
},
{
"id": "ii_xxx",
"object": "line_item",
"amount": 16800,
"currency": "usd",
"description": "Initial period",
"discountable": true,
"invoice_item": "ii_xxx",
"livemode": true,
"metadata": {
},
"period": {
"end": 1585423303,
"start": 1585423303
},
"plan": null,
"proration": false,
"quantity": 1,
"subscription": null,
"tax_amounts": [
],
"tax_rates": [
],
"type": "invoiceitem",
"unique_id": "il_yyy"
},
{
"id": "ii_zzz",
"object": "line_item",
"amount": 16800,
"currency": "usd",
"description": "Initial period",
"discountable": true,
"invoice_item": "ii_zzz",
"livemode": true,
"metadata": {
},
"period": {
"end": 1585423262,
"start": 1585423262
},
"plan": null,
"proration": false,
"quantity": 1,
"subscription": null,
"tax_amounts": [
],
"tax_rates": [
],
"type": "invoiceitem",
"unique_id": "il_1a1a1a"
},
{
"id": "ii_1b1b1b",
"object": "line_item",
"amount": 16800,
"currency": "usd",
"description": "Initial period",
"discountable": true,
"invoice_item": "ii_1b1b1b",
"livemode": true,
"metadata": {
},
"period": {
"end": 1585423211,
"start": 1585423211
},
"plan": null,
"proration": false,
"quantity": 1,
"subscription": null,
"tax_amounts": [
],
"tax_rates": [
],
"type": "invoiceitem",
"unique_id": "il_1c1c1c"
},
{
"id": "sli_sss",
"object": "line_item",
"amount": 0,
"currency": "usd",
"description": "Trial period for CompanyName ProductName",
"discountable": true,
"livemode": true,
"metadata": {
"tax_info": "{"trial_tax":"0.00","trial_tax_per":"0%","tax":"0.00","tax_per":"0%"}"
},
"period": {
"end": 1588101748,
"start": 1585423348
},
"plan": {
"id": "s2_plan_iii",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 6900,
"amount_decimal": "6900",
"billing_scheme": "per_unit",
"created": 1585332440,
"currency": "usd",
"interval": "day",
"interval_count": 31,
"livemode": true,
"metadata": {
"recurring": "true",
"recurring_times": "-1"
},
"nickname": null,
"product": "s2_prod_nnn",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": 31,
"usage_type": "licensed"
},
"proration": false,
"quantity": 1,
"subscription": "sub_lll",
"subscription_item": "si_mmm",
"tax_amounts": [
],
"tax_rates": [
],
"type": "subscription",
"unique_id": "il_1d1d1d"
}
],
"has_more": false,
"total_count": 5,
"url": "/v1/invoices/in_ooo/lines"
},
"livemode": true,
"metadata": {
},
"next_payment_attempt": null,
"number": "rrr",
"paid": true,
"payment_intent": {
"id": "pi_kkk",
"object": "payment_intent",
"amount": 67200,
"amount_capturable": 0,
"amount_received": 67200,
"application": null,
"application_fee_amount": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [
{
"id": "ch_ppp",
"object": "charge",
"amount": 67200,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_1e1e1e",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": "55057",
"state": null
},
"email": "first.last@emailcompany.com",
"name": "First Last",
"phone": null
},
"captured": true,
"created": 1585423349,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"destination": null,
"dispute": null,
"disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {
},
"invoice": "in_ooo",
"livemode": true,
"metadata": {
},
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_kkk",
"payment_method": "pm_jjj",
"payment_method_details": {
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": "pass",
"cvc_check": "pass"
},
"country": "US",
"exp_month": 9,
"exp_year": 2099,
"fingerprint": "fff",
"funding": "debit",
"installments": null,
"last4": "9999",
"network": "visa",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"receipt_email": "first.last@emailcompany.com",
"receipt_number": "1e1e1e",
"receipt_url": "https://pay.stripe.com/receipts/acct_ppp/ch_ppp/rcpt_qqq",
"refunded": false,
"refunds": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_ppp/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
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_kkk"
},
"client_secret": "pi_kkk_secret_1f1f1f",
"confirmation_method": "automatic",
"created": 1585423348,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": "in_ooo",
"last_payment_error": null,
"livemode": true,
"metadata": {
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_jjj",
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": "off_session",
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
},
"period_end": 1585423348,
"period_start": 1585423348,
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"receipt_number": "1e1e1e",
"starting_balance": 0,
"statement_descriptor": null,
"status": "paid",
"status_transitions": {
"finalized_at": 1585423348,
"marked_uncollectible_at": null,
"paid_at": 1585423350,
"voided_at": null
},
"subscription": "sub_lll",
"subtotal": 67200,
"tax": null,
"tax_percent": null,
"total": 67200,
"total_tax_amounts": [
],
"webhooks_delivered_at": null
},
"next_pending_invoice_item_invoice": null,
"pause_collection": null,
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"plan": {
"id": "s2_plan_iii",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 6900,
"amount_decimal": "6900",
"billing_scheme": "per_unit",
"created": 1585332440,
"currency": "usd",
"interval": "day",
"interval_count": 31,
"livemode": true,
"metadata": {
"recurring": "true",
"recurring_times": "-1"
},
"nickname": null,
"product": "s2_prod_nnn",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": 31,
"usage_type": "licensed"
},
"quantity": 1,
"schedule": null,
"start": 1585423348,
"start_date": 1585423348,
"tax_percent": null,
"trial_end": 1588101748,
"trial_start": 1585423348
}
payment_intent.created
{
"id": "pi_kkk",
"object": "payment_intent",
"last_payment_error": null,
"livemode": true,
"next_action": null,
"status": "requires_source",
"allowed_source_types": [
"card"
],
"amount": 67200,
"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_ppp",
"object": "charge",
"amount": 67200,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_1e1e1e",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": "55057",
"state": null
},
"email": "first.last@emailcompany.com",
"name": "First Last",
"phone": null
},
"captured": true,
"created": 1585423349,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"destination": null,
"dispute": null,
"disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {
},
"invoice": "in_ooo",
"livemode": true,
"metadata": {
},
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_kkk",
"payment_method": "pm_jjj",
"payment_method_details": {
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": "pass",
"cvc_check": "pass"
},
"country": "US",
"exp_month": 9,
"exp_year": 2099,
"fingerprint": "fff",
"funding": "debit",
"installments": null,
"last4": "9999",
"network": "visa",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"receipt_email": "first.last@emailcompany.com",
"receipt_number": "1e1e1e",
"receipt_url": "https://pay.stripe.com/receipts/acct_ppp/ch_ppp/rcpt_qqq",
"refunded": false,
"refunds": {
"object": "list",
"data": [
],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_ppp/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
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_kkk"
},
"client_secret": "pi_kkk_secret_1f1f1f",
"confirmation_method": "automatic",
"created": 1585423348,
"currency": "usd",
"customer": "cus_ccc",
"description": "Subscription creation",
"invoice": "in_ooo",
"metadata": {
},
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"transfer_data": null,
"transfer_group": null
}