Skip to content

Commit 3999f16

Browse files
committed
Updated API from documentation release
1 parent 2d20ab0 commit 3999f16

File tree

144 files changed

+2528
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+2528
-27
lines changed

api-specs/checkout/api.raml

Lines changed: 346 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,31 @@ traits:
7676
],
7777
},
7878
]
79+
secured_by_view_payment_integrations:
80+
securedBy:
81+
[
82+
oauth_2_0:
83+
{ scopes: ['view_checkout_payment_integrations:{projectKey}'] },
84+
]
85+
secured_by_manage_payment_integrations:
86+
securedBy:
87+
[
88+
oauth_2_0:
89+
{ scopes: ['manage_checkout_payment_integrations:{projectKey}'] },
90+
]
91+
secured_by_view_applications:
92+
securedBy:
93+
[oauth_2_0: { scopes: ['view_checkout_applications:{projectKey}'] }]
94+
secured_by_manage_applications:
95+
securedBy:
96+
[oauth_2_0: { scopes: ['manage_checkout_applications:{projectKey}'] }]
7997

8098
/{projectKey}:
8199
(annotations.methodName): withProjectKey
82100
uriParameters:
83101
projectKey:
84102
type: string
85-
description: Identifier of your Checkout entity and `key` of your [Project](/../api/projects/project#project).
103+
description: Identifier of your Checkout entity and `key` of your [Project](ctp:api:type:Project).
86104
displayName: Project
87105
/payment-intents:
88106
displayName: Payment Intents
@@ -92,7 +110,7 @@ traits:
92110
paymentId:
93111
type: string
94112
description: |
95-
`id` of the [Payment](/../api/projects/payments).
113+
`id` of the [Payment](ctp:api:type:Payment).
96114
post:
97115
displayName: Manage Payment by ID
98116
is:
@@ -144,7 +162,7 @@ traits:
144162
id:
145163
type: string
146164
description: |
147-
`id` of the [Transaction](/transactions-api#transaction).
165+
`id` of the [Transaction](ctp:checkout:type:Transaction).
148166
get:
149167
displayName: Get Transaction by ID
150168
is:
@@ -168,9 +186,9 @@ traits:
168186
key:
169187
type: string
170188
description: |
171-
`key` of the [Transaction](/transactions-api#transaction).
189+
`key` of the [Transaction](ctp:checkout:type:Transaction).
172190
get:
173-
displayName: Get Transaction by key
191+
displayName: Get Transaction by Key
174192
is:
175193
- secured_by_view_transactions
176194
description: |
@@ -186,3 +204,326 @@ traits:
186204
description: The request was invalid.
187205
body:
188206
type: ErrorResponse
207+
/payment-integrations:
208+
get:
209+
displayName: Query Payment Integrations
210+
is:
211+
- secured_by_view_payment_integrations
212+
description: |
213+
Retrieves Payment Integrations in a [Project](ctp:api:type:Project).
214+
215+
The results are [paginated](/../api/general-concepts#pagination).
216+
queryParameters:
217+
sort?:
218+
type: string[]
219+
description: |
220+
Controls [Sorting](/general-concepts#sorting) of query results.
221+
example: ['createdAt asc', 'name desc']
222+
limit?:
223+
type: integer
224+
format: int32
225+
description: |
226+
Number of results requested.
227+
default: 20
228+
minimum: 0
229+
maximum: 500
230+
offset?:
231+
type: integer
232+
format: int32
233+
description: |
234+
Number of elements skipped.
235+
default: 0
236+
maximum: 10000
237+
withTotal?:
238+
type: boolean
239+
default: true
240+
description: |
241+
Controls the calculation of the total number of query results.
242+
responses:
243+
200:
244+
body:
245+
type: PaginatedPaymentIntegration
246+
example: !include ../checkout/examples/payment-integrations/paginatedPaymentIntegrations.json
247+
post:
248+
displayName: Create Payment Integration
249+
is:
250+
- secured_by_manage_payment_integrations
251+
description: |
252+
Creates a new PaymentIntegration.
253+
body:
254+
type: PaymentIntegrationDraft
255+
example: !include ../checkout/examples/payment-integrations/paymentIntegrationDraft.json
256+
responses:
257+
201:
258+
body:
259+
type: PaymentIntegration
260+
example: !include ../checkout/examples/payment-integrations/paymentIntegration.json
261+
262+
400:
263+
description: The request was invalid.
264+
body:
265+
type: ErrorResponse
266+
/{id}:
267+
(annotations.methodName): withId
268+
uriParameters:
269+
id:
270+
type: string
271+
description: |
272+
`id` of the [PaymentIntegration](ctp:checkout:type:PaymentIntegration).
273+
get:
274+
displayName: Get Payment Integration by ID
275+
is:
276+
- secured_by_view_payment_integrations
277+
description: |
278+
Retrieves Payment Integrations in a [Project](ctp:api:type:Project) with a given `id`.
279+
responses:
280+
200:
281+
body:
282+
type: PaymentIntegration
283+
example: !include ../checkout/examples/payment-integrations/paymentIntegration.json
284+
285+
head:
286+
displayName: Check Payment Integration by ID
287+
is:
288+
- secured_by_view_payment_integrations
289+
description: |
290+
Checks if a PaymentIntegration with a given `id` exists. Returns `200 OK` if the PaymentIntegration exists, or `404 Not Found` if it doesn't. Specific Error Codes:
291+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
292+
- [GeneralError](ctp:checkout:type:GeneralError)
293+
responses:
294+
200:
295+
description: PaymentIntegration exists
296+
post:
297+
displayName: Update Payment Integration by ID
298+
is:
299+
- secured_by_manage_payment_integrations
300+
body:
301+
type: PaymentIntegrationUpdateActions
302+
example: !include examples/payment-integrations/paymentIntegrationUpdateActions.json
303+
responses:
304+
200:
305+
body:
306+
type: PaymentIntegration
307+
delete:
308+
displayName: Delete Payment Integration by ID
309+
is:
310+
- secured_by_manage_payment_integrations
311+
body:
312+
type: PaymentIntegration
313+
responses:
314+
200:
315+
body:
316+
type: PaymentIntegration
317+
/key={key}:
318+
(annotations.methodName): withKey
319+
uriParameters:
320+
key:
321+
type: string
322+
description: |
323+
`key` of the [PaymentIntegration](ctp:checkout:type:PaymentIntegration).
324+
get:
325+
displayName: Get Payment Integration by Key
326+
is:
327+
- secured_by_view_payment_integrations
328+
description: |
329+
Retrieves Payment Integrations in a [Project](ctp:api:type:Project) with a given `key`. Specific Error Codes:
330+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
331+
- [GeneralError](ctp:checkout:type:GeneralError)
332+
responses:
333+
200:
334+
body:
335+
type: PaymentIntegration
336+
example: !include ../checkout/examples/payment-integrations/paymentIntegration.json
337+
338+
post:
339+
displayName: Update Payment Integration by Key
340+
is:
341+
- secured_by_manage_payment_integrations
342+
body:
343+
type: PaymentIntegrationUpdateActions
344+
responses:
345+
200:
346+
body:
347+
type: PaymentIntegration
348+
head:
349+
displayName: Check Payment Integration by Key
350+
is:
351+
- secured_by_view_payment_integrations
352+
description: |
353+
Checks if a PaymentIntegration with a given `key` exists. Returns `200 OK` if the PaymentIntegration exists, or `404 Not Found` if it doesn't. Specific Error Codes:
354+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
355+
- [GeneralError](ctp:checkout:type:GeneralError)
356+
responses:
357+
200:
358+
description: PaymentIntegration exists
359+
delete:
360+
displayName: Delete Payment Integration by Key
361+
is:
362+
- secured_by_manage_payment_integrations
363+
body:
364+
type: PaymentIntegration
365+
responses:
366+
200:
367+
body:
368+
type: PaymentIntegration
369+
/applications:
370+
get:
371+
displayName: Query Applications
372+
is:
373+
- secured_by_view_applications
374+
description: |
375+
Retrieves Applications
376+
queryParameters:
377+
sort?:
378+
type: string[]
379+
description: |
380+
Controls [Sorting](/general-concepts#sorting) of query results.
381+
example: ['createdAt asc', 'name desc']
382+
limit?:
383+
type: integer
384+
format: int32
385+
description: |
386+
Number of results requested.
387+
default: 20
388+
minimum: 0
389+
maximum: 500
390+
offset?:
391+
type: integer
392+
format: int32
393+
description: |
394+
Number of elements skipped.
395+
default: 0
396+
maximum: 10000
397+
withTotal?:
398+
type: boolean
399+
default: true
400+
description: |
401+
Controls the calculation of the total number of query results.
402+
responses:
403+
200:
404+
body:
405+
type: PaginatedApplication
406+
example: !include examples/applications/paginatedApplications.json
407+
post:
408+
displayName: Create Application
409+
is:
410+
- secured_by_manage_applications
411+
description: |
412+
Creates a new [Application](ctp:checkout:type:Application).
413+
body:
414+
type: ApplicationDraft
415+
example: !include examples/applications/CompleteFlowApplicationDraft.json
416+
417+
responses:
418+
201:
419+
body:
420+
type: Application
421+
example: !include examples/applications/CompleteFlowApplication.json
422+
423+
400:
424+
description: The request was invalid.
425+
body:
426+
type: ErrorResponse
427+
/{id}:
428+
(annotations.methodName): withId
429+
uriParameters:
430+
id:
431+
type: string
432+
description: |
433+
`id` of the [Application](ctp:checkout:type:Application).
434+
get:
435+
displayName: Get Application by ID
436+
is:
437+
- secured_by_view_applications
438+
description: |
439+
Retrieves an [Application](ctp:checkout:type:Application) by a given `id`.
440+
responses:
441+
200:
442+
body:
443+
type: Application
444+
example: !include examples/applications/CompleteFlowApplication.json
445+
head:
446+
displayName: Check Application by ID
447+
is:
448+
- secured_by_view_applications
449+
description: |
450+
Checks if an [Application](/applications-api#application) with a given `id` exists. Returns `200 OK` if the Application exists, or `404 Not Found` if it doesn't. Specific Error Codes:
451+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
452+
- [GeneralError](ctp:checkout:type:GeneralError)
453+
responses:
454+
200:
455+
description: Application exists
456+
post:
457+
displayName: Update Application by ID
458+
is:
459+
- secured_by_manage_applications
460+
body:
461+
type: ApplicationUpdateActions
462+
example: !include examples/applications/ApplicationUpdateActions.json
463+
responses:
464+
200:
465+
body:
466+
type: Application
467+
delete:
468+
displayName: Delete Application by ID
469+
is:
470+
- secured_by_manage_applications
471+
body:
472+
type: Application
473+
responses:
474+
200:
475+
body:
476+
type: Application
477+
/key={key}:
478+
(annotations.methodName): withKey
479+
uriParameters:
480+
key:
481+
type: string
482+
description: |
483+
`key` of the [Application](ctp:checkout:type:Application).
484+
get:
485+
displayName: Get Application by Key
486+
is:
487+
- secured_by_view_applications
488+
description: |
489+
Retrieves an [Application](ctp:checkout:type:Application) with a given `key`.
490+
Specific Error Codes:
491+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
492+
- [GeneralError](ctp:checkout:type:GeneralError)
493+
responses:
494+
200:
495+
body:
496+
type: Application
497+
example: !include ../checkout/examples/applications/PaymentOnlyApplication.json
498+
499+
post:
500+
displayName: Update Application by Key
501+
is:
502+
- secured_by_manage_applications
503+
body:
504+
type: ApplicationUpdateActions
505+
responses:
506+
200:
507+
body:
508+
type: Application
509+
head:
510+
displayName: Check Application by Key
511+
is:
512+
- secured_by_view_applications
513+
description: |
514+
Checks if an [Application](ctp:checkout:type:Application) with a given `key` exists. Returns `200 OK` if the Application exists, or `404 Not Found` if it doesn't. Specific Error Codes:
515+
- [ResourceNotFound](ctp:checkout:type:ResourceNotFoundError)
516+
- [GeneralError](ctp:checkout:type:GeneralError)
517+
responses:
518+
200:
519+
description: Application exists
520+
delete:
521+
displayName: Delete Application by Key
522+
is:
523+
- secured_by_manage_applications
524+
body:
525+
type: Application
526+
responses:
527+
200:
528+
body:
529+
type: Application
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"action": "addAllowedOrigin",
3+
"origin": "https://new-domain.example.com"
4+
}

0 commit comments

Comments
 (0)