- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createPaymentSessionStep - Medusa Core Workflows Reference
This documentation provides a reference to the createPaymentSessionStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step creates a payment session.
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { createPaymentSessionStep } from "@medusajs/medusa/core-flows"3 4const myWorkflow = createWorkflow(5 "my-workflow",6 () => {7 const data = createPaymentSessionStep({8 "payment_collection_id": "{value}",9 "provider_id": "{value}",10 "amount": 25,11 "currency_code": "zar"12 })13 }14)
Input#
CreatePaymentSessionStepInput
CreatePaymentSessionStepInputThe data to create a payment session.
CreatePaymentSessionStepInput
CreatePaymentSessionStepInputpayment_collection_id
stringThe ID of the payment collection that the session belongs to.
payment_collection_id
stringprovider_id
stringThe ID of the payment provider that the payment session is associated with.
provider_id
stringamount
BigNumberInputThe payment session's amount.
amount
BigNumberInputcurrency_code
stringThe currency code of the payment session.
currency_code
stringAdditional context that's useful for the payment provider to process the payment session.
data
Record<string, unknown>OptionalCustom data relevant for the payment provider to process the payment session.
Learn more in this documentation.
data
Record<string, unknown>OptionalOutput#
PaymentSessionDTO
PaymentSessionDTOThe payment session details.
PaymentSessionDTO
PaymentSessionDTOid
stringThe ID of the payment session.
id
stringamount
BigNumberValueThe amount to authorize.
amount
BigNumberValuecurrency_code
stringThe 3 character currency code of the payment session.
currency_code
stringprovider_id
stringThe ID of the associated payment provider.
provider_id
stringdata
Record<string, unknown>The data necessary for the payment provider to process the payment session.
data
Record<string, unknown>status
PaymentSessionStatusThe status of the payment session.
status
PaymentSessionStatuspayment_collection_id
stringThe ID of the associated payment collection.
payment_collection_id
stringcontext
Record<string, unknown>OptionalThe context necessary for the payment provider.
context
Record<string, unknown>Optionalauthorized_at
DateOptionalWhen the payment session was authorized.
authorized_at
DateOptionalThe payment collection the session is associated with.
The payment created from the session.
Was this page helpful?