Files
zulip/zerver/webhooks/stripe/fixtures/charge_succeeded__invoice.json
Rishi Gupta 36f54e689b integrations/stripe: Fix bug in charge.succeeded.
There are (at least) two types of objects that could be sent with a
charge.succeeded event, a Charge (e.g. for credit cards) or a Payment (if
they pay by ACH). We were handling the first but not the second.

This commit also updates the fixture for the existing charge.succeeded event
to the latest API version.
2018-12-02 00:25:52 -08:00

118 lines
3.9 KiB
JSON

{
"id": "evt_1DbqCuDEQaroqDjsojJSNhmh",
"pending_webhooks": 1,
"data": {
"object": {
"failure_message": null,
"id": "py_000000000000000000000000",
"amount": 100,
"refunds": {
"total_count": 0,
"has_more": false,
"url": "\/v1\/charges\/py_000000000000000000000000\/refunds",
"object": "list",
"data": [
]
},
"invoice": "in_000000000000000000000000",
"application": null,
"source": {
"id": "src_000000000000000000000000",
"type": "ach_credit_transfer",
"usage": "reusable",
"amount": null,
"flow": "receiver",
"customer": "cus_00000000000000",
"livemode": true,
"object": "source",
"owner": {
"address": null,
"verified_name": null,
"email": "username@example.com",
"verified_phone": null,
"phone": null,
"verified_email": null,
"verified_address": null,
"name": null
},
"statement_descriptor": null,
"metadata": {
},
"client_secret": "secret",
"currency": "usd",
"receiver": {
"amount_received": 100,
"refund_attributes_status": "missing",
"amount_charged": 100,
"amount_returned": 0,
"refund_attributes_method": "email",
"address": "1234-1234"
},
"status": "pending",
"ach_credit_transfer": {
"refund_account_holder_name": null,
"bank_name": "WELLS FARGO BANK, N.A.",
"fingerprint": "1234",
"routing_number": "1234",
"swift_code": "WFBIUS6S",
"refund_account_holder_type": null,
"account_number": "1234",
"refund_account_number": null,
"refund_routing_number": null
},
"created": 1543500572
},
"refunded": false,
"statement_descriptor": null,
"metadata": {
},
"transfer_group": null,
"amount_refunded": 0,
"currency": "usd",
"application_fee": null,
"source_transfer": null,
"object": "charge",
"receipt_email": "username@example.com",
"receipt_number": "1234-1234",
"captured": true,
"failure_code": null,
"description": null,
"payment_intent": null,
"paid": true,
"shipping": null,
"livemode": true,
"balance_transaction": "txn_000000000000000000000000",
"outcome": {
"type": "authorized",
"network_status": "approved_by_network",
"risk_level": "not_assessed",
"seller_message": "Payment complete.",
"reason": null
},
"dispute": null,
"on_behalf_of": null,
"status": "succeeded",
"fraud_details": {
},
"order": null,
"review": null,
"customer": "cus_00000000000000",
"destination": null,
"created": 1543500571
}
},
"request": {
"id": null,
"idempotency_key": "in_000000000000000000000000"
},
"type": "charge.succeeded",
"api_version": "2018-11-08",
"object": "event",
"livemode": true,
"created": 1543500572
}