This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
test_webhook_b.sh
83 lines (79 loc) · 2.53 KB
/
test_webhook_b.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
curl -H "Content-Type: application/json" -X POST -d '
{
"object":
{
"id": "in_17j6BCK4oMdhkST3ArlcRYID",
"object": "invoice",
"amount_due": 999,
"application_fee": null,
"attempt_count": 1,
"attempted": true,
"charge": "ch_17j6BCK4oMdhkST3meBXlX06",
"closed": true,
"currency": "gbp",
"customer": "cus_7z4J5DGrXLgbJP",
"date": 1456572250,
"description": null,
"discount": null,
"ending_balance": 0,
"forgiven": false,
"lines":
{
"object": "list",
"data":[
{
"id": "sub_7z4Juj7UIkWOGV",
"object": "line_item",
"amount": 999,
"currency": "gbp",
"description": null,
"discountable": true,
"livemode": false,
"metadata": {},
"period": {
"start": 1456517913,
"end": 1456604313
},
"plan": {
"id": "REG_MONTHLY_",
"object": "plan",
"amount": 999,
"created": 1456571797,
"currency": "gbp",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {},
"name": "Monthly Subscription",
"statement_descriptor": null,
"trial_period_days": null
},
"proration": false,
"quantity": 1,
"subscription": null,
"type": "subscription"
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/invoices/in_17j6BCK4oMdhkST3ArlcRYID/lines"
},
"livemode": false,
"metadata":{
},
"next_payment_attempt": null,
"paid": true,
"period_end": 1456572250,
"period_start": 1456572250,
"receipt_number": null,
"starting_balance": 0,
"statement_descriptor": null,
"subscription": "sub_7z4Juj7UIkWOGV",
"subtotal": 999,
"tax": null,
"tax_percent": null,
"total": 999,
"webhooks_delivered_at": null
}
}' http://localhost:8000/subscriptions_webhook/