From 7bf3ac7e905ed240729e5997e4cc9bfbbc4b93ed Mon Sep 17 00:00:00 2001 From: Bickio Date: Sat, 3 Dec 2016 11:09:09 +1300 Subject: [PATCH] integrations: Add webhook payloads for Stripe. --- .../stripe/stripe_charge_dispute_closed.json | 61 ++++++++++++++ .../stripe/stripe_charge_dispute_created.json | 61 ++++++++++++++ .../fixtures/stripe/stripe_charge_failed.json | 76 +++++++++++++++++ .../stripe/stripe_charge_succeeded.json | 76 +++++++++++++++++ .../stripe/stripe_customer_created.json | 42 ++++++++++ .../stripe/stripe_customer_deleted.json | 41 +++++++++ .../stripe_customer_subscription_created.json | 47 +++++++++++ .../stripe_customer_subscription_deleted.json | 47 +++++++++++ ..._customer_subscription_trial_will_end.json | 47 +++++++++++ .../stripe/stripe_invoice_payment_failed.json | 83 +++++++++++++++++++ .../stripe/stripe_order_payment_failed.json | 64 ++++++++++++++ .../stripe_order_payment_succeeded.json | 64 ++++++++++++++ .../fixtures/stripe/stripe_order_updated.json | 65 +++++++++++++++ .../stripe/stripe_transfer_failed.json | 44 ++++++++++ .../fixtures/stripe/stripe_transfer_paid.json | 44 ++++++++++ 15 files changed, 862 insertions(+) create mode 100644 zerver/fixtures/stripe/stripe_charge_dispute_closed.json create mode 100644 zerver/fixtures/stripe/stripe_charge_dispute_created.json create mode 100644 zerver/fixtures/stripe/stripe_charge_failed.json create mode 100644 zerver/fixtures/stripe/stripe_charge_succeeded.json create mode 100644 zerver/fixtures/stripe/stripe_customer_created.json create mode 100644 zerver/fixtures/stripe/stripe_customer_deleted.json create mode 100644 zerver/fixtures/stripe/stripe_customer_subscription_created.json create mode 100644 zerver/fixtures/stripe/stripe_customer_subscription_deleted.json create mode 100644 zerver/fixtures/stripe/stripe_customer_subscription_trial_will_end.json create mode 100644 zerver/fixtures/stripe/stripe_invoice_payment_failed.json create mode 100644 zerver/fixtures/stripe/stripe_order_payment_failed.json create mode 100644 zerver/fixtures/stripe/stripe_order_payment_succeeded.json create mode 100644 zerver/fixtures/stripe/stripe_order_updated.json create mode 100644 zerver/fixtures/stripe/stripe_transfer_failed.json create mode 100644 zerver/fixtures/stripe/stripe_transfer_paid.json diff --git a/zerver/fixtures/stripe/stripe_charge_dispute_closed.json b/zerver/fixtures/stripe/stripe_charge_dispute_closed.json new file mode 100644 index 0000000000..80108b0c09 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_charge_dispute_closed.json @@ -0,0 +1,61 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "charge.dispute.closed", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "dp_00000000000000", + "object": "dispute", + "amount": 1000, + "balance_transactions": [], + "charge": "ch_00000000000000", + "created": 1480672052, + "currency": "aud", + "evidence": { + "access_activity_log": null, + "billing_address": null, + "cancellation_policy": null, + "cancellation_policy_disclosure": null, + "cancellation_rebuttal": null, + "customer_communication": null, + "customer_email_address": null, + "customer_name": null, + "customer_purchase_ip": null, + "customer_signature": null, + "duplicate_charge_documentation": null, + "duplicate_charge_explanation": null, + "duplicate_charge_id": null, + "product_description": null, + "receipt": null, + "refund_policy": null, + "refund_policy_disclosure": null, + "refund_refusal_explanation": null, + "service_date": null, + "service_documentation": null, + "shipping_address": null, + "shipping_carrier": null, + "shipping_date": null, + "shipping_documentation": null, + "shipping_tracking_number": null, + "uncategorized_file": null, + "uncategorized_text": "Here is some evidence" + }, + "evidence_details": { + "due_by": 1482364799, + "has_evidence": false, + "past_due": false, + "submission_count": 0 + }, + "is_charge_refundable": false, + "livemode": false, + "metadata": {}, + "reason": "general", + "status": "won" + } + } +} diff --git a/zerver/fixtures/stripe/stripe_charge_dispute_created.json b/zerver/fixtures/stripe/stripe_charge_dispute_created.json new file mode 100644 index 0000000000..1380260e83 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_charge_dispute_created.json @@ -0,0 +1,61 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "charge.dispute.created", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "dp_00000000000000", + "object": "dispute", + "amount": 1000, + "balance_transactions": [], + "charge": "ch_00000000000000", + "created": 1480672043, + "currency": "aud", + "evidence": { + "access_activity_log": null, + "billing_address": null, + "cancellation_policy": null, + "cancellation_policy_disclosure": null, + "cancellation_rebuttal": null, + "customer_communication": null, + "customer_email_address": null, + "customer_name": null, + "customer_purchase_ip": null, + "customer_signature": null, + "duplicate_charge_documentation": null, + "duplicate_charge_explanation": null, + "duplicate_charge_id": null, + "product_description": null, + "receipt": null, + "refund_policy": null, + "refund_policy_disclosure": null, + "refund_refusal_explanation": null, + "service_date": null, + "service_documentation": null, + "shipping_address": null, + "shipping_carrier": null, + "shipping_date": null, + "shipping_documentation": null, + "shipping_tracking_number": null, + "uncategorized_file": null, + "uncategorized_text": null + }, + "evidence_details": { + "due_by": 1482364799, + "has_evidence": false, + "past_due": false, + "submission_count": 0 + }, + "is_charge_refundable": false, + "livemode": false, + "metadata": {}, + "reason": "general", + "status": "needs_response" + } + } +} diff --git a/zerver/fixtures/stripe/stripe_charge_failed.json b/zerver/fixtures/stripe/stripe_charge_failed.json new file mode 100644 index 0000000000..da60e12de9 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_charge_failed.json @@ -0,0 +1,76 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "charge.failed", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "ch_00000000000000", + "object": "charge", + "amount": 100, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "balance_transaction": "txn_00000000000000", + "captured": true, + "created": 1480671978, + "currency": "aud", + "customer": null, + "description": "My First Test Charge (created for API docs)", + "destination": null, + "dispute": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "order": null, + "outcome": null, + "paid": false, + "receipt_email": null, + "receipt_number": null, + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_19MDcUCV4wXizEw4AsxeFwTn/refunds" + }, + "review": null, + "shipping": null, + "source": { + "id": "card_00000000000000", + "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": "US", + "customer": null, + "cvc_check": null, + "dynamic_last4": null, + "exp_month": 8, + "exp_year": 2017, + "funding": "credit", + "last4": "4242", + "metadata": {}, + "name": null, + "tokenization_method": null + }, + "source_transfer": null, + "statement_descriptor": null, + "status": "succeeded" + } + } +} diff --git a/zerver/fixtures/stripe/stripe_charge_succeeded.json b/zerver/fixtures/stripe/stripe_charge_succeeded.json new file mode 100644 index 0000000000..b4632556f1 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_charge_succeeded.json @@ -0,0 +1,76 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "charge.succeeded", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "ch_00000000000000", + "object": "charge", + "amount": 100, + "amount_refunded": 0, + "application": null, + "application_fee": null, + "balance_transaction": "txn_00000000000000", + "captured": true, + "created": 1480671988, + "currency": "aud", + "customer": null, + "description": "My First Test Charge (created for API docs)", + "destination": null, + "dispute": null, + "failure_code": null, + "failure_message": null, + "fraud_details": {}, + "invoice": null, + "livemode": false, + "metadata": {}, + "order": null, + "outcome": null, + "paid": true, + "receipt_email": null, + "receipt_number": null, + "refunded": false, + "refunds": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/charges/ch_19MDceCV4wXizEw45TBCADlp/refunds" + }, + "review": null, + "shipping": null, + "source": { + "id": "card_00000000000000", + "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": "US", + "customer": null, + "cvc_check": null, + "dynamic_last4": null, + "exp_month": 8, + "exp_year": 2017, + "funding": "credit", + "last4": "4242", + "metadata": {}, + "name": null, + "tokenization_method": null + }, + "source_transfer": null, + "statement_descriptor": null, + "status": "succeeded" + } + } +} diff --git a/zerver/fixtures/stripe/stripe_customer_created.json b/zerver/fixtures/stripe/stripe_customer_created.json new file mode 100644 index 0000000000..e5cc27559e --- /dev/null +++ b/zerver/fixtures/stripe/stripe_customer_created.json @@ -0,0 +1,42 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "customer.created", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "cus_00000000000000", + "object": "customer", + "account_balance": 0, + "created": 1480672088, + "currency": "aud", + "default_source": null, + "delinquent": false, + "description": null, + "discount": null, + "email": null, + "livemode": false, + "metadata": {}, + "shipping": null, + "sources": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_9fYl7K4F7pQxrY/sources" + }, + "subscriptions": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_9fYl7K4F7pQxrY/subscriptions" + } + } + } +} + diff --git a/zerver/fixtures/stripe/stripe_customer_deleted.json b/zerver/fixtures/stripe/stripe_customer_deleted.json new file mode 100644 index 0000000000..3b13bc4991 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_customer_deleted.json @@ -0,0 +1,41 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "customer.deleted", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "cus_00000000000000", + "object": "customer", + "account_balance": 0, + "created": 1480672097, + "currency": "aud", + "default_source": null, + "delinquent": false, + "description": null, + "discount": null, + "email": null, + "livemode": false, + "metadata": {}, + "shipping": null, + "sources": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_9fYlWRryEw2I9B/sources" + }, + "subscriptions": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/customers/cus_9fYlWRryEw2I9B/subscriptions" + } + } + } +} diff --git a/zerver/fixtures/stripe/stripe_customer_subscription_created.json b/zerver/fixtures/stripe/stripe_customer_subscription_created.json new file mode 100644 index 0000000000..adcfd1c78a --- /dev/null +++ b/zerver/fixtures/stripe/stripe_customer_subscription_created.json @@ -0,0 +1,47 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "customer.subscription.created", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "sub_00000000000000", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": false, + "canceled_at": null, + "created": 1480672107, + "current_period_end": 1483350507, + "current_period_start": 1480672107, + "customer": "cus_00000000000000", + "discount": null, + "ended_at": null, + "livemode": false, + "metadata": {}, + "plan": { + "id": "gold_00000000000000", + "object": "plan", + "amount": 2000, + "created": 1394782886, + "currency": "aud", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Gold Special", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1480672107, + "status": "active", + "tax_percent": null, + "trial_end": null, + "trial_start": null + } + } +} diff --git a/zerver/fixtures/stripe/stripe_customer_subscription_deleted.json b/zerver/fixtures/stripe/stripe_customer_subscription_deleted.json new file mode 100644 index 0000000000..8f0be79bf3 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_customer_subscription_deleted.json @@ -0,0 +1,47 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "customer.subscription.deleted", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "sub_00000000000000", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": false, + "canceled_at": null, + "created": 1480672113, + "current_period_end": 1483350513, + "current_period_start": 1480672113, + "customer": "cus_00000000000000", + "discount": null, + "ended_at": 1480633660, + "livemode": false, + "metadata": {}, + "plan": { + "id": "gold_00000000000000", + "object": "plan", + "amount": 2000, + "created": 1394782886, + "currency": "aud", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Gold Special", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1480672113, + "status": "canceled", + "tax_percent": null, + "trial_end": null, + "trial_start": null + } + } +} diff --git a/zerver/fixtures/stripe/stripe_customer_subscription_trial_will_end.json b/zerver/fixtures/stripe/stripe_customer_subscription_trial_will_end.json new file mode 100644 index 0000000000..6e04602108 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_customer_subscription_trial_will_end.json @@ -0,0 +1,47 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "customer.subscription.trial_will_end", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "sub_00000000000000", + "object": "subscription", + "application_fee_percent": null, + "cancel_at_period_end": false, + "canceled_at": null, + "created": 1480672121, + "current_period_end": 1483350521, + "current_period_start": 1480672121, + "customer": "cus_00000000000000", + "discount": null, + "ended_at": null, + "livemode": false, + "metadata": {}, + "plan": { + "id": "gold_00000000000000", + "object": "plan", + "amount": 2000, + "created": 1394782886, + "currency": "aud", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Gold Special", + "statement_descriptor": null, + "trial_period_days": null + }, + "quantity": 1, + "start": 1480672121, + "status": "trialing", + "tax_percent": null, + "trial_end": 1480892861, + "trial_start": 1480633661 + } + } +} diff --git a/zerver/fixtures/stripe/stripe_invoice_payment_failed.json b/zerver/fixtures/stripe/stripe_invoice_payment_failed.json new file mode 100644 index 0000000000..40cd51a268 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_invoice_payment_failed.json @@ -0,0 +1,83 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "invoice.payment_failed", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "in_00000000000000", + "object": "invoice", + "amount_due": 0, + "application_fee": null, + "attempt_count": 0, + "attempted": true, + "charge": null, + "closed": false, + "currency": "aud", + "customer": "cus_00000000000000", + "date": 1480672129, + "description": null, + "discount": null, + "ending_balance": null, + "forgiven": false, + "lines": { + "data": [ + { + "id": "sub_9fYmJQOQy04yoh", + "object": "line_item", + "amount": 2000, + "currency": "aud", + "description": null, + "discountable": true, + "livemode": true, + "metadata": {}, + "period": { + "start": 1483350529, + "end": 1486028929 + }, + "plan": { + "id": "gold", + "object": "plan", + "amount": 2000, + "created": 1480672129, + "currency": "aud", + "interval": "month", + "interval_count": 1, + "livemode": false, + "metadata": {}, + "name": "Gold Special", + "statement_descriptor": null, + "trial_period_days": null + }, + "proration": false, + "quantity": 1, + "subscription": null, + "type": "subscription" + } + ], + "total_count": 1, + "object": "list", + "url": "/v1/invoices/in_19MDevCV4wXizEw4B4lY7YPR/lines" + }, + "livemode": false, + "metadata": {}, + "next_payment_attempt": 1480675729, + "paid": false, + "period_end": 1480672129, + "period_start": 1480672129, + "receipt_number": null, + "starting_balance": 0, + "statement_descriptor": null, + "subscription": null, + "subtotal": 0, + "tax": null, + "tax_percent": null, + "total": 0, + "webhooks_delivered_at": null + } + } +} diff --git a/zerver/fixtures/stripe/stripe_order_payment_failed.json b/zerver/fixtures/stripe/stripe_order_payment_failed.json new file mode 100644 index 0000000000..e8000512d0 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_order_payment_failed.json @@ -0,0 +1,64 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "order.payment_failed", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "or_00000000000000", + "object": "order", + "amount": 1500, + "amount_returned": null, + "application": null, + "application_fee": null, + "charge": null, + "created": 1480672065, + "currency": "aud", + "customer": null, + "email": null, + "items": [ + { + "object": "order_item", + "amount": 1500, + "currency": "aud", + "description": "T-shirt", + "parent": "sk_19MDVPCV4wXizEw4hEI0KH4Q", + "quantity": null, + "type": "sku" + } + ], + "livemode": false, + "metadata": {}, + "returns": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/order_returns?order=or_19MDdtCV4wXizEw4j5wLMEYP" + }, + "selected_shipping_method": null, + "shipping": { + "address": { + "city": "Anytown", + "country": "US", + "line1": "1234 Main street", + "line2": null, + "postal_code": "123456", + "state": null + }, + "carrier": null, + "name": "Jenny Rosen", + "phone": null, + "tracking_number": null + }, + "shipping_methods": null, + "status": "created", + "status_transitions": null, + "updated": 1480672065 + } + } +} diff --git a/zerver/fixtures/stripe/stripe_order_payment_succeeded.json b/zerver/fixtures/stripe/stripe_order_payment_succeeded.json new file mode 100644 index 0000000000..aa3ab1f467 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_order_payment_succeeded.json @@ -0,0 +1,64 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "order.payment_succeeded", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "or_00000000000000", + "object": "order", + "amount": 1500, + "amount_returned": null, + "application": null, + "application_fee": null, + "charge": null, + "created": 1480672071, + "currency": "aud", + "customer": null, + "email": null, + "items": [ + { + "object": "order_item", + "amount": 1500, + "currency": "aud", + "description": "T-shirt", + "parent": "sk_19MDVPCV4wXizEw4hEI0KH4Q", + "quantity": null, + "type": "sku" + } + ], + "livemode": false, + "metadata": {}, + "returns": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/order_returns?order=or_19MDdzCV4wXizEw4tadCnKNn" + }, + "selected_shipping_method": null, + "shipping": { + "address": { + "city": "Anytown", + "country": "US", + "line1": "1234 Main street", + "line2": null, + "postal_code": "123456", + "state": null + }, + "carrier": null, + "name": "Jenny Rosen", + "phone": null, + "tracking_number": null + }, + "shipping_methods": null, + "status": "created", + "status_transitions": null, + "updated": 1480672071 + } + } +} diff --git a/zerver/fixtures/stripe/stripe_order_updated.json b/zerver/fixtures/stripe/stripe_order_updated.json new file mode 100644 index 0000000000..e17e182f1b --- /dev/null +++ b/zerver/fixtures/stripe/stripe_order_updated.json @@ -0,0 +1,65 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "order.updated", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "or_00000000000000", + "object": "order", + "amount": 1500, + "amount_returned": null, + "application": null, + "application_fee": null, + "charge": null, + "created": 1480672076, + "currency": "aud", + "customer": null, + "email": null, + "items": [ + { + "object": "order_item", + "amount": 1500, + "currency": "aud", + "description": "T-shirt", + "parent": "sk_19MDVPCV4wXizEw4hEI0KH4Q", + "quantity": null, + "type": "sku" + } + ], + "livemode": false, + "metadata": {}, + "returns": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/order_returns?order=or_19MDe4CV4wXizEw4hV0NcMsD" + }, + "selected_shipping_method": null, + "shipping": { + "address": { + "city": "Anytown", + "country": "US", + "line1": "1234 Main street", + "line2": null, + "postal_code": "123456", + "state": null + }, + "carrier": null, + "name": "Jenny Rosen", + "phone": null, + "tracking_number": null + }, + "shipping_methods": null, + "status": "created", + "status_transitions": null, + "updated": 1480672076 + }, + "previous_attributes": {} + } +} diff --git a/zerver/fixtures/stripe/stripe_transfer_failed.json b/zerver/fixtures/stripe/stripe_transfer_failed.json new file mode 100644 index 0000000000..5f035324bc --- /dev/null +++ b/zerver/fixtures/stripe/stripe_transfer_failed.json @@ -0,0 +1,44 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "transfer.failed", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "tr_00000000000000", + "object": "transfer", + "amount": 1100, + "amount_reversed": 0, + "application_fee": null, + "balance_transaction": "txn_00000000000000", + "created": 1480672150, + "currency": "aud", + "date": 1480672150, + "description": "Transfer to test@example.com", + "destination": "ba_19MDfGCV4wXizEw4Yp5cFspJ", + "failure_code": null, + "failure_message": null, + "livemode": false, + "metadata": {}, + "method": "standard", + "recipient": "rp_00000000000000", + "reversals": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/transfers/tr_19MDfGCV4wXizEw4tj8SREbU/reversals" + }, + "reversed": false, + "source_transaction": null, + "source_type": "card", + "statement_descriptor": null, + "status": "failed", + "type": "bank_account" + } + } +} diff --git a/zerver/fixtures/stripe/stripe_transfer_paid.json b/zerver/fixtures/stripe/stripe_transfer_paid.json new file mode 100644 index 0000000000..d859b741d2 --- /dev/null +++ b/zerver/fixtures/stripe/stripe_transfer_paid.json @@ -0,0 +1,44 @@ +{ + "created": 1326853478, + "livemode": false, + "id": "evt_00000000000000", + "type": "transfer.paid", + "object": "event", + "request": null, + "pending_webhooks": 1, + "api_version": "2016-07-06", + "data": { + "object": { + "id": "tr_00000000000000", + "object": "transfer", + "amount": 1100, + "amount_reversed": 0, + "application_fee": null, + "balance_transaction": "txn_00000000000000", + "created": 1480672156, + "currency": "aud", + "date": 1480672156, + "description": "Transfer to test@example.com", + "destination": "ba_19MDfMCV4wXizEw4jOWU4wu8", + "failure_code": null, + "failure_message": null, + "livemode": false, + "metadata": {}, + "method": "standard", + "recipient": "rp_00000000000000", + "reversals": { + "object": "list", + "data": [], + "has_more": false, + "total_count": 0, + "url": "/v1/transfers/tr_19MDfMCV4wXizEw4GpK8rGHB/reversals" + }, + "reversed": false, + "source_transaction": null, + "source_type": "card", + "statement_descriptor": null, + "status": "paid", + "type": "bank_account" + } + } +}