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:
- Python
notification = gateway.webhook_notification.parse(bt_signature, bt_payload)
if notification.kind == braintree.WebhookNotification.Kind.SubMerchantAccountApproved:
# Handle approved notification
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:
- Python
notification = gateway.webhook_notification.parse(bt_signature, bt_payload)
if notification.kind == braintree.WebhookNotification.Kind.SubMerchantAccountDeclined:
# Handle declined notification
notification.message = "Credit score is too low"
notification.errors = <braintree.validation_error_collection.ValidationErrorCollection object at 0x1474a90>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