|
1
|
get: |
|
2
|
operationId: GetPaymentProviders |
|
3
|
summary: List Payment Providers |
|
4
|
description: >- |
|
5
|
Retrieve a list of payment providers. You must provide the `region_id` query |
|
6
|
parameter to retrieve the payment providers enabled in that region. |
|
7
|
x-authenticated: false |
|
8
|
externalDocs: |
|
9
|
url: >- |
|
10
|
https://docs.medusajs.com/resources/storefront-development/checkout/payment |
|
11
|
description: 'Storefront guide: How to implement payment during checkout.' |
|
12
|
parameters: |
|
13
|
- name: x-publishable-api-key |
|
14
|
in: header |
|
15
|
description: Publishable API Key created in the Medusa Admin. |
|
16
|
required: true |
|
17
|
schema: |
|
18
|
type: string |
|
19
|
externalDocs: |
|
20
|
url: https://docs.medusajs.com/api/store#publishable-api-key |
|
21
|
- name: x-medusa-locale |
|
22
|
in: header |
|
23
|
description: The locale in BCP 47 format to retrieve localized content. |
|
24
|
required: false |
|
25
|
schema: |
|
26
|
type: string |
|
27
|
example: en-US |
|
28
|
externalDocs: |
|
29
|
url: >- |
|
30
|
https://docs.medusajs.com/resources/commerce-modules/translation/storefront |
|
31
|
description: Learn more in the Serve Translations in Storefront guide. |
|
32
|
- name: fields |
|
33
|
in: query |
|
34
|
description: >- |
|
35
|
Comma-separated fields that should be included in the returned data. if |
|
36
|
a field is prefixed with `+` it will be added to the default fields, |
|
37
|
using `-` will remove it from the default fields. without prefix it will |
|
38
|
replace the entire default fields. |
|
39
|
required: false |
|
40
|
schema: |
|
41
|
type: string |
|
42
|
title: fields |
|
43
|
description: >- |
|
44
|
Comma-separated fields that should be included in the returned data. |
|
45
|
if a field is prefixed with `+` it will be added to the default |
|
46
|
fields, using `-` will remove it from the default fields. without |
|
47
|
prefix it will replace the entire default fields. |
|
48
|
externalDocs: |
|
49
|
url: '#select-fields-and-relations' |
|
50
|
- name: offset |
|
51
|
in: query |
|
52
|
description: The number of items to skip when retrieving a list. |
|
53
|
required: false |
|
54
|
schema: |
|
55
|
type: number |
|
56
|
title: offset |
|
57
|
description: The number of items to skip when retrieving a list. |
|
58
|
externalDocs: |
|
59
|
url: '#pagination' |
|
60
|
- name: limit |
|
61
|
in: query |
|
62
|
description: Limit the number of items returned in the list. |
|
63
|
required: false |
|
64
|
schema: |
|
65
|
type: number |
|
66
|
title: limit |
|
67
|
description: Limit the number of items returned in the list. |
|
68
|
externalDocs: |
|
69
|
url: '#pagination' |
|
70
|
- name: order |
|
71
|
in: query |
|
72
|
description: >- |
|
73
|
The field to sort the data by. By default, the sort order is ascending. |
|
74
|
To change the order to descending, prefix the field name with `-`. |
|
75
|
required: false |
|
76
|
schema: |
|
77
|
type: string |
|
78
|
title: order |
|
79
|
description: >- |
|
80
|
The field to sort the data by. By default, the sort order is |
|
81
|
ascending. To change the order to descending, prefix the field name |
|
82
|
with `-`. |
|
83
|
- name: region_id |
|
84
|
in: query |
|
85
|
description: >- |
|
86
|
Filter by a region ID to get the payment providers enabled in that |
|
87
|
region. |
|
88
|
required: true |
|
89
|
schema: |
|
90
|
type: string |
|
91
|
title: region_id |
|
92
|
description: Filter by a region ID. |
|
93
|
- name: with_deleted |
|
94
|
in: query |
|
95
|
description: Whether to include deleted records in the result. |
|
96
|
required: false |
|
97
|
schema: |
|
98
|
type: boolean |
|
99
|
title: with_deleted |
|
100
|
description: Whether to include deleted records in the result. |
|
101
|
- name: locale |
|
102
|
in: query |
|
103
|
description: The locale in BCP 47 format to retrieve localized content. |
|
104
|
required: false |
|
105
|
schema: |
|
106
|
type: string |
|
107
|
example: en-US |
|
108
|
externalDocs: |
|
109
|
url: >- |
|
110
|
https://docs.medusajs.com/resources/commerce-modules/translation/storefront |
|
111
|
description: Learn more in the Serve Translations in Storefront guide. |
|
112
|
x-codeSamples: |
|
113
|
- lang: JavaScript |
|
114
|
label: JS SDK |
|
115
|
source: |
|
116
|
$ref: ../code_samples/JavaScript/store_payment-providers/get.js |
|
117
|
- lang: Shell |
|
118
|
label: cURL |
|
119
|
source: |
|
120
|
$ref: ../code_samples/Shell/store_payment-providers/get.sh |
|
121
|
tags: |
|
122
|
- Payment Providers |
|
123
|
responses: |
|
124
|
'200': |
|
125
|
description: OK |
|
126
|
content: |
|
127
|
application/json: |
|
128
|
schema: |
|
129
|
allOf: |
|
130
|
- type: object |
|
131
|
description: The list of payment providers. |
|
132
|
required: |
|
133
|
- limit |
|
134
|
- offset |
|
135
|
- count |
|
136
|
properties: |
|
137
|
limit: |
|
138
|
type: number |
|
139
|
title: limit |
|
140
|
description: The maximum number of items returned. |
|
141
|
offset: |
|
142
|
type: number |
|
143
|
title: offset |
|
144
|
description: >- |
|
145
|
The number of items skipped before retrieving the returned |
|
146
|
items. |
|
147
|
count: |
|
148
|
type: number |
|
149
|
title: count |
|
150
|
description: The total number of items. |
|
151
|
- type: object |
|
152
|
description: The list of payment providers. |
|
153
|
required: |
|
154
|
- payment_providers |
|
155
|
properties: |
|
156
|
payment_providers: |
|
157
|
type: array |
|
158
|
description: The list of payment providers. |
|
159
|
items: |
|
160
|
$ref: ../components/schemas/StorePaymentProvider.yaml |
|
161
|
'400': |
|
162
|
$ref: ../components/responses/400_error.yaml |
|
163
|
'401': |
|
164
|
$ref: ../components/responses/unauthorized.yaml |
|
165
|
'404': |
|
166
|
$ref: ../components/responses/not_found_error.yaml |
|
167
|
'409': |
|
168
|
$ref: ../components/responses/invalid_state_error.yaml |
|
169
|
'422': |
|
170
|
$ref: ../components/responses/invalid_request_error.yaml |
|
171
|
'500': |
|
172
|
$ref: ../components/responses/500_error.yaml |
|
173
|
x-allowed: |
|
174
|
- id |
|
175
|
- is_enabled |