---
displayed_sidebar: jsClientSidebar
slug: /references/js-client/AdminPaymentCollectionsResource
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# AdminPaymentCollectionsResource

This class is used to send requests to [Admin Payment Collection API Routes](https://docs.medusajs.com/api/admin#payment-collections). All its method
are available in the JS Client under the `medusa.admin.paymentCollections` property.

All methods in this class require [user authentication](js_client.AdminAuthResource.mdx#createsession).

A payment collection is useful for managing additional payments, such as for Order Edits, or installment payments.

## Methods

### delete

Delete a payment collection. Only payment collections with the statuses `canceled` or `not_paid` can be deleted.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.paymentCollections.delete(paymentCollectionId)
.then(({ id, object, deleted }) => {
  console.log(id)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminPaymentCollectionDeleteRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the deletion operation's details.",
    "expandable": false,
    "children": [
      {
        "name": "deleted",
        "type": "`boolean`",
        "description": "Whether or not the Payment Collection was deleted.",
        "optional": false,
        "defaultValue": "true",
        "expandable": false,
        "children": []
      },
      {
        "name": "id",
        "type": "`string`",
        "description": "The ID of the deleted Payment Collection.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "object",
        "type": "`\"payment_collection\"`",
        "description": "The type of the object that was deleted.",
        "optional": false,
        "defaultValue": "payment_collection",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />

___

### markAsAuthorized

Set the status of a payment collection as `authorized`. This will also change the `authorized_amount` of the payment collection.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.paymentCollections.markAsAuthorized(paymentCollectionId)
.then(({ payment_collection }) => {
  console.log(payment_collection.id)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminPaymentCollectionsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the payment collection's details.",
    "expandable": false,
    "children": [
      {
        "name": "payment_collection",
        "type": "[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)",
        "description": "Payment Collection details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "amount",
            "type": "`number`",
            "description": "Amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "authorized_amount",
            "type": "`null` \\| `number`",
            "description": "Authorized amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`string`",
            "description": "The ID of the user that created the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "currency",
            "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
            "description": "The details of the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "code",
                "type": "`string`",
                "description": "The 3 character ISO code for the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the currency prices include tax",
                "optional": true,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The written name of the currency",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol",
                "type": "`string`",
                "description": "The symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol_native",
                "type": "`string`",
                "description": "The native symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "currency_code",
            "type": "`string`",
            "description": "The three character ISO code for the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "description",
            "type": "`null` \\| `string`",
            "description": "Description of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The payment collection's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "payment_sessions",
            "type": "[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)[]",
            "description": "The details of the payment sessions created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment Session has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "The data required for the Payment Provider to identify, modify and process the Payment Session. 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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment session's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a cart in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_initiated",
                "type": "`boolean`",
                "description": "A flag to indicate if a communication with the third party provider has been initiated.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_selected",
                "type": "`null` \\| `boolean`",
                "description": "A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_authorized_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Payment Session was authorized.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The ID of the Payment Provider that is responsible for the Payment Session",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "`string`",
                "description": "Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "payments",
            "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
            "description": "The details of the payments created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "amount_refunded",
                "type": "`number`",
                "description": "The amount of the original Payment amount that has been refunded back to the Customer.",
                "optional": false,
                "defaultValue": "0",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "captured_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was captured.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character ISO currency code of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a payment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The id of the Payment Provider that is responsible for the Payment",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region",
            "type": "[Region](../../entities/classes/entities.Region.mdx)",
            "description": "The details of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "automatic_taxes",
                "type": "`boolean`",
                "description": "Whether taxes should be automated in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "countries",
                "type": "[Country](../../entities/classes/entities.Country.mdx)[]",
                "description": "The details of the countries included in this region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The three character currency code used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_providers",
                "type": "[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)[]",
                "description": "The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards_taxable",
                "type": "`boolean`",
                "description": "Whether the gift cards are taxable or not in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The region's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the prices for the region include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_providers",
                "type": "[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)[]",
                "description": "The details of the payment providers that can be used to process payments in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_code",
                "type": "`string`",
                "description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_provider",
                "type": "[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)",
                "description": "The details of the tax provider used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_provider_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the tax provider used in this region",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`number`",
                "description": "The tax rate that should be charged on purchases in the Region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rates",
                "type": "`null` \\| [TaxRate](../../entities/classes/entities.TaxRate.mdx)[]",
                "description": "The details of the tax rates used in the region, aside from the default rate.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region_id",
            "type": "`string`",
            "description": "The ID of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "status",
            "type": "[PaymentCollectionStatus](../../entities/enums/entities.PaymentCollectionStatus.mdx)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "AUTHORIZED",
                "type": "`\"authorized\"`",
                "description": "The payment colleciton is authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "AWAITING",
                "type": "`\"awaiting\"`",
                "description": "The payment collection is awaiting payment.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The payment collection is canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_PAID",
                "type": "`\"not_paid\"`",
                "description": "The payment collection isn't paid.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_AUTHORIZED",
                "type": "`\"partially_authorized\"`",
                "description": "Some of the payments in the payment collection are authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "[ORDER_EDIT](../../entities/enums/entities.PaymentCollectionType.mdx#order_edit)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### retrieve

Retrieve a Payment Collection's details.

#### Example

A simple example that retrieves a payment collection by its ID:

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.paymentCollections.retrieve(paymentCollectionId)
.then(({ payment_collection }) => {
    console.log(payment_collection.id)
  })
```

To specify relations that should be retrieved:

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.paymentCollections.retrieve(paymentCollectionId, {
  expand: "currency"
})
.then(({ payment_collection }) => {
  console.log(payment_collection.id)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "query",
    "type": "[AdminGetPaymentCollectionsParams](../../medusa/classes/medusa.AdminGetPaymentCollectionsParams.mdx)",
    "description": "Configurations to apply on the retrieved payment collection.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "expand",
        "type": "`string`",
        "description": "Comma-separated relations that should be expanded in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "fields",
        "type": "`string`",
        "description": "Comma-separated fields that should be included in the returned data.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminPaymentCollectionsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the payment collection's details.",
    "expandable": false,
    "children": [
      {
        "name": "payment_collection",
        "type": "[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)",
        "description": "Payment Collection details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "amount",
            "type": "`number`",
            "description": "Amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "authorized_amount",
            "type": "`null` \\| `number`",
            "description": "Authorized amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`string`",
            "description": "The ID of the user that created the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "currency",
            "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
            "description": "The details of the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "code",
                "type": "`string`",
                "description": "The 3 character ISO code for the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the currency prices include tax",
                "optional": true,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The written name of the currency",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol",
                "type": "`string`",
                "description": "The symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol_native",
                "type": "`string`",
                "description": "The native symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "currency_code",
            "type": "`string`",
            "description": "The three character ISO code for the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "description",
            "type": "`null` \\| `string`",
            "description": "Description of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The payment collection's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "payment_sessions",
            "type": "[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)[]",
            "description": "The details of the payment sessions created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment Session has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "The data required for the Payment Provider to identify, modify and process the Payment Session. 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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment session's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a cart in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_initiated",
                "type": "`boolean`",
                "description": "A flag to indicate if a communication with the third party provider has been initiated.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_selected",
                "type": "`null` \\| `boolean`",
                "description": "A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_authorized_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Payment Session was authorized.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The ID of the Payment Provider that is responsible for the Payment Session",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "`string`",
                "description": "Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "payments",
            "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
            "description": "The details of the payments created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "amount_refunded",
                "type": "`number`",
                "description": "The amount of the original Payment amount that has been refunded back to the Customer.",
                "optional": false,
                "defaultValue": "0",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "captured_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was captured.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character ISO currency code of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a payment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The id of the Payment Provider that is responsible for the Payment",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region",
            "type": "[Region](../../entities/classes/entities.Region.mdx)",
            "description": "The details of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "automatic_taxes",
                "type": "`boolean`",
                "description": "Whether taxes should be automated in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "countries",
                "type": "[Country](../../entities/classes/entities.Country.mdx)[]",
                "description": "The details of the countries included in this region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The three character currency code used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_providers",
                "type": "[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)[]",
                "description": "The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards_taxable",
                "type": "`boolean`",
                "description": "Whether the gift cards are taxable or not in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The region's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the prices for the region include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_providers",
                "type": "[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)[]",
                "description": "The details of the payment providers that can be used to process payments in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_code",
                "type": "`string`",
                "description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_provider",
                "type": "[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)",
                "description": "The details of the tax provider used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_provider_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the tax provider used in this region",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`number`",
                "description": "The tax rate that should be charged on purchases in the Region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rates",
                "type": "`null` \\| [TaxRate](../../entities/classes/entities.TaxRate.mdx)[]",
                "description": "The details of the tax rates used in the region, aside from the default rate.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region_id",
            "type": "`string`",
            "description": "The ID of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "status",
            "type": "[PaymentCollectionStatus](../../entities/enums/entities.PaymentCollectionStatus.mdx)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "AUTHORIZED",
                "type": "`\"authorized\"`",
                "description": "The payment colleciton is authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "AWAITING",
                "type": "`\"awaiting\"`",
                "description": "The payment collection is awaiting payment.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The payment collection is canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_PAID",
                "type": "`\"not_paid\"`",
                "description": "The payment collection isn't paid.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_AUTHORIZED",
                "type": "`\"partially_authorized\"`",
                "description": "Some of the payments in the payment collection are authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "[ORDER_EDIT](../../entities/enums/entities.PaymentCollectionType.mdx#order_edit)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### update

Update a payment collection's details.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged in or use api token
medusa.admin.paymentCollections.update(paymentCollectionId, {
  description
})
.then(({ payment_collection }) => {
  console.log(payment_collection.id)
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "id",
    "type": "`string`",
    "description": "The ID of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "payload",
    "type": "[AdminUpdatePaymentCollectionsReq](../../medusa/classes/medusa.AdminUpdatePaymentCollectionsReq.mdx)",
    "description": "The attributes to update in the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "description",
        "type": "`string`",
        "description": "A description to create or update the payment collection.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "metadata",
        "type": "`Record<string, unknown>`",
        "description": "A set of key-value pairs to hold additional information.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;AdminPaymentCollectionsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the payment collection's details.",
    "expandable": false,
    "children": [
      {
        "name": "payment_collection",
        "type": "[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)",
        "description": "Payment Collection details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "amount",
            "type": "`number`",
            "description": "Amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "authorized_amount",
            "type": "`null` \\| `number`",
            "description": "Authorized amount of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_by",
            "type": "`string`",
            "description": "The ID of the user that created the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "currency",
            "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
            "description": "The details of the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "code",
                "type": "`string`",
                "description": "The 3 character ISO code for the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the currency prices include tax",
                "optional": true,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The written name of the currency",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol",
                "type": "`string`",
                "description": "The symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "symbol_native",
                "type": "`string`",
                "description": "The native symbol used to indicate the currency.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "currency_code",
            "type": "`string`",
            "description": "The three character ISO code for the currency this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "description",
            "type": "`null` \\| `string`",
            "description": "Description of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The payment collection's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "payment_sessions",
            "type": "[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)[]",
            "description": "The details of the payment sessions created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment Session has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the cart that the payment session was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "The data required for the Payment Provider to identify, modify and process the Payment Session. 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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment session's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a cart in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_initiated",
                "type": "`boolean`",
                "description": "A flag to indicate if a communication with the third party provider has been initiated.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_selected",
                "type": "`null` \\| `boolean`",
                "description": "A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_authorized_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Payment Session was authorized.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The ID of the Payment Provider that is responsible for the Payment Session",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "`string`",
                "description": "Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires\\_more` to indicate that further actions are to be completed by the Customer.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "payments",
            "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
            "description": "The details of the payments created as part of the payment collection.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "amount_refunded",
                "type": "`number`",
                "description": "The amount of the original Payment amount that has been refunded back to the Customer.",
                "optional": false,
                "defaultValue": "0",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "captured_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was captured.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character ISO currency code of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "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.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a payment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The id of the Payment Provider that is responsible for the Payment",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region",
            "type": "[Region](../../entities/classes/entities.Region.mdx)",
            "description": "The details of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "automatic_taxes",
                "type": "`boolean`",
                "description": "Whether taxes should be automated in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "countries",
                "type": "[Country](../../entities/classes/entities.Country.mdx)[]",
                "description": "The details of the countries included in this region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The three character currency code used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_providers",
                "type": "[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)[]",
                "description": "The details of the fulfillment providers that can be used to fulfill items of orders and similar resources in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards_taxable",
                "type": "`boolean`",
                "description": "Whether the gift cards are taxable or not in this region.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The region's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the prices for the region include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "name",
                "type": "`string`",
                "description": "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_providers",
                "type": "[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)[]",
                "description": "The details of the payment providers that can be used to process payments in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_code",
                "type": "`string`",
                "description": "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_provider",
                "type": "[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)",
                "description": "The details of the tax provider used in the region.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_provider_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the tax provider used in this region",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`number`",
                "description": "The tax rate that should be charged on purchases in the Region.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_rates",
                "type": "`null` \\| [TaxRate](../../entities/classes/entities.TaxRate.mdx)[]",
                "description": "The details of the tax rates used in the region, aside from the default rate.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "region_id",
            "type": "`string`",
            "description": "The ID of the region this payment collection is associated with.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "status",
            "type": "[PaymentCollectionStatus](../../entities/enums/entities.PaymentCollectionStatus.mdx)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "AUTHORIZED",
                "type": "`\"authorized\"`",
                "description": "The payment colleciton is authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "AWAITING",
                "type": "`\"awaiting\"`",
                "description": "The payment collection is awaiting payment.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The payment collection is canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_PAID",
                "type": "`\"not_paid\"`",
                "description": "The payment collection isn't paid.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_AUTHORIZED",
                "type": "`\"partially_authorized\"`",
                "description": "Some of the payments in the payment collection are authorized.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "type",
            "type": "[ORDER_EDIT](../../entities/enums/entities.PaymentCollectionType.mdx#order_edit)",
            "description": "The type of the payment collection",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
