|
1
|
{"slug":"/references/payment/models/Capture","title":"Capture - Payment Module Data Models Reference","frontmatter":{"displayed_sidebar":"paymentModelReference","slug":"/references/payment/models/Capture","sidebar_label":"Capture"},"toc":[],"blocks":[{"kind":"markdown","html":"This documentation provides a reference to the Capture data model. It belongs to the Payment Module."},{"kind":"sourceCodeLink","link":"https://github.com/medusajs/medusa/blob/020565398e436a2bc65777a3b1ad347b4735d6df/packages/modules/payment/src/models/capture.ts#L4"},{"kind":"typeList","sectionTitle":"Capture","types":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the capture.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The captured amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"BelongsTo<[Payment](/references/payment/models/Payment)>","description":"The associated payment.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The currency code of the payment.","optional":false,"defaultValue":"","example":"usd","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider_id","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the Payment Module Provider used to process the payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"The data of the payment that's useful for processing with third-party services. Learn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/payment/payment-session#data-property)","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`DateTimeProperty`","description":"The date that the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`DateTimeProperty`","description":"The date that the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"BelongsTo<[PaymentCollection](/references/payment/models/PaymentCollection)>","description":"The associated payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The currency code of the payment collection.","optional":false,"defaultValue":"","example":"usd","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`BigNumberProperty`","description":"The authorized amount of the payment collection","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`BigNumberProperty`","description":"The captured amount of the payment collection","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`BigNumberProperty`","description":"The refunded amount of the payment collection","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`DateTimeProperty`","description":"The date the payment collection was completed","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PaymentCollectionStatus](/references/utils/enums/utils.PaymentCollectionStatus)>","description":"The status of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"ManyToMany<[PaymentProvider](/references/payment/models/PaymentProvider)>","description":"The associated payment providers.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_sessions","type":"HasMany<[PaymentSession](/references/payment/models/PaymentSession)>","description":"The associated payment sessions.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"HasMany<[Payment](/references/payment/models/Payment)>","description":"The associated payments.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"payment_session","type":"BelongsTo<[PaymentSession](/references/payment/models/PaymentSession)>","description":"The associated payment session.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The currency code of the payment session.","optional":false,"defaultValue":"","example":"usd","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The authorized amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the Payment Module Provider used to process the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"The data of the payment session that's useful for processing with third-party services. Learn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/payment/payment-session#data-property)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"The context of the payment session, such as the billing address or the customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PaymentSessionStatus](/references/utils/enums/utils.PaymentSessionStatus)>","description":"The status of the payment session","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`DateTimeProperty`","description":"The date the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"BelongsTo<[PaymentCollection](/references/payment/models/PaymentCollection)>","description":"The associated payment collection.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"payment","type":"HasOne<[Payment](/references/payment/models/Payment)>","description":"The associated payment.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"refunds","type":"HasMany<[Refund](/references/payment/models/Refund)>","description":"The associated refunds.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The refunded amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"BelongsTo<[Payment](/references/payment/models/Payment)>","description":"The associated payment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"refund_reason","type":"BelongsTo<[RefundReason](/references/payment/models/RefundReason)>","description":"The associated refund reason.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"note","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"A note with more explanation about the refund","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the refund.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"captures","type":"HasMany<[Capture](/references/payment/models/Capture)>","description":"The associated captures.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the capture.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The captured amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment","type":"BelongsTo<[Payment](/references/payment/models/Payment)>","description":"The associated payment.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The created by of the capture","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The created by of the capture","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} |