-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
1Likes Given
-
0Questions
-
2Replies
having trouble phasing a Json.
hi,
I am having a lot of trouble phasing this Json get the customer and subscriptions out of the data. wondering if someone could help.
I am having a lot of trouble phasing this Json get the customer and subscriptions out of the data. wondering if someone could help.
{ "id": "evt_1E3WsQLoXENPhT9XccQX3cWm", "object": "event", "api_version": "2018-09-24", "created": 1550099449, "data": { "object": { "id": "cus_EWa2QH7ZQLe6QD", "object": "customer", "account_balance": 0, "created": 1550099447, "currency": "aud", "default_source": null, "delinquent": false, "description": null, "discount": null, "email": null, "invoice_prefix": "B7409C7", "invoice_settings": { "custom_fields": null, "footer": null }, "livemode": false, "metadata": { "supplierId": "40763" }, "shipping": null, "sources": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/customers/cus_EWa2QH7ZQLe6QD/sources" }, "subscriptions": { "object": "list", "data": [ { "id": "sub_EWa2VTwVYCLme1", "object": "subscription", "application_fee_percent": null, "billing": "charge_automatically", "billing_cycle_anchor": 1550099449, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "created": 1550099449, "current_period_end": 1552518649, "current_period_start": 1550099449, "customer": "cus_EWa2QH7ZQLe6QD", "days_until_due": null, "default_source": null, "discount": null, "ended_at": null, "items": { "object": "list", "data": [ { "id": "si_EWa29P6l36rROx", "object": "subscription_item", "billing_thresholds": null, "created": 1550099449, "metadata": { }, "plan": { "id": "plan_ELouSNjcX75qtE", "object": "plan", "active": true, "aggregate_usage": "sum", "amount": null, "billing_scheme": "tiered", "created": 1547617720, "currency": "aud", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { "plan_code": "supplier" }, "nickname": "Supplier Connections", "product": "prod_DxNq5IpOJWmkEk", "tiers": [ { "flat_amount": 0, "unit_amount": null, "up_to": 5 }, { "flat_amount": null, "unit_amount": 400, "up_to": 100 }, { "flat_amount": null, "unit_amount": 380, "up_to": 200 }, { "flat_amount": null, "unit_amount": 360, "up_to": 400 }, { "flat_amount": null, "unit_amount": 340, "up_to": 500 }, { "flat_amount": null, "unit_amount": 320, "up_to": 600 }, { "flat_amount": null, "unit_amount": 300, "up_to": 700 }, { "flat_amount": null, "unit_amount": 280, "up_to": 800 }, { "flat_amount": null, "unit_amount": 260, "up_to": 900 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1000 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1200 }, { "flat_amount": null, "unit_amount": 220, "up_to": 1300 }, { "flat_amount": null, "unit_amount": 180, "up_to": 1500 }, { "flat_amount": null, "unit_amount": 160, "up_to": null } ], "tiers_mode": "graduated", "transform_usage": null, "trial_period_days": null, "usage_type": "metered" }, "subscription": "sub_EWa2VTwVYCLme1" } ], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_EWa2VTwVYCLme1" }, "livemode": false, "metadata": { }, "plan": { "id": "plan_ELouSNjcX75qtE", "object": "plan", "active": true, "aggregate_usage": "sum", "amount": null, "billing_scheme": "tiered", "created": 1547617720, "currency": "aud", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { "plan_code": "supplier" }, "nickname": "Supplier Connections", "product": "prod_DxNq5IpOJWmkEk", "tiers": [ { "flat_amount": 0, "unit_amount": null, "up_to": 5 }, { "flat_amount": null, "unit_amount": 400, "up_to": 100 }, { "flat_amount": null, "unit_amount": 380, "up_to": 200 }, { "flat_amount": null, "unit_amount": 360, "up_to": 400 }, { "flat_amount": null, "unit_amount": 340, "up_to": 500 }, { "flat_amount": null, "unit_amount": 320, "up_to": 600 }, { "flat_amount": null, "unit_amount": 300, "up_to": 700 }, { "flat_amount": null, "unit_amount": 280, "up_to": 800 }, { "flat_amount": null, "unit_amount": 260, "up_to": 900 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1000 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1200 }, { "flat_amount": null, "unit_amount": 220, "up_to": 1300 }, { "flat_amount": null, "unit_amount": 180, "up_to": 1500 }, { "flat_amount": null, "unit_amount": 160, "up_to": null } ], "tiers_mode": "graduated", "transform_usage": null, "trial_period_days": null, "usage_type": "metered" }, "quantity": 1, "schedule": null, "start": 1550099449, "status": "active", "tax_percent": 10.0, "trial_end": null, "trial_start": null } ], "has_more": false, "total_count": 1, "url": "/v1/customers/cus_EWa2QH7ZQLe6QD/subscriptions" }, "tax_info": null, "tax_info_verification": null }, "previous_attributes": { "currency": null } }, "livemode": false, "pending_webhooks": 3, "request": { "id": "req_Is4MSbnoDdu4pi", "idempotency_key": null }, "type": "customer.updated" }
- Cubs 42
- February 14, 2019
- Like
- 1
having trouble phasing a Json.
hi,
I am having a lot of trouble phasing this Json get the customer and subscriptions out of the data. wondering if someone could help.
I am having a lot of trouble phasing this Json get the customer and subscriptions out of the data. wondering if someone could help.
{ "id": "evt_1E3WsQLoXENPhT9XccQX3cWm", "object": "event", "api_version": "2018-09-24", "created": 1550099449, "data": { "object": { "id": "cus_EWa2QH7ZQLe6QD", "object": "customer", "account_balance": 0, "created": 1550099447, "currency": "aud", "default_source": null, "delinquent": false, "description": null, "discount": null, "email": null, "invoice_prefix": "B7409C7", "invoice_settings": { "custom_fields": null, "footer": null }, "livemode": false, "metadata": { "supplierId": "40763" }, "shipping": null, "sources": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/customers/cus_EWa2QH7ZQLe6QD/sources" }, "subscriptions": { "object": "list", "data": [ { "id": "sub_EWa2VTwVYCLme1", "object": "subscription", "application_fee_percent": null, "billing": "charge_automatically", "billing_cycle_anchor": 1550099449, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "created": 1550099449, "current_period_end": 1552518649, "current_period_start": 1550099449, "customer": "cus_EWa2QH7ZQLe6QD", "days_until_due": null, "default_source": null, "discount": null, "ended_at": null, "items": { "object": "list", "data": [ { "id": "si_EWa29P6l36rROx", "object": "subscription_item", "billing_thresholds": null, "created": 1550099449, "metadata": { }, "plan": { "id": "plan_ELouSNjcX75qtE", "object": "plan", "active": true, "aggregate_usage": "sum", "amount": null, "billing_scheme": "tiered", "created": 1547617720, "currency": "aud", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { "plan_code": "supplier" }, "nickname": "Supplier Connections", "product": "prod_DxNq5IpOJWmkEk", "tiers": [ { "flat_amount": 0, "unit_amount": null, "up_to": 5 }, { "flat_amount": null, "unit_amount": 400, "up_to": 100 }, { "flat_amount": null, "unit_amount": 380, "up_to": 200 }, { "flat_amount": null, "unit_amount": 360, "up_to": 400 }, { "flat_amount": null, "unit_amount": 340, "up_to": 500 }, { "flat_amount": null, "unit_amount": 320, "up_to": 600 }, { "flat_amount": null, "unit_amount": 300, "up_to": 700 }, { "flat_amount": null, "unit_amount": 280, "up_to": 800 }, { "flat_amount": null, "unit_amount": 260, "up_to": 900 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1000 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1200 }, { "flat_amount": null, "unit_amount": 220, "up_to": 1300 }, { "flat_amount": null, "unit_amount": 180, "up_to": 1500 }, { "flat_amount": null, "unit_amount": 160, "up_to": null } ], "tiers_mode": "graduated", "transform_usage": null, "trial_period_days": null, "usage_type": "metered" }, "subscription": "sub_EWa2VTwVYCLme1" } ], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_EWa2VTwVYCLme1" }, "livemode": false, "metadata": { }, "plan": { "id": "plan_ELouSNjcX75qtE", "object": "plan", "active": true, "aggregate_usage": "sum", "amount": null, "billing_scheme": "tiered", "created": 1547617720, "currency": "aud", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { "plan_code": "supplier" }, "nickname": "Supplier Connections", "product": "prod_DxNq5IpOJWmkEk", "tiers": [ { "flat_amount": 0, "unit_amount": null, "up_to": 5 }, { "flat_amount": null, "unit_amount": 400, "up_to": 100 }, { "flat_amount": null, "unit_amount": 380, "up_to": 200 }, { "flat_amount": null, "unit_amount": 360, "up_to": 400 }, { "flat_amount": null, "unit_amount": 340, "up_to": 500 }, { "flat_amount": null, "unit_amount": 320, "up_to": 600 }, { "flat_amount": null, "unit_amount": 300, "up_to": 700 }, { "flat_amount": null, "unit_amount": 280, "up_to": 800 }, { "flat_amount": null, "unit_amount": 260, "up_to": 900 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1000 }, { "flat_amount": null, "unit_amount": 240, "up_to": 1200 }, { "flat_amount": null, "unit_amount": 220, "up_to": 1300 }, { "flat_amount": null, "unit_amount": 180, "up_to": 1500 }, { "flat_amount": null, "unit_amount": 160, "up_to": null } ], "tiers_mode": "graduated", "transform_usage": null, "trial_period_days": null, "usage_type": "metered" }, "quantity": 1, "schedule": null, "start": 1550099449, "status": "active", "tax_percent": 10.0, "trial_end": null, "trial_start": null } ], "has_more": false, "total_count": 1, "url": "/v1/customers/cus_EWa2QH7ZQLe6QD/subscriptions" }, "tax_info": null, "tax_info_verification": null }, "previous_attributes": { "currency": null } }, "livemode": false, "pending_webhooks": 3, "request": { "id": "req_Is4MSbnoDdu4pi", "idempotency_key": null }, "type": "customer.updated" }
- Cubs 42
- February 14, 2019
- Like
- 1