Confirming Sub-merchant Onboarding
Availability
If you're a new merchant looking for a marketplace solution,
contact our Sales team.
Note
The
{{ formatVariable "bt_signature" serverSdk.name }} and
{{ formatVariable "bt_payload" serverSdk.name }} variables in the code snippets below
represent parameters received from the webhook POST request. For more information, read the
documentation on parsing webhooks.
Sub-merchant approved
Once you have webhooks configured, you can listen for a
SubMerchantAccountApproved webhook that looks like this:
- Node
gateway.webhookNotification.parse(btSignature, btPayload, function (err, webhookNotification) {
webhookNotification.kind === braintree.WebhookNotification.Kind.SubMerchantAccountApproved; // true
webhookNotification.merchantAccount.status; // "active"
webhookNotification.merchantAccount.id; // "blueLaddersStore"
webhookNotification.merchantAccount.masterMerchantAccount.id; // "14laddersMarketplace"
notification.merchantAccount.masterMerchantAccount.status; // "active"
});Sub-merchant declined
You can also listen for a SubMerchantAccountDeclined webhook that looks like this:
- Node
gateway.webhookNotification.parse(btSignature, btPayload, function (err, webhookNotification) {
webhookNotification.kind === braintree.WebhookNotification.Kind.SubMerchantAccountDeclined; // true
webhookNotification.message; // "Credit score is too low"
webhookNotification.errors; // { ... }
});Declined, the webhook will contain
validation errors
indicating why the sub-merchant was declined. There are several reasons this can occur:
- Failed OFAC
- Failed Mastercard MATCH
- Failed KYC
- SSN invalid
- SSN matches deceased person