Files
medusa-store/www/apps/api-reference/specs/admin/components/schemas/Payment.yaml
Shahed Nasser fa7c94b4cc docs: create docs workspace (#5174)
* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
2023-09-21 20:57:15 +03:00

134 lines
4.0 KiB
YAML

title: Payment
description: >-
A payment is originally created from a payment session. Once a payment session
is authorized, the payment is created to represent the authorized amount with
a given payment method. Payments can be captured, canceled or refunded.
Payments can be made towards orders, swaps, order edits, or other resources.
type: object
required:
- amount
- amount_refunded
- canceled_at
- captured_at
- cart_id
- created_at
- currency_code
- data
- id
- idempotency_key
- metadata
- order_id
- provider_id
- swap_id
- updated_at
properties:
id:
description: The payment's ID
type: string
example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE
swap_id:
description: The ID of the swap that this payment was potentially created for.
nullable: true
type: string
example: null
swap:
description: The details of the swap that this payment was potentially created for.
x-expandable: swap
nullable: true
type: object
cart_id:
description: The ID of the cart that the payment session was potentially created for.
nullable: true
type: string
cart:
description: >-
The details of the cart that the payment session was potentially created
for.
x-expandable: cart
nullable: true
type: object
order_id:
description: The ID of the order that the payment session was potentially created for.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: >-
The details of the order that the payment session was potentially created
for.
x-expandable: order
nullable: true
type: object
amount:
description: The amount that the Payment has been authorized for.
type: integer
example: 100
currency_code:
description: The 3 character ISO currency code of the payment.
type: string
example: usd
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
currency:
description: The details of the currency of the payment.
x-expandable: currency
nullable: true
$ref: ./Currency.yaml
amount_refunded:
description: >-
The amount of the original Payment amount that has been refunded back to
the Customer.
type: integer
default: 0
example: 0
provider_id:
description: The id of the Payment Provider that is responsible for the Payment
type: string
example: manual
data:
description: >-
The data required for the Payment Provider to identify, modify and process
the Payment. Typically this will be an object that holds an id to the
external payment session, but can be an empty object if the Payment
Provider doesn't hold any state.
type: object
example: {}
captured_at:
description: The date with timezone at which the Payment was captured.
nullable: true
type: string
format: date-time
canceled_at:
description: The date with timezone at which the Payment was canceled.
nullable: true
type: string
format: date-time
idempotency_key:
description: >-
Randomly generated key used to continue the completion of a payment in
case of failure.
nullable: true
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute