1 /**
2 * @oas [get] /admin/payments/{id}
3 * operationId: GetPaymentsId
4 * summary: Get a Payment
5 * description: Retrieve a payment by its ID. You can expand the payment's relations or select the fields that should be returned.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: path
10 * description: The payment's ID.
11 * required: true
12 * schema:
13 * type: string
14 * - name: fields
15 * in: query
16 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
17 * fields. without prefix it will replace the entire default fields.
18 * required: false
19 * schema:
20 * type: string
21 * title: fields
22 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
23 * fields. without prefix it will replace the entire default fields.
24 * externalDocs:
25 * url: "#select-fields-and-relations"
26 * security:
27 * - api_token: []
28 * - cookie_auth: []
29 * - jwt_token: []
30 * x-codeSamples:
31 * - lang: JavaScript
32 * label: JS SDK
33 * source: |-
34 * import Medusa from "@medusajs/js-sdk"
35 *
36 * export const sdk = new Medusa({
37 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
38 * debug: import.meta.env.DEV,
39 * auth: {
40 * type: "session",
41 * },
42 * })
43 *
44 * sdk.admin.payment.retrieve("pay_123")
45 * .then(({ payment }) => {
46 * console.log(payment)
47 * })
48 * - lang: Shell
49 * label: cURL
50 * source: |-
51 * curl '{backend_url}/admin/payments/{id}' \
52 * -H 'Authorization: Bearer {jwt_token}'
53 * tags:
54 * - Payments
55 * responses:
56 * "200":
57 * description: OK
58 * content:
59 * application/json:
60 * schema:
61 * $ref: "#/components/schemas/AdminPaymentResponse"
62 * "400":
63 * $ref: "#/components/responses/400_error"
64 * "401":
65 * $ref: "#/components/responses/unauthorized"
66 * "404":
67 * $ref: "#/components/responses/not_found_error"
68 * "409":
69 * $ref: "#/components/responses/invalid_state_error"
70 * "422":
71 * $ref: "#/components/responses/invalid_request_error"
72 * "500":
73 * $ref: "#/components/responses/500_error"
74 *
75 */
76