-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathindex.html
52 lines (49 loc) · 2.28 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Microsoft ASP.NET WebHooks Stripe Receiver</title>
<meta charset="utf-8" />
</head>
<body>
<h1>Microsoft ASP.NET WebHooks Stripe Receiver</h1>
<p>
This sample illustrates how to wire up a Stripe WebHooks receiver which can be used for
Stripe WebHooks.
</p>
<h2>Direct vs Indirect WebHooks</h2>
<p>There are two ways in which you can configure Stripe WebHooks:</p>
<dl>
<dt>Direct</dt>
<dd>Using direct WebHooks, you register a WebHook URI with Stripe and Stripe sends the WebHook data as normal to your WebHook receiver.</dd>
<dt>Indirect</dt>
<dd>Using indirect WebHooks, upon receiving a WebHook, the actual WebHook data is retrieved using a follow-up HTTP GET request going back to Stripe.</dd>
</dl>
<p>
If using <b>indirect</b> WebHooks, then the URI looks like this:
</p>
<pre> https://<host>/api/webhooks/incoming/stripe/{id}?code=83699ec7c1d794c0c780e49a5c72972590571fd8</pre>
<p>
For security reasons the WebHook URI must be an <c>https</c> URI and contain a 'code' query parameter with the
same value as configured in the <b>MS_WebHookReceiverSecret_Stripe</b> application setting.
The 'code' parameter must be between 32 and 128 characters long.
</p>
<p>
If using <b>direct</b> WebHooks, then the URI looks like this:
</p>
<pre> http://<host>/api/webhooks/incoming/stripe/{id}</pre>
<p>
In this case set the <b>MS_WebHookReceiverSecret_Stripe</b> application setting to the Stripe 'token' parameter, optionally using IDs
to differentiate between multiple WebHooks, for example '<c>secret0, trigger=secret1</c>'.
</p>
<h2>Handling Test Events</h2>
<p>
Set the <b>MS_WebHookStripePassThroughTestEvents</b> application setting to true if you want to be able to receive test events (with Id 'evt_00000000000000').
By default the test events will be consumed by the StripeWebHookReceiver which automatically returns a 200 response.
</p>
<p>
Please see <a href="https://stripe.com/docs/webhooks">Stripe WebHooks</a> and
<a href="https://github.com/aspnet/WebHooks">AspNet WebHooks</a>
for more information.
</p>
</body>
</html>