IPayoutModuleService Reference
This section of the documentation provides a reference to theIPayoutModuleService interface’s methods. This is the interface developers use to use the functionalities provided by the Payout Module.
The main service interface for the Payout Module.
Methods
PayoutAccount Methods
- createPayoutAccount
- updatePayoutAccounts
- deletePayoutAccounts
- retrievePayoutAccount
- listPayoutAccounts
- listAndCountPayoutAccounts
- softDeletePayoutAccounts
- restorePayoutAccounts
- syncStripeAccount
Onboarding Methods
- initializeOnboarding
- updateOnboardings
- deleteOnboardings
- retrieveOnboarding
- listOnboardings
- listAndCountOnboardings
- softDeleteOnboardings
- restoreOnboardings
Payout Methods
- createPayout
- createPayouts
- updatePayouts
- deletePayouts
- retrievePayout
- listPayouts
- listAndCountPayouts
- softDeletePayouts
- restorePayouts
Payout Reversal Methods
- createPayoutReversal
- createPayoutReversals
- updatePayoutReversals
- deletePayoutReversals
- retrievePayoutReversal
- listPayoutReversals
- listAndCountPayoutReversals
- softDeletePayoutReversals
- restorePayoutReversals
Webhook Methods
createPayoutAccount
This section provides a reference to thecreatePayoutAccount method. This belongs to the Payout Module.
This method creates a payout account by initializing it with the payout provider (e.g., Stripe Connect).
Example
Parameters
The payout account to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created payout account.
syncStripeAccount
This section provides a reference to thesyncStripeAccount method. This belongs to the Payout Module.
This method syncs a payout account with the Stripe Connect account status. It fetches the latest account details from Stripe and updates the local payout account status based on whether the account is fully verified and authorized.
Example
Parameters
The ID of the payout account to sync.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The synced payout account with updated status.
initializeOnboarding
This section provides a reference to theinitializeOnboarding method. This belongs to the Payout Module.
This method initializes or updates the onboarding process for a payout account with the payout provider. If an onboarding record already exists, it updates it; otherwise, it creates a new one.
Example
Parameters
The onboarding data.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The initialized or updated onboarding record.
createPayout
This section provides a reference to thecreatePayout method. This belongs to the Payout Module.
This method creates a payout by processing a money transfer through the payout provider (e.g., Stripe Transfer).
Example
Parameters
The payout to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created payout.
createPayoutReversal
This section provides a reference to thecreatePayoutReversal method. This belongs to the Payout Module.
This method creates a payout reversal by reversing a previous payout through the payout provider.
Example
Parameters
The payout reversal to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created payout reversal.
getWebhookActionAndData
This section provides a reference to thegetWebhookActionAndData method. This belongs to the Payout Module.
This method processes webhook events from the payout provider and returns the action type and associated data.
Example
Parameters
The webhook payload data.
Returns
The webhook action and associated data.
updatePayoutAccounts
This section provides a reference to theupdatePayoutAccounts method. This belongs to the Payout Module.
updatePayoutAccounts(id, data, sharedContext?): Promise<PayoutAccountDTO>
This method updates an existing payout account.Example
Parameters
The ID of the payout account.
The attributes to update in the payout account.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated payout account.
deletePayoutAccounts
This section provides a reference to thedeletePayoutAccounts method. This belongs to the Payout Module.
deletePayoutAccounts(ids, sharedContext?): Promise<void>
This method deletes payout accounts by their IDs.Example
Parameters
The IDs of the payout accounts.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payout accounts are deleted successfully.
deletePayoutAccounts(id, sharedContext?): Promise<void>
This method deletes a payout account by its ID.Example
Parameters
The ID of the payout account.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payout account is deleted successfully.
retrievePayoutAccount
This section provides a reference to theretrievePayoutAccount method. This belongs to the Payout Module.
This method retrieves a payout account by its ID.
Example
Parameters
The ID of the payout account.
The configurations determining how the payout account is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved payout account.
listPayoutAccounts
This section provides a reference to thelistPayoutAccounts method. This belongs to the Payout Module.
This method retrieves a paginated list of payout accounts based on optional filters and configuration.
Example
15 records are retrieved. You can control pagination:
Parameters
The filters to apply on the retrieved payout accounts.
The configurations determining how the payout account is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payout accounts.
listAndCountPayoutAccounts
This section provides a reference to thelistAndCountPayoutAccounts method. This belongs to the Payout Module.
This method retrieves a paginated list of payout accounts along with the total count of available payout accounts satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved payout accounts.
The configurations determining how the payout account is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payout accounts along with their total count.
softDeletePayoutAccounts
This section provides a reference to thesoftDeletePayoutAccounts method. This belongs to the Payout Module.
This method soft deletes payout accounts by their IDs.
Example
Parameters
The IDs of the payout accounts.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restorePayoutAccounts
This section provides a reference to therestorePayoutAccounts method. This belongs to the Payout Module.
This method restores soft deleted payout accounts by their IDs.
Example
Parameters
The IDs of the payout accounts.
Configurations determining which relations to restore along with each of the payout account.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.updateOnboardings
This section provides a reference to theupdateOnboardings method. This belongs to the Payout Module.
updateOnboardings(id, data, sharedContext?): Promise<OnboardingDTO>
This method updates an existing onboarding record.Example
Parameters
The ID of the onboarding.
The attributes to update in the onboarding.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated onboarding.
deleteOnboardings
This section provides a reference to thedeleteOnboardings method. This belongs to the Payout Module.
deleteOnboardings(ids, sharedContext?): Promise<void>
This method deletes onboardings by their IDs.Example
Parameters
The IDs of the onboardings.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the onboardings are deleted successfully.
deleteOnboardings(id, sharedContext?): Promise<void>
This method deletes an onboarding by its ID.Example
Parameters
The ID of the onboarding.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the onboarding is deleted successfully.
retrieveOnboarding
This section provides a reference to theretrieveOnboarding method. This belongs to the Payout Module.
This method retrieves an onboarding by its ID.
Example
Parameters
The ID of the onboarding.
The configurations determining how the onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved onboarding.
listOnboardings
This section provides a reference to thelistOnboardings method. This belongs to the Payout Module.
This method retrieves a paginated list of onboardings based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved onboardings.
The configurations determining how the onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of onboardings.
listAndCountOnboardings
This section provides a reference to thelistAndCountOnboardings method. This belongs to the Payout Module.
This method retrieves a paginated list of onboardings along with the total count of available onboardings satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved onboardings.
The configurations determining how the onboarding is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of onboardings along with their total count.
softDeleteOnboardings
This section provides a reference to thesoftDeleteOnboardings method. This belongs to the Payout Module.
This method soft deletes onboardings by their IDs.
Example
Parameters
The IDs of the onboardings.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restoreOnboardings
This section provides a reference to therestoreOnboardings method. This belongs to the Payout Module.
This method restores soft deleted onboardings by their IDs.
Example
Parameters
The IDs of the onboardings.
Configurations determining which relations to restore along with each of the onboarding.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.createPayouts
This section provides a reference to thecreatePayouts method. This belongs to the Payout Module.
createPayouts(data, sharedContext?): Promise<PayoutDTO[]>
This method creates payouts.Example
Parameters
The payouts to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created payouts.
updatePayouts
This section provides a reference to theupdatePayouts method. This belongs to the Payout Module.
updatePayouts(id, data, sharedContext?): Promise<PayoutDTO>
This method updates an existing payout.Example
Parameters
The ID of the payout.
The attributes to update in the payout.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated payout.
deletePayouts
This section provides a reference to thedeletePayouts method. This belongs to the Payout Module.
deletePayouts(ids, sharedContext?): Promise<void>
This method deletes payouts by their IDs.Example
Parameters
The IDs of the payouts.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payouts are deleted successfully.
deletePayouts(id, sharedContext?): Promise<void>
This method deletes a payout by its ID.Example
Parameters
The ID of the payout.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payout is deleted successfully.
retrievePayout
This section provides a reference to theretrievePayout method. This belongs to the Payout Module.
This method retrieves a payout by its ID.
Example
Parameters
The ID of the payout.
The configurations determining how the payout is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved payout.
listPayouts
This section provides a reference to thelistPayouts method. This belongs to the Payout Module.
This method retrieves a paginated list of payouts based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved payouts.
The configurations determining how the payout is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payouts.
listAndCountPayouts
This section provides a reference to thelistAndCountPayouts method. This belongs to the Payout Module.
This method retrieves a paginated list of payouts along with the total count of available payouts satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved payouts.
The configurations determining how the payout is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payouts along with their total count.
softDeletePayouts
This section provides a reference to thesoftDeletePayouts method. This belongs to the Payout Module.
This method soft deletes payouts by their IDs.
Example
Parameters
The IDs of the payouts.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restorePayouts
This section provides a reference to therestorePayouts method. This belongs to the Payout Module.
This method restores soft deleted payouts by their IDs.
Example
Parameters
The IDs of the payouts.
Configurations determining which relations to restore along with each of the payout.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.createPayoutReversals
This section provides a reference to thecreatePayoutReversals method. This belongs to the Payout Module.
createPayoutReversals(data, sharedContext?): Promise<PayoutReversalDTO[]>
This method creates payout reversals.Example
Parameters
The payout reversals to be created.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The created payout reversals.
updatePayoutReversals
This section provides a reference to theupdatePayoutReversals method. This belongs to the Payout Module.
updatePayoutReversals(id, data, sharedContext?): Promise<PayoutReversalDTO>
This method updates an existing payout reversal.Example
Parameters
The ID of the payout reversal.
The attributes to update in the payout reversal.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The updated payout reversal.
deletePayoutReversals
This section provides a reference to thedeletePayoutReversals method. This belongs to the Payout Module.
deletePayoutReversals(ids, sharedContext?): Promise<void>
This method deletes payout reversals by their IDs.Example
Parameters
The IDs of the payout reversals.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payout reversals are deleted successfully.
deletePayoutReversals(id, sharedContext?): Promise<void>
This method deletes a payout reversal by its ID.Example
Parameters
The ID of the payout reversal.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
Resolves when the payout reversal is deleted successfully.
retrievePayoutReversal
This section provides a reference to theretrievePayoutReversal method. This belongs to the Payout Module.
This method retrieves a payout reversal by its ID.
Example
Parameters
The ID of the payout reversal.
The configurations determining how the payout reversal is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The retrieved payout reversal.
listPayoutReversals
This section provides a reference to thelistPayoutReversals method. This belongs to the Payout Module.
This method retrieves a paginated list of payout reversals based on optional filters and configuration.
Example
Parameters
The filters to apply on the retrieved payout reversals.
The configurations determining how the payout reversal is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payout reversals.
listAndCountPayoutReversals
This section provides a reference to thelistAndCountPayoutReversals method. This belongs to the Payout Module.
This method retrieves a paginated list of payout reversals along with the total count of available payout reversals satisfying the provided filters.
Example
Parameters
The filters to apply on the retrieved payout reversals.
The configurations determining how the payout reversal is retrieved.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
The list of payout reversals along with their total count.
softDeletePayoutReversals
This section provides a reference to thesoftDeletePayoutReversals method. This belongs to the Payout Module.
This method soft deletes payout reversals by their IDs.
Example
Parameters
The IDs of the payout reversals.
An object that is used to specify an entity’s related entities that should be soft-deleted when the main entity is soft-deleted.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were also soft deleted. If there are no related records, the promise resolves to
void.restorePayoutReversals
This section provides a reference to therestorePayoutReversals method. This belongs to the Payout Module.
This method restores soft deleted payout reversals by their IDs.
Example
Parameters
The IDs of the payout reversals.
Configurations determining which relations to restore along with each of the payout reversal.
A context used to share resources, such as transaction manager, between the application and the module.
Returns
An object that includes the IDs of related records that were restored. If there are no related records restored, the promise resolves to
void.