Creates or updates the payment details record attached to a seller. Also run as a step by createSellerAccountWorkflow when payment details are provided at registration.
Usage
import { updateSellerPaymentDetailsWorkflow } from "@mercurjs/core/workflows"
const { result } = await updateSellerPaymentDetailsWorkflow ( container ). run ({
input: {
seller_id: "sel_123" ,
data: { holder_name: "Acme GmbH" , iban: "DE89370400440532013000" },
},
})
Id of the seller whose payment details are updated.
data
UpdatePaymentDetailsDTO
required
Payment fields to set; all optional.
Custom data passed through to the workflow hooks.
Result
The updated payment details.
Hooks
paymentDetailsUpdated — runs after the update with { payment_details, additional_data }.
updateSellerPaymentDetailsWorkflow . hooks . paymentDetailsUpdated (
async ({ payment_details }) => {
// e.g. trigger payout account re-verification
}
)