createPaymentAccountHolderStep - Medusa Core Workflows Reference

This documentation provides a reference to the createPaymentAccountHolderStep. It belongs to the @medusajs/medusa/core-flows package.

This step creates the account holder in the payment provider.

Example#

Code
1const accountHolder = createPaymentAccountHolderStep({2  provider_id: "pp_stripe_stripe",3  context: {4    customer: {5      id: "cus_123",6      email: "example@gmail.com"7    }8  }9})

Input#

CreateAccountHolderDTOCreateAccountHolderDTO
The payment session to be created.
provider_idstring
The provider's ID.
contextPaymentProviderContext & object
Necessary context data for the associated payment provider.

Output#

AccountHolderDTOAccountHolderDTO
idstring
The ID of the account holder.
provider_idstring
The ID of the associated payment provider.
external_idstring
The external ID of the account holder in the payment provider system.
emailnull | string
The email of the account holder.
dataRecord<string, unknown>
The data of the account holder, as returned by the payment provider.
created_atnull | string | DateOptional
When the account holder was created.
updated_atnull | string | DateOptional
When the account holder was updated.
metadatanull | Record<string, unknown>Optional
Holds custom data in key-value pairs.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break