# validateCartPaymentsStep - Medusa Core Workflows Reference

This documentation provides a reference to the `validateCartPaymentsStep`. It belongs to the `@medusajs/medusa/core-flows` package.

This step validates a cart's payment sessions. Their status must
be `pending`, `requires_more`, `authorized`, or `captured`. If not valid, the step throws an error.

:::tip

You can use the [retrieveCartStep](https://docs.medusajs.com/references/medusa-workflows/steps/retrieveCartStep) to retrieve a cart's details.

:::

## Example

```ts
const data = validateCartPaymentsStep({
  // retrieve the details of the cart from another workflow
  // or in another step using the Cart Module's service
  cart
})
```

## Input

- ValidateCartPaymentsStepInput: (\[ValidateCartPaymentsStepInput]\(../../../../interfaces/core\_flows.ValidateCartPaymentsStepInput/page.mdx)) The cart's details.

  - cart: (\[CartWorkflowDTO]\(../../../../../types/interfaces/types.CartWorkflowDTO/page.mdx)) The cart to validate payment sessions for.

    - id: (\`string\`) The ID of the cart.

    - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The payment collection details.

      - id: (\`string\`) The ID of the payment collection.

      - currency\_code: (\`string\`) The ISO 3 character currency code of the payment sessions and payments associated with payment collection.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The total amount to be authorized and captured.

      - status: (\[PaymentCollectionStatus]\(../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)) The status of the payment collection.

      - payment\_providers: (\[PaymentProviderDTO]\(../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)\[]) The payment provider used to process the associated payment sessions and payments.

      - authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount authorized within the associated payment sessions.

      - refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount refunded within the associated payments.

      - captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount captured within the associated payments.

      - completed\_at: (\`string\` \\| \`Date\`) When the payment collection was completed.

      - created\_at: (\`string\` \\| \`Date\`) When the payment collection was created.

      - updated\_at: (\`string\` \\| \`Date\`) When the payment collection was updated.

      - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

      - payment\_sessions: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)\[]) The associated payment sessions.

      - payments: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)\[]) The associated payments.

    - customer: (\[CustomerDTO]\(../../../../../customer/interfaces/customer.CustomerDTO/page.mdx)) The cart's customer.

      - id: (\`string\`) The ID of the customer.

      - email: (\`string\`) The email of the customer.

      - has\_account: (\`boolean\`) A flag indicating if customer has an account or not.

      - default\_billing\_address\_id: (\`null\` \\| \`string\`) The associated default billing address's ID.

      - default\_shipping\_address\_id: (\`null\` \\| \`string\`) The associated default shipping address's ID.

      - company\_name: (\`null\` \\| \`string\`) The company name of the customer.

      - first\_name: (\`null\` \\| \`string\`) The first name of the customer.

      - last\_name: (\`null\` \\| \`string\`) The last name of the customer.

      - addresses: (\[CustomerAddressDTO]\(../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)\[]) The addresses of the customer.

      - phone: (\`null\` \\| \`string\`) The phone of the customer.

      - groups: (\`object\`\[]) The groups of the customer.

      - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

      - created\_by: (\`null\` \\| \`string\`) Who created the customer.

      - deleted\_at: (\`null\` \\| \`string\` \\| \`Date\`) The deletion date of the customer.

      - created\_at: (\`string\` \\| \`Date\`) The creation date of the customer.

      - updated\_at: (\`string\` \\| \`Date\`) The update date of the customer.

    - product: (\[ProductDTO]\(../../../../../product/interfaces/product.ProductDTO/page.mdx)) The cart's product to be added.

      - id: (\`string\`) The ID of the product.

      - title: (\`string\`) The title of the product.

      - handle: (\`string\`) The handle of the product. The handle can be used to create slug URL paths.

      - subtitle: (\`null\` \\| \`string\`) The subttle of the product.

      - description: (\`null\` \\| \`string\`) The description of the product.

      - is\_giftcard: (\`boolean\`) Whether the product is a gift card.

      - status: (\[ProductStatus]\(../../../../../product/types/product.ProductStatus/page.mdx)) The status of the product.

      - thumbnail: (\`null\` \\| \`string\`) The URL of the product's thumbnail.

      - width: (\`null\` \\| \`number\`) The width of the product.

      - weight: (\`null\` \\| \`number\`) The weight of the product.

      - length: (\`null\` \\| \`number\`) The length of the product.

      - height: (\`null\` \\| \`number\`) The height of the product.

      - origin\_country: (\`null\` \\| \`string\`) The origin country of the product.

      - hs\_code: (\`null\` \\| \`string\`) The HS Code of the product.

      - mid\_code: (\`null\` \\| \`string\`) The MID Code of the product.

      - material: (\`null\` \\| \`string\`) The material of the product.

      - collection: (\`null\` \\| \[ProductCollectionDTO]\(../../../../../product/interfaces/product.ProductCollectionDTO/page.mdx)) The associated product collection.

      - collection\_id: (\`null\` \\| \`string\`) The associated product collection id.

      - type: (\`null\` \\| \[ProductTypeDTO]\(../../../../../product/interfaces/product.ProductTypeDTO/page.mdx)) The associated product type.

      - type\_id: (\`null\` \\| \`string\`) The associated product type id.

      - tags: (\[ProductTagDTO]\(../../../../../product/interfaces/product.ProductTagDTO/page.mdx)\[]) The associated product tags.

      - variants: (\[ProductVariantDTO]\(../../../../../product/interfaces/product.ProductVariantDTO/page.mdx)\[]) The associated product variants.

      - options: (\[ProductOptionDTO]\(../../../../../product/interfaces/product.ProductOptionDTO/page.mdx)\[]) The associated product options.

      - images: (\[ProductImageDTO]\(../../../../../product/interfaces/product.ProductImageDTO/page.mdx)\[]) The associated product images.

      - external\_id: (\`null\` \\| \`string\`) The ID of the product in an external system. This is useful if you're integrating the product with a third-party service and want to maintain
        a reference to the ID in the integrated service.

      - created\_at: (\`string\` \\| \`Date\`) When the product was created.

      - updated\_at: (\`string\` \\| \`Date\`) When the product was updated.

      - deleted\_at: (\`string\` \\| \`Date\`) When the product was deleted.

      - categories: (\`null\` \\| \[ProductCategoryDTO]\(../../../../../product/interfaces/product.ProductCategoryDTO/page.mdx)\[]) The associated product categories.

      - discountable: (\`boolean\`) Whether the product can be discounted.

      - metadata: (\[MetadataType]\(../../../../../product/types/product.MetadataType/page.mdx)) Holds custom data in key-value pairs.

    - region: (\[RegionDTO]\(../../../../../region/interfaces/region.RegionDTO/page.mdx)) The cart's region.

      - id: (\`string\`) The ID of the region.

      - name: (\`string\`) The name of the region.

      - currency\_code: (\`string\`) The currency code of the region.

      - automatic\_taxes: (\`boolean\`) Setting to indicate whether taxes need to be applied automatically

      - countries: (\[RegionCountryDTO]\(../../../../../region/interfaces/region.RegionCountryDTO/page.mdx)\[]) The countries of the region.

      - payment\_providers: (\[PaymentProviderDTO]\(../../../../../region/interfaces/region.PaymentProviderDTO/page.mdx)\[]) Payment providers available in the region

      - created\_at: (\`string\`) The date the region was created.

      - updated\_at: (\`string\`) The date the region was updated.

      - metadata: (\`Record\<string, any>\`) Holds custom data in key-value pairs.

## Output

- PaymentSessionDTO\[]: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)\[])

  - id: (\`string\`) The ID of the payment session.

  - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount to authorize.

    - numeric: (\`number\`)

    - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - value: (\`string\` \\| \`number\`)

    - bigNumber: (\`BigNumber\`)

  - currency\_code: (\`string\`) The 3 character currency code of the payment session.

  - provider\_id: (\`string\`) The ID of the associated payment provider.

  - data: (\`Record\<string, unknown>\`) The data necessary for the payment provider to process the payment session.

  - status: (\[PaymentSessionStatus]\(../../../../../payment/types/payment.PaymentSessionStatus/page.mdx)) The status of the payment session.

  - created\_at: (\`string\` \\| \`Date\`) When the payment session was created

  - updated\_at: (\`string\` \\| \`Date\`) When the payment session was updated

  - payment\_collection\_id: (\`string\`) The ID of the associated payment collection.

  - context: (\`Record\<string, unknown>\`) The context necessary for the payment provider.

  - authorized\_at: (\`Date\`) When the payment session was authorized.

  - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The payment collection the session is associated with.

    - id: (\`string\`) The ID of the payment collection.

    - currency\_code: (\`string\`) The ISO 3 character currency code of the payment sessions and payments associated with payment collection.

    - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The total amount to be authorized and captured.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - status: (\[PaymentCollectionStatus]\(../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)) The status of the payment collection.

    - payment\_providers: (\[PaymentProviderDTO]\(../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)\[]) The payment provider used to process the associated payment sessions and payments.

      - id: (\`string\`) The ID of the payment provider.

      - is\_enabled: (\`boolean\`) Whether the payment provider is enabled.

    - authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount authorized within the associated payment sessions.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount refunded within the associated payments.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount captured within the associated payments.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - completed\_at: (\`string\` \\| \`Date\`) When the payment collection was completed.

    - created\_at: (\`string\` \\| \`Date\`) When the payment collection was created.

    - updated\_at: (\`string\` \\| \`Date\`) When the payment collection was updated.

    - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

    - payment\_sessions: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)\[]) The associated payment sessions.

      - id: (\`string\`) The ID of the payment session.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount to authorize.

      - currency\_code: (\`string\`) The 3 character currency code of the payment session.

      - provider\_id: (\`string\`) The ID of the associated payment provider.

      - data: (\`Record\<string, unknown>\`) The data necessary for the payment provider to process the payment session.

      - status: (\[PaymentSessionStatus]\(../../../../../payment/types/payment.PaymentSessionStatus/page.mdx)) The status of the payment session.

      - created\_at: (\`string\` \\| \`Date\`) When the payment session was created

      - updated\_at: (\`string\` \\| \`Date\`) When the payment session was updated

      - payment\_collection\_id: (\`string\`) The ID of the associated payment collection.

      - context: (\`Record\<string, unknown>\`) The context necessary for the payment provider.

      - authorized\_at: (\`Date\`) When the payment session was authorized.

      - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The payment collection the session is associated with.

      - payment: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)) The payment created from the session.

      - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

    - payments: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)\[]) The associated payments.

      - id: (\`string\`) The ID of the payment.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The payment's total amount.

      - currency\_code: (\`string\`) The ISO 3 character currency code of the payment.

      - provider\_id: (\`string\`) The ID of the associated payment provider.

      - payment\_collection\_id: (\`string\`) The ID of the associated payment collection.

      - raw\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw amount of the payment.

      - authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The authorized amount of the payment.

      - raw\_authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw authorized amount of the payment.

      - data: (\`Record\<string, unknown>\`) The data relevant for the payment provider to process the payment.

      - created\_at: (\`string\` \\| \`Date\`) When the payment was created.

      - updated\_at: (\`string\` \\| \`Date\`) When the payment was updated.

      - captured\_at: (\`string\` \\| \`Date\`) When the payment was captured.

      - canceled\_at: (\`string\` \\| \`Date\`) When the payment was canceled.

      - captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated captures' amounts.

      - raw\_captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated captures' raw amounts.

      - refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated refunds' amounts.

      - raw\_refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated refunds' raw amounts.

      - captures: (\[CaptureDTO]\(../../../../../payment/interfaces/payment.CaptureDTO/page.mdx)\[]) The associated captures.

      - refunds: (\[RefundDTO]\(../../../../../payment/interfaces/payment.RefundDTO/page.mdx)\[]) The associated refunds.

      - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The associated payment collection.

      - payment\_session: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)) The payment session from which the payment is created.

  - payment: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)) The payment created from the session.

    - id: (\`string\`) The ID of the payment.

    - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The payment's total amount.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - currency\_code: (\`string\`) The ISO 3 character currency code of the payment.

    - provider\_id: (\`string\`) The ID of the associated payment provider.

    - payment\_collection\_id: (\`string\`) The ID of the associated payment collection.

    - raw\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw amount of the payment.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The authorized amount of the payment.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - raw\_authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw authorized amount of the payment.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - data: (\`Record\<string, unknown>\`) The data relevant for the payment provider to process the payment.

    - created\_at: (\`string\` \\| \`Date\`) When the payment was created.

    - updated\_at: (\`string\` \\| \`Date\`) When the payment was updated.

    - captured\_at: (\`string\` \\| \`Date\`) When the payment was captured.

    - canceled\_at: (\`string\` \\| \`Date\`) When the payment was canceled.

    - captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated captures' amounts.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - raw\_captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated captures' raw amounts.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated refunds' amounts.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - raw\_refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The sum of the associated refunds' raw amounts.

      - numeric: (\`number\`)

      - raw: (\[BigNumberRawValue]\(../../../../../payment/types/payment.BigNumberRawValue/page.mdx))

      - bigNumber: (\`BigNumber\`)

    - captures: (\[CaptureDTO]\(../../../../../payment/interfaces/payment.CaptureDTO/page.mdx)\[]) The associated captures.

      - id: (\`string\`) The ID of the capture.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The captured amount.

      - created\_at: (\`Date\`) The creation date of the capture.

      - payment: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)) The associated payment.

      - raw\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw captured amount.

      - created\_by: (\`string\`) Who the capture was created by. For example,
        the ID of a user.

    - refunds: (\[RefundDTO]\(../../../../../payment/interfaces/payment.RefundDTO/page.mdx)\[]) The associated refunds.

      - id: (\`string\`) The ID of the refund

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The refunded amount.

      - created\_at: (\`Date\`) The creation date of the refund.

      - payment: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)) The associated payment.

      - raw\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The raw refunded amount.

      - refund\_reason\_id: (\`null\` \\| \`string\`) The id of the refund\\\_reason that is associated with the refund

      - refund\_reason: (\`null\` \\| \[RefundReasonDTO]\(../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)) The id of the refund\\\_reason that is associated with the refund

      - note: (\`null\` \\| \`string\`) A field to add some additional information about the refund

      - created\_by: (\`string\`) Who created the refund. For example,
        the user's ID.

    - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The associated payment collection.

      - id: (\`string\`) The ID of the payment collection.

      - currency\_code: (\`string\`) The ISO 3 character currency code of the payment sessions and payments associated with payment collection.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The total amount to be authorized and captured.

      - status: (\[PaymentCollectionStatus]\(../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)) The status of the payment collection.

      - payment\_providers: (\[PaymentProviderDTO]\(../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)\[]) The payment provider used to process the associated payment sessions and payments.

      - authorized\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount authorized within the associated payment sessions.

      - refunded\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount refunded within the associated payments.

      - captured\_amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount captured within the associated payments.

      - completed\_at: (\`string\` \\| \`Date\`) When the payment collection was completed.

      - created\_at: (\`string\` \\| \`Date\`) When the payment collection was created.

      - updated\_at: (\`string\` \\| \`Date\`) When the payment collection was updated.

      - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

      - payment\_sessions: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)\[]) The associated payment sessions.

      - payments: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)\[]) The associated payments.

    - payment\_session: (\[PaymentSessionDTO]\(../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)) The payment session from which the payment is created.

      - id: (\`string\`) The ID of the payment session.

      - amount: (\[BigNumberValue]\(../../../../../payment/types/payment.BigNumberValue/page.mdx)) The amount to authorize.

      - currency\_code: (\`string\`) The 3 character currency code of the payment session.

      - provider\_id: (\`string\`) The ID of the associated payment provider.

      - data: (\`Record\<string, unknown>\`) The data necessary for the payment provider to process the payment session.

      - status: (\[PaymentSessionStatus]\(../../../../../payment/types/payment.PaymentSessionStatus/page.mdx)) The status of the payment session.

      - created\_at: (\`string\` \\| \`Date\`) When the payment session was created

      - updated\_at: (\`string\` \\| \`Date\`) When the payment session was updated

      - payment\_collection\_id: (\`string\`) The ID of the associated payment collection.

      - context: (\`Record\<string, unknown>\`) The context necessary for the payment provider.

      - authorized\_at: (\`Date\`) When the payment session was authorized.

      - payment\_collection: (\[PaymentCollectionDTO]\(../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)) The payment collection the session is associated with.

      - payment: (\[PaymentDTO]\(../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)) The payment created from the session.

      - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.

  - metadata: (\`Record\<string, unknown>\`) Holds custom data in key-value pairs.


---

The best way to deploy Medusa is through Medusa Cloud where you get autoscaling production infrastructure fine tuned for Medusa. Create an account by signing up at cloud.medusajs.com/signup.
