12 lines
7.2 KiB
Plaintext
12 lines
7.2 KiB
Plaintext
---
|
|
displayed_sidebar: paymentReference
|
|
---
|
|
|
|
import { TypeList } from "docs-ui"
|
|
|
|
# CreatePaymentSessionDTO
|
|
|
|
The payment session to be created.
|
|
|
|
<TypeList types={[{"name":"provider_id","type":"`string`","description":"The provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/payment.BigNumberInput/page.mdx)","description":"The amount to be authorized.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Necessary data for the associated payment provider to process the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../payment.PaymentProviderContext/page.mdx)","description":"Necessary context data for the associated payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial<[AddressDTO](../../types/payment.AddressDTO/page.mdx)>","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial<[CustomerDTO](../payment.CustomerDTO/page.mdx)>","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../payment.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extra","type":"`Record<string, unknown>`","description":"The extra fields specific to the provider session.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreatePaymentSessionDTO"/>
|