-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstripe-connect.json
255 lines (255 loc) · 7.27 KB
/
stripe-connect.json
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
{
"swagger" : "2.0",
"info" : {
"description" : "This is an example of using OAuth2 Application Flow in a specification to describe security to your API.",
"version" : "1.0.0",
"title" : "Stripe Connect Standalone OAuth2 Project"
},
"host" : "connect.stripe.com",
"basePath" : "/oauth",
"schemes" : [ "https" ],
"consumes" : [ "application/json", "application/xml", "application/x-www-form-urlencoded" ],
"produces" : [ "application/json", "application/xml" ],
"security" : [ {
"application" : [ "read", "write" ]
} ],
"paths" : {
"/authorize" : {
"get" : {
"summary" : "Gets auth info",
"description" : "This is an example opeartion to show how security is applied to the call.",
"operationId" : "getAuthInfo",
"parameters" : [ {
"name" : "Access-Control-Allow-Headers",
"in" : "header",
"description" : "Comma De-limited List of allowed headers",
"required" : true,
"type" : "string"
}, {
"name" : "Access-Control-Allow-Origin",
"in" : "header",
"description" : "Header to enable CORS requests",
"required" : true,
"type" : "string"
}, {
"name" : "response_type",
"in" : "query",
"description" : "Defaults to code",
"required" : true,
"type" : "string"
}, {
"name" : "client_id",
"in" : "query",
"description" : "The unique identifier provided to your application, found in your",
"required" : true,
"type" : "string"
} ],
"responses" : {
"302" : {
"description" : "Found",
"schema" : {
"$ref" : "#/definitions/authorizedResponse"
}
}
},
"security" : [ {
"api-key" : [ ]
} ]
}
},
"/token" : {
"post" : {
"summary" : "Onboards users onto Stripe with an auth token!",
"operationId" : "getStripeToken",
"parameters" : [ {
"name" : "grant_type",
"in" : "query",
"description" : "authorization_code when turning an authorization code into an access token, or refresh_token when using a refresh token to get a new access token.",
"required" : true,
"type" : "string"
}, {
"name" : "refresh_token",
"in" : "query",
"description" : "The value of the code or refresh_token, depending on the grant_type.",
"required" : false,
"type" : "string"
}, {
"name" : "code",
"in" : "query",
"description" : "The value of the code or refresh_token, depending on the grant_type.",
"required" : false,
"type" : "string"
}, {
"name" : "scope",
"in" : "query",
"description" : "When requesting a new access token from a refresh token, any scope that has an equal or lesser scope as the refresh token. Has no effect when requesting an access token from an authorization code. Defaults to the scope of the refresh token.",
"required" : false,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/successTokenResponse"
}
},
"400" : {
"description" : "Someone done goofed",
"schema" : {
"$ref" : "#/definitions/errorResponse"
},
"headers" : {
"Access-Control-Allow-Origin" : {
"type" : "string"
},
"Access-Control-Allow-Headers" : {
"type" : "string"
}
}
}
},
"security" : [ {
"api-key" : [ ]
} ]
}
},
"/deauthorize" : {
"post" : {
"summary" : "User Deauthorization",
"description" : "This operation deauthorizes the most current user auth token",
"operationId" : "deauthorizeUser",
"parameters" : [ {
"name" : "client_id",
"in" : "query",
"description" : "The unique identifier provided to your application, found in your",
"required" : true,
"type" : "string"
}, {
"name" : "stripe_id",
"in" : "query",
"description" : "The account you'd like to disconnect from.",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/account"
}
},
"400" : {
"description" : "Something is wrong",
"schema" : {
"$ref" : "#/definitions/errorResponse"
}
}
},
"security" : [ {
"api-key" : [ ]
} ]
}
}
},
"securityDefinitions" : {
"api-key" : {
"type" : "apiKey",
"name" : "client_secret",
"in" : "header"
},
"application" : {
"type" : "oauth2",
"tokenUrl" : "https://connect.stripe.com/oauth/token",
"flow" : "application",
"scopes" : {
"write" : "allows modifying resources",
"read" : "allows reading resources"
}
}
},
"definitions" : {
"successTokenResponse" : {
"required" : [ "access_token" ],
"properties" : {
"access_token" : {
"type" : "string"
},
"scope" : {
"type" : "string"
},
"livemode" : {
"type" : "boolean"
},
"token_type" : {
"type" : "string"
},
"refresh_token" : {
"type" : "string"
},
"stripe_user_id" : {
"type" : "string"
},
"stripe_publishable_key" : {
"type" : "string"
}
},
"title" : "success_token"
},
"errorResponse" : {
"properties" : {
"error" : {
"type" : "string"
},
"errorDescription" : {
"type" : "string"
}
},
"title" : "error_response"
},
"account" : {
"type" : "string",
"title" : "client_id"
},
"authorizedResponse" : {
"properties" : {
"redirect_uri" : {
"type" : "string"
},
"scope" : {
"type" : "string"
},
"state" : {
"type" : "string"
},
"code" : {
"type" : "string"
}
},
"title" : "auth_response"
}
},
"parameters" : {
"client_id" : {
"name" : "client_id",
"in" : "query",
"description" : "The unique identifier provided to your application, found in your",
"required" : true,
"type" : "string"
},
"Access-Control-Allow-Origin" : {
"name" : "Access-Control-Allow-Origin",
"in" : "header",
"description" : "Header to enable CORS requests",
"required" : true,
"type" : "string"
},
"Access-Control-Allow-Headers" : {
"name" : "Access-Control-Allow-Headers",
"in" : "header",
"description" : "Comma De-limited List of allowed headers",
"required" : true,
"type" : "string"
}
},
"x-azure-api-id" : "sh-1486435933269"
}