Skip to content

Instantly share code, notes, and snippets.

@spq24
Created July 14, 2015 18:04
Show Gist options
  • Save spq24/8e7bf30f965dd9f264ca to your computer and use it in GitHub Desktop.
Save spq24/8e7bf30f965dd9f264ca to your computer and use it in GitHub Desktop.
Parameters: {"id"=>"evt_16OXgjDPqmFGZYxBdeTjKnpr", "created"=>1436896769, "livemode"=>false, "type"=>"invoice.payment_succeeded", "data"=>{"object"=>{"date"=>1436896769, "i
d"=>"in_16OXgjDPqmFGZYxBnS3fI1CQ", "period_start"=>1436896769, "period_end"=>1436896769, "lines"=>{"object"=>"list", "total_count"=>1, "has_more"=>false, "url"=>"/v1/invoices
/in_16OXgjDPqmFGZYxBnS3fI1CQ/lines", "data"=>[{"id"=>"sub_6blDm3XJI0wWaA", "object"=>"line_item", "type"=>"subscription", "livemode"=>false, "amount"=>10, "currency"=>"usd",
"proration"=>false, "period"=>{"start"=>1436896769, "end"=>1436983169}, "subscription"=>nil, "quantity"=>1, "plan"=>{"interval"=>"day", "name"=>"Daily Plan", "created"=>14364
63055, "amount"=>10, "currency"=>"usd", "id"=>"Daily Plan", "object"=>"plan", "livemode"=>false, "interval_count"=>1, "trial_period_days"=>nil, "metadata"=>{}, "statement_des
criptor"=>"Daily Plan"}, "description"=>nil, "discountable"=>true, "metadata"=>{}}]}, "subtotal"=>10, "total"=>9, "customer"=>"cus_6bNAq2czziHy2u", "object"=>"invoice", "atte
mpted"=>true, "closed"=>true, "forgiven"=>false, "paid"=>true, "livemode"=>false, "attempt_count"=>0, "amount_due"=>0, "currency"=>"usd", "starting_balance"=>0, "ending_balan
ce"=>9, "next_payment_attempt"=>nil, "webhooks_delivered_at"=>nil, "charge"=>nil, "discount"=>{"coupon"=>{"id"=>"testercoupon4", "created"=>1436771845, "percent_off"=>10, "am
ount_off"=>nil, "currency"=>nil, "object"=>"coupon", "livemode"=>false, "duration"=>"forever", "redeem_by"=>nil, "max_redemptions"=>nil, "times_redeemed"=>9, "duration_in_mon
ths"=>nil, "valid"=>true, "metadata"=>{}}, "start"=>1436896769, "object"=>"discount", "customer"=>"cus_6bNAq2czziHy2u", "subscription"=>"sub_6blDm3XJI0wWaA", "end"=>nil}, "ap
plication_fee"=>0, "subscription"=>"sub_6blDm3XJI0wWaA", "tax_percent"=>nil, "tax"=>nil, "metadata"=>{}, "statement_descriptor"=>nil, "description"=>nil, "receipt_number"=>ni
l}}, "object"=>"event", "pending_webhooks"=>1, "request"=>"req_6blDsRRJbqm8Wf", "api_version"=>"2015-03-24", "user_id"=>"acct_164zOGDPqmFGZYxB", "webhook"=>{"id"=>"evt_16OXgj
DPqmFGZYxBdeTjKnpr", "created"=>1436896769, "livemode"=>false, "type"=>"invoice.payment_succeeded", "data"=>{"object"=>{"date"=>1436896769, "id"=>"in_16OXgjDPqmFGZYxBnS3fI1CQ
", "period_start"=>1436896769, "period_end"=>1436896769, "lines"=>{"object"=>"list", "total_count"=>1, "has_more"=>false, "url"=>"/v1/invoices/in_16OXgjDPqmFGZYxBnS3fI1CQ/lin
es", "data"=>[{"id"=>"sub_6blDm3XJI0wWaA", "object"=>"line_item", "type"=>"subscription", "livemode"=>false, "amount"=>10, "currency"=>"usd", "proration"=>false, "period"=>{"
start"=>1436896769, "end"=>1436983169}, "subscription"=>nil, "quantity"=>1, "plan"=>{"interval"=>"day", "name"=>"Daily Plan", "created"=>1436463055, "amount"=>10, "currency"=
>"usd", "id"=>"Daily Plan", "object"=>"plan", "livemode"=>false, "interval_count"=>1, "trial_period_days"=>nil, "metadata"=>{}, "statement_descriptor"=>"Daily Plan"}, "descri
ption"=>nil, "discountable"=>true, "metadata"=>{}}]}, "subtotal"=>10, "total"=>9, "customer"=>"cus_6bNAq2czziHy2u", "object"=>"invoice", "attempted"=>true, "closed"=>true, "f
orgiven"=>false, "paid"=>true, "livemode"=>false, "attempt_count"=>0, "amount_due"=>0, "currency"=>"usd", "starting_balance"=>0, "ending_balance"=>9, "next_payment_attempt"=>
nil, "webhooks_delivered_at"=>nil, "charge"=>nil, "discount"=>{"coupon"=>{"id"=>"testercoupon4", "created"=>1436771845, "percent_off"=>10, "amount_off"=>nil, "currency"=>nil,
"object"=>"coupon", "livemode"=>false, "duration"=>"forever", "redeem_by"=>nil, "max_redemptions"=>nil, "times_redeemed"=>9, "duration_in_months"=>nil, "valid"=>true, "metad
ata"=>{}}, "start"=>1436896769, "object"=>"discount", "customer"=>"cus_6bNAq2czziHy2u", "subscription"=>"sub_6blDm3XJI0wWaA", "end"=>nil}, "application_fee"=>0, "subscription
"=>"sub_6blDm3XJI0wWaA", "tax_percent"=>nil, "tax"=>nil, "metadata"=>{}, "statement_descriptor"=>nil, "description"=>nil, "receipt_number"=>nil}}, "object"=>"event", "pending
_webhooks"=>1, "request"=>"req_6blDsRRJbqm8Wf", "api_version"=>"2015-03-24", "user_id"=>"acct_164zOGDPqmFGZYxB"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment