validateCartPaymentsStep - Medusa Core Workflows Reference
This documentation provides a reference to the validateCartPaymentsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step validates a cart's payment sessions. Their status must
be pending
or requires_more
. If not valid, the step throws an error.
Tip: You can use the retrieveCartStep to retrieve a cart's details.
Example#
Input#
ValidateCartPaymentsStepInput
ValidateCartPaymentsStepInputThe cart's details.
ValidateCartPaymentsStepInput
ValidateCartPaymentsStepInputcart
CartWorkflowDTOThe cart to validate payment sessions for.
cart
CartWorkflowDTOOutput#
PaymentSessionDTO[]
PaymentSessionDTO[]
PaymentSessionDTO[]
PaymentSessionDTO[]id
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
PaymentSessionStatuscreated_at
string | DateWhen the payment session was created
created_at
string | Dateupdated_at
string | DateWhen the payment session was updated
updated_at
string | Datepayment_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?