-
Notifications
You must be signed in to change notification settings - Fork 0
/
webhook_request.bat
128 lines (125 loc) · 4.66 KB
/
webhook_request.bat
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@echo off
REM This is a Windows batch script that sends a POST request to a webhook endpoint
REM Check if an argument is provided
if "%~1" == "" (
echo Usage: %~nx0 ^<id^>
exit /b 1
)
REM Assign the id argument to a variable
set id=%~1
REM Execute the curl command with the provided id
curl --request POST ^
--url https://giraffe-legible-centrally.ngrok-free.app/webhook ^
--header "Content-Type: application/json" ^
--header "User-Agent: insomnia/8.6.1" ^
--data "{
\"attempt_number\": 1,
\"event\": {
\"api_version\": \"2018-03-22\",
\"created_at\": \"2023-08-30T19:29:20Z\",
\"data\": {
\"id\": \"%id%\",
\"code\": \"XA6G6ZFR\",
\"pricing\": {
\"local\": {
\"amount\": \"1.00\",
\"currency\": \"USD\"
},
\"settlement\": {
\"amount\": \"1\",
\"currency\": \"USDC\"
}
},
\"metadata\": {
\"name\": \"Bobby Axlerod\",
\"email\": \"bobby@axecapital.com\"
},
\"timeline\": [
{
\"time\": \"2023-08-30T18:55:51Z\",
\"status\": \"NEW\"
},
{
\"time\": \"2023-08-30T19:24:27Z\",
\"status\": \"SIGNED\"
},
{
\"time\": \"2023-08-30T19:24:45Z\",
\"status\": \"PENDING\"
},
{
\"time\": \"2023-08-30T19:29:20Z\",
\"status\": \"COMPLETED\"
}
],
\"redirects\": {
\"cancel_url\": \"\",
\"success_url\": \"\",
\"will_redirect_after_success\": false
},
\"web3_data\": {
\"failure_events\": [],
\"success_events\": [
{
\"sender\": \"0xb6d00d83158fee6695c72ff9c5e915478a479224\",
\"tx_hsh\": \"0xc0a731f82af615d7a5f6ba691ba07e083d5403d812adaa8659ed5892c9d3320d\",
\"finalized\": false,
\"recipient\": \"0x293a08a589f44a6188d65e92fbcd2a27e93d49e3\",
\"timestamp\": \"2023-08-30T19:24:37Z\",
\"network_fee_paid\": \"17215600576946625\",
\"input_token_amount\": \"1000000\",
\"input_token_address\": \"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\"
},
{
\"sender\": \"0xb6d00d83158fee6695c72ff9c5e915478a479224\",
\"tx_hsh\": \"0xc0a731f82af615d7a5f6ba691ba07e083d5403d812adaa8659ed5892c9d3320d\",
\"finalized\": true,
\"recipient\": \"0x293a08a589f44a6188d65e92fbcd2a27e93d49e3\",
\"timestamp\": \"2023-08-30T19:24:37Z\",
\"network_fee_paid\": \"17215600576946625\",
\"input_token_amount\": \"1000000\",
\"input_token_address\": \"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\"
}
],
\"transfer_intent\": {
\"metadata\": {
\"sender\": \"0xB6d00D83158feE6695C72ff9c5E915478A479224\",
\"chain_id\": 137,
\"contract_address\": \"0xeF0D482Daa16fa86776Bc582Aff3dFce8d9b8396\"
},
\"call_data\": {
\"id\": \"0x58e8e1e895274125a3dcc7e398daa6c0\",
\"prefix\": \"0x4b3220496e666f726d6174696f6e616c204d6573736167653a20333220\",
\"deadline\": \"2023-09-01T18:55:51Z\",
\"operator\": \"0x8fccc78dae0a8f93b0fe6799de888d4c57e273db\",
\"recipient\": \"0x293a08a589f44a6188d65e92fbcd2a27e93d49e3\",
\"signature\": \"0xc9b4b26d20ef9e953d145214a335e61495e9d4a559329885952a1b98c72611601e4deb30556b457bdcc1c66ce93976bed9b261447ce7eb770fce70f5216b3a481b\",
\"fee_amount\": \"10000\",
\"recipient_amount\": \"990000\",
\"recipient_currency\": \"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",
\"refund_destination\": \"0xB6d00D83158feE6695C72ff9c5E915478A479225\"
}
},
\"contract_addresses\": {
\"1\": \"0x71b3ba7607abd0cd35eb398c2a38313f10aa3fdb\",
\"137\": \"0xeF0D482Daa16fa86776Bc582Aff3dFce8d9b8396\"
}
},
\"created_at\": \"2023-08-30T18:55:51Z\",
\"expires_at\": \"2023-09-01T18:55:51Z\",
\"hosted_url\": \"https://commerce.coinbase.com/pay/2aee9dd1-67b8-43ef-8dfe-977959850f27\",
\"brand_color\": \"#000000\",
\"charge_kind\": \"WEB3\",
\"confirmed_at\": \"2023-08-30T19:29:20Z\",
\"pricing_type\": \"fixed_price\",
\"support_email\": \"\",
\"brand_logo_url\": \"https://res.cloudinary.com/commerce/image/upload/v1653516296/dlwoolpero6qgsffxmpz.jpg\",
\"organization_name\": \"Fine Art\"
},
\"id\": \"3592c237-e72b-4e71-8de2-569dcf0b515f\",
\"resource\": \"event\",
\"type\": \"charge:confirmed\"
},
\"id\": \"%id%\",
\"scheduled_for\": \"2023-08-30T19:29:20Z\"
}"