---
displayed_sidebar: servicesSidebar
---

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

# PaymentCollection

A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.

## constructor

`**new PaymentCollection**()`

A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.

___

## Properties

<ParameterTypes parameters={[
  {
    "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](Currency.mdx)",
    "description": "The details of the currency this payment collection is associated with.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "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](PaymentSession.mdx)[]",
    "description": "The details of the payment sessions created as part of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "payments",
    "type": "[Payment](Payment.mdx)[]",
    "description": "The details of the payments created as part of the payment collection.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "children": []
  },
  {
    "name": "region",
    "type": "[Region](Region.mdx)",
    "description": "The details of the region this payment collection is associated with.",
    "optional": false,
    "defaultValue": "",
    "expandable": true,
    "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](../enums/PaymentCollectionStatus.mdx)",
    "description": "The type of the payment collection",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "type",
    "type": "[ORDER_EDIT](../index.md#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": []
  }
]} />

___

## Methods

### beforeInsert

`Private **beforeInsert**(): void`

#### Returns

`void`

<ParameterTypes parameters={[
  {
    "name": "void",
    "type": "`void`",
    "optional": true,
    "defaultValue": "",
    "description": "",
    "expandable": false,
    "children": []
  }
]} />
