In certain situations, you may need to delete a merchant’s payout account:

  • The Stripe account was created incorrectly
  • The merchant onboarded with the wrong country or business type
  • Administrative cleanup is required

Violet provides an API to delete a Payout Account and its associated Stripe Express account under specific conditions.

If the connected Stripe account has already been deleted externally (outside of Violet), you can still call this API to clean up the corresponding Violet records. Violet will detect this scenario and complete the deletion successfully.

Requirements for Deletion

A payout account can only be deleted if both of these conditions are met:

  1. The account has no transactions, payouts, or pending balance
  2. The account has not been used to process any orders or payments

API Reference

Request

DELETE /payout_accounts/{payout_account_id}
FieldTypeDescription
payout_account_idstringThe unique identifier of the Merchant Payout Account to delete.

Error Responses

StatusError CodeErrorMessageReason
4044407payout_account_not_foundThe Payout Account was not found.The payout account specified by the ID does not exist. The ID could be incorrect, or this account may have been deleted.
4039901insufficient_permissionsYou do not have permission to delete this account.The associated payout account cannot be accessed by your app. This could be because you are trying to delete a payout account associated with a different app.
4094452payout_account_conflictThis account cannot be deleted because it has existing payouts, transfers, or distributions.Once an account has had transactions placed against is, it cannot be deleted. This is to ensure that past transaction data is still accessible to you and the merchants.
5004453external_payment_provider_exceptionAn exception was thrown by the payment provider when trying to make this request. Caused by: [Stripe error details will be here]If Stripe throws an underlying exception while attempting to delete the account, the error message will include details from that exception. Possible reasons include trying to delete a Stripe Standard account, which you’re not authorized to access.

Webhooks

After a successful payout account deletion, Violet will emit a webhook: MERCHANT_PAYOUT_ACCOUNT_DELETED

{
  "id": "123456"
}

The id in any DELETE event is the unique Violet identifier of the entity that was deleted. For the MERCHANT_PAYOUT_ACCOUNT_DELETED event, this is the Prism Payout Account ID.

You can subscribe to this webhook event to update your internal records accordingly.