How can I get a customer's ID from a webhook notification from Braintree?
For example, I can do the following to get their ID:
gateway.webhookNotification.parse(sampleNotification.bt_signature, sampleNotification.bt_payload, (err, webhookNotification) => {
let customerId = webhookNotification.subject.subscription.transactions[0].customer.id;
});
But this requires the user to have at least one transaction first. How can I get a customer's ID if they do not yet have any transactions?
via Fizzix
No comments:
Post a Comment