how to update subscription trail period in paypal using rest api for react.js - reactjs

How can I update my subscription trial period for a monthly plan using rest API for react.
I have searched in the rest api section but didnt find any.

The Update Subscription API call allows patching the /plan/billing_cycles object. The details of what is possible are documented there so I'm not sure what your question is about.

Related

API for fetching Support tickets for a user from salesforce

I am working with Salesforce API and need to fetch all the support tickets against a user but I am not able to find any REST API for fetching the tickets.
Can anyone let me know if there is such REST API is there?
There is no standard object in Salesforce called a Support Ticket. You may be using the Case standard object, or a custom object; regardless, it won't have its own API endpoint.
You'll want to use the Query REST endpoint to execute a SOQL query to locate the records you need.

Get live Exchange rates with coinbase api

I want to get live lists of all the exchange rates with Coinbase API. I realize that by using this: https://coinbase.com/api/v1/currencies/exchange_rates, I always get the same values, I guess these values change once per day. Is it possible to get live rates?
The simplest way to get nearly realtime data is to use one of the official or unofficial APIs. There exists a function you can use to receive the real time data you want. Coinbase API Reference
Edit 1: As an alternative, you can use the following links for receiving the Buy and Sell prices.
I don't know if this public API is as reliable as an authenticated access.
Edit 2: Even better: The spot price API Endpoint.

Salesforce - HubSpot API calls

in my current company we are using Salesforce and HubSpot, and we have synchronized Contacts and Leads.
HubSpot does around 7000-8000 daily api calls, but I do not know what is the frequency HubSpot connects to Salesforce, or if there are some ways to reduce this number.
Thanks.
Salesforce limits its API calls with the edition and licenses you have see this link
(https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm)
and for reducing the api calls from Hubspot end follow this link
(http://knowledge.hubspot.com/salesforce-integration-user-guide/how-to-adjust-your- salesforce-api-call-limit)
If you go over you're API call quota, Salesforce will send you an automated email letting you know of the overage.
The usage limit for the lowest edition of Salesforce is 15,000. If you're currently at 8k/day, I wouldn't worry yet.

Integrating application shopping cart with PayPal through PayPal API

I need to integrate PayPal with my client AngularJS app, where the app visitors can donate specific amounts of money based on various causes, but not sure where to start? My client requested that visitors can select cause, amount to be donated, then get routed to Paypal to enter their details, process payment then finally routed back to the app for (thank you page) which should receive payment confirmation as parameter.
I've skimmed through the PayPal developers API and can see that there are a lot of options / features offered but not sure really where to start and which is the best approach to accomplish my client needs? Shall I use REST API? or will simple button integration do the job? What if I need to add causes selected to Paypal checkout page? Can I do this using the API? Thanks
If you don't have some specific reason to use REST I would recommend just going with the Classic API, specifically Express Checkout. It's much more mature and provides a lot more freedom to integrate with different options and customization.
With Express Checkout you'll be using the following calls.
SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment
You'll call SEC and that will return a token. Then you'll redirect the user to PayPal with that token appended to the URL. The user signs in and approves the payment, and they're returned to a URL that you supply in the SEC request.
At that URL you can call GECD to obtain all the details about the buyer. This allows you to tae their address and apply any shipping or tax rules you need to so that you can present a final review before the user would approve the payment, which is when you trigger DECP to finalize the transaction.
There are various options with that flow. For example, GECD is optional, and depending on your flow you may or may not need a final review, so you could skip straight to DECP and display nothing but a final receipt page when the user gets back to your site if you want to.
If you happen to be using PHP my class library for PayPal will make all of this very simple for you.

Re-activating Paymill subscription, and updating Credit Card info

Paymill's API is awesome. It's a blaze to work with, and I should be up&running, were it not for an edge case. Context is a SAAS app, with a demo trial, and the ability to upgrade & downgrade at will.
User cancels her subscription: at this point, her account remains active until the pre-payment date. Paymill receives 2 API calls:
DELETE call for https://api.paymill.com/v2/subscriptions/
DELETE call for https://api.paymill.com/v2/payments/
Scenario: She changes her mind, and tries to upgrade again. So far, I've tried modeling this via:
Doing a POST to https://api.paymill.com/v2/subscriptions with client, offer, and payment info -similar to the original subscription- returns Payment error: Subscription already connected
Doing a PUT to https://api.paymill.com/v2/subscriptions/ with payment info (according to Paymill API: How do I update a subscription's credit card? ) returns Payment error: the Subscription was canceled
Desired output is Continuing Subscription: no credit card charges are made until the next monthly period, and further CC charges are applied via the new payment info.
In what ways can this be achieved?
Many thanks!
Let me start by saying that the POST you described should be possible to execute. This is currently a bug, and this will be fixed sometime next week.
But your use case is, unfortunately, not supported at the moment. We are working hard to make our subscriptions feature more powerful, while retaining the simplicity of usage. We cannot offer a timeline for this, but we would love to hear more about your case.
Currently, merchants are encouraged to manage the subscriptions on their own, as this is not a simple matter of changing the amounts being charged on the next subscription's due date. For instance, if a client of yours decide to downgrade, would you make a pro-rata refund of the excess? Same for upgrade: would you charge the full amount of the new subscription on the due date, or a pro-rata of the old subscription + pro-rata of the new?
That said, I'd encourage you to keep an eye on our blog for announcements of an improved subscriptions handling.
Disclosure: I work at PAYMILL.

Resources