Reply
Highlighted
New Member
Posts: 41
Registered: ‎04-07-2017
Kudos: 38
Solutions: 1
Accepted Solution

API question

Hey,

 

So I have finally gotten a working API for customer signups on my website. It writes to the crm; however; I can't seem to find a couple things I want to add.

 

We use Stripe and would like to give an option to create a subscription. How do I PUSH a subscription to the ucrm I use php curl. Are you able to do this? I cant seem to find it in the documentation.

 

Also, can you add custom tags to clients via API?

 

I have spent so much time at the apiary I can no longer read off a computer screen, hopefully someone here has some insight.


Accepted Solutions
Member
Posts: 231
Registered: ‎11-18-2009
Kudos: 59
Solutions: 5

Re: API question

[ Edited ]

@RonnRegional,

 

Stripe Subscriptions

 

Currently (according to the beta API docs), only IPPay subscriptions can be setup through the UCRM REST API.  My guess is that more are to come in the future.

 

If you are doing your own development, then the only current workaround/solution I can think of is to use the Stripe API to create the subscription and then use the Stripe webhooks to trigger your own code/plugin to add a standard payment to the UCRM when a Stripe Webhook event occurs for the subscription.

 

Client Tags

 

Client tags are now added/edited through the "/client-tags" endpoint, supporting GET, POST, PATCH and DELETE.  I have not tested, but it also appears from the docs that the tag will be created if it does not already exist, which is a huge plus.  I will check over the weekend when I update my own SDK and see if that is true or not.  Otherwise, give it a whirl and see.  Worse case, you need to delete a tag from UCRM.

View solution in original post


All Replies
Member
Posts: 231
Registered: ‎11-18-2009
Kudos: 59
Solutions: 5

Re: API question

[ Edited ]

@RonnRegional,

 

Stripe Subscriptions

 

Currently (according to the beta API docs), only IPPay subscriptions can be setup through the UCRM REST API.  My guess is that more are to come in the future.

 

If you are doing your own development, then the only current workaround/solution I can think of is to use the Stripe API to create the subscription and then use the Stripe webhooks to trigger your own code/plugin to add a standard payment to the UCRM when a Stripe Webhook event occurs for the subscription.

 

Client Tags

 

Client tags are now added/edited through the "/client-tags" endpoint, supporting GET, POST, PATCH and DELETE.  I have not tested, but it also appears from the docs that the tag will be created if it does not already exist, which is a huge plus.  I will check over the weekend when I update my own SDK and see if that is true or not.  Otherwise, give it a whirl and see.  Worse case, you need to delete a tag from UCRM.

Ubiquiti Employee
Posts: 3,817
Registered: ‎12-10-2015
Kudos: 1347
Solutions: 297

Re: API question

Hi, regarding the subscriptions, there currently 2 ways how it can be setup and handled:
1) directly in UCRM, UCRM can craete and manage subscriptions of specific gateways (Stripe, Authorize.Net, PayPal, IPpay, MercadoPago)
2) using custom Plugin. But once a subscription is created by a plugin, it must be also handled by the plugin (it can't be pushed into UCRM) - read more https://community.ubnt.com/t5/UCRM-Plugins/Custom-payment-gateway-integration-using-a-plugin/m-p/262...

Curently we don't plan, to enable WISPs to create a subscription in a plugin or another 3rd party tool and then push it into UCRM.
New Member
Posts: 41
Registered: ‎04-07-2017
Kudos: 38
Solutions: 1

Re: API question

Sorry it took me a bit to get back to you I have FINALLY gotten to the point where I can start dealing with this. It seems you have to use an existing client tag (curlopt_url "https://...........com/api/v1.0/clients/470000162/add-tag/6"); which works just fine with me.

 

I am developing my own online signup form from my website, with stripe payment and pushing data to the crm, just about done alpha testing and going to let it go into the wild in a few days. Everything seems to be working thus far.

 

Thanks for your help 

 

Ronn

Reply