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:
- Ruby
notification = gateway.webhook_notification.parse(
bt_signature,
bt_payload
)
notification.kind == Braintree::WebhookNotification::
Kind::SubMerchantAccountApproved
# true
notification.merchant_account.status
# "active"
notification.merchant_account.id
# "blue_ladders_store"
notification.merchant_account.master_merchant_account.id
# "14ladders_marketplace"
notification.merchant_account.master_merchant_account.status
# "active"Sub-merchant declined
You can also listen for a SubMerchantAccountDeclined webhook that looks like this:
- Ruby
notification = gateway.webhook_notification.parse(
bt_signature,
bt_payload
)
notification.kind == Braintree::WebhookNotification::
Kind::SubMerchantAccountDeclined
# true
notification.message
# "Credit score is too low"
notification.errors
# #<Braintree::ErrorResult params:{. . .} errors:<merchant_account:[(82621) Applicant declined due to OFAC.]>>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