|
1
|
post: |
|
2
|
operationId: PostPaymentCollectionsIdPaymentSessions |
|
3
|
summary: Initialize Payment Session in Payment Collection |
|
4
|
x-sidebar-summary: Initialize Payment Session |
|
5
|
description: >- |
|
6
|
Initialize a Payment Session in a payment collection. This is useful for |
|
7
|
orders placed outside the checkout flow, such as draft orders, or when a |
|
8
|
payment session needs to be re-initialized for an existing payment |
|
9
|
collection. |
|
10
|
x-authenticated: true |
|
11
|
parameters: |
|
12
|
- name: id |
|
13
|
in: path |
|
14
|
description: The ID of the payment collection. |
|
15
|
required: true |
|
16
|
schema: |
|
17
|
type: string |
|
18
|
- name: fields |
|
19
|
in: query |
|
20
|
description: >- |
|
21
|
Comma-separated fields that should be included in the returned data. If |
|
22
|
a field is prefixed with `+` it will be added to the default fields, |
|
23
|
using `-` will remove it from the default fields. Without prefix it will |
|
24
|
replace the entire default fields. |
|
25
|
required: false |
|
26
|
schema: |
|
27
|
type: string |
|
28
|
title: fields |
|
29
|
description: >- |
|
30
|
Comma-separated fields that should be included in the returned data. |
|
31
|
If a field is prefixed with `+` it will be added to the default |
|
32
|
fields, using `-` will remove it from the default fields. Without |
|
33
|
prefix it will replace the entire default fields. |
|
34
|
externalDocs: |
|
35
|
url: '#select-fields-and-relations' |
|
36
|
security: |
|
37
|
- api_token: [] |
|
38
|
- cookie_auth: [] |
|
39
|
- jwt_token: [] |
|
40
|
requestBody: |
|
41
|
content: |
|
42
|
application/json: |
|
43
|
schema: |
|
44
|
$ref: ../components/schemas/AdminInitializePaymentSession.yaml |
|
45
|
x-codeSamples: |
|
46
|
- lang: JavaScript |
|
47
|
label: JS SDK |
|
48
|
source: |
|
49
|
$ref: >- |
|
50
|
../code_samples/JavaScript/admin_payment-collections_{id}_payment-sessions/post.js |
|
51
|
- lang: Shell |
|
52
|
label: cURL |
|
53
|
source: |
|
54
|
$ref: >- |
|
55
|
../code_samples/Shell/admin_payment-collections_{id}_payment-sessions/post.sh |
|
56
|
tags: |
|
57
|
- Payment Collections |
|
58
|
responses: |
|
59
|
'200': |
|
60
|
description: OK |
|
61
|
content: |
|
62
|
application/json: |
|
63
|
schema: |
|
64
|
$ref: ../components/schemas/AdminPaymentCollectionResponse.yaml |
|
65
|
'400': |
|
66
|
$ref: ../components/responses/400_error.yaml |
|
67
|
'401': |
|
68
|
$ref: ../components/responses/unauthorized.yaml |
|
69
|
'404': |
|
70
|
$ref: ../components/responses/not_found_error.yaml |
|
71
|
'409': |
|
72
|
$ref: ../components/responses/invalid_state_error.yaml |
|
73
|
'422': |
|
74
|
$ref: ../components/responses/invalid_request_error.yaml |
|
75
|
'500': |
|
76
|
$ref: ../components/responses/500_error.yaml |
|
77
|
x-workflow: createPaymentSessionsWorkflow |
|
78
|
x-events: [] |
|
79
|
x-since: 2.14.2 |