Umair Malhi
Umair Malhi

Reputation: 585

Braintree: Recurring Payments through API - Subscriptions and Webhooks

I want to create Recurring Payments/Subscriptions on behalf of my Users by using their Braintree accounts and update the status in my application on each payment but so far I have found that there are certain limitations to it.

  1. Plan should be created manually from Control Panel of Braintree to be used in Subscriptions.
  2. Webhooks can only be created through Control Panel and user have to select the events for Webhook.

I am creating a kind of Marketplace solution for different vendors so this kind of thing requires Plans/Subscriptions and Webhooks to be handled completely through API.

Can anyone please help me with some idea or trick to achieve this thing?

Upvotes: 1

Views: 409

Answers (1)

C Joseph
C Joseph

Reputation: 503

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.

You are correct, you must create a plan via the Control Panel. However, all subscriptions can be created for that plan via the API. You can also override the plan details via the API.

In order for Braintree to know where to send the webhook, you do need to register the URL via the Control Panel. When you go to register the URL, you can select the type of webhook for which you wish to trigger the webhook.

After this initial setup, everything else can be handled via the API: you can parse the webhook to be able to grab the associated subscriptions.

Upvotes: 1

Related Questions