Can't start a campaign using foursquare api - foursquare

I have a venue which is currently running 1 active campaign, 1 scheduled campaign, and 1 pending campaign. If I start the pending campaign using the api it throws an error "the following venues already have 2 active specials"

Related

Subscription to Paginated Report

I have created a paginated report and set up a subscription for excel extract to be emailed to me every day at 8 am. The subscription works for day 1 then the next day I get an error message saying that I need to update the subscription.

Handle cancellation of in app subscriptions in chrome extension

I have developed a chrome extension, I am trying to integrate in-app subscriptions using google.payments.inapp APIs, however while testing I found that if user cancels in-app subscription, the status from API shows ACTIVE instead of CANCELLED. Below is code that I am using to fetch purchased in-app subscriptions by user
google.payments.inapp.getPurchases({
'parameters': {env: "prod"},
'success': ami_onLicenseUpdate,
'failure': ami_onLicenseUpdateFailed
});
I am always receiving below response on success, even if user has cancelled subscription
{"response":{"details":[{"kind":"chromewebstore#payment","itemId":"xxxxxxxxx","sku":"xxxxxx_01","createdTime":"1509281736005","state":"ACTIVE"},{"kind":"chromewebstore#payment","itemId":"xxxxxxx","sku":"xxxxxxx_02","createdTime":"1508736958450","state":"ACTIVE"}]}}
How do I know if user has cancelled subscription?
After doing some research and testing, I found that if user is in subscription's trial period and user cancels subscription, google payment api will return subscription as active and once that trial period is over, it will not return any license related information for that subscription in api response. This way we can identify if user has active subscription or no.
One more note, for those who work with subscriptions.
Received from Chrome Web Store team:
After the cancellation, a user still will be able to access to your item until the next billing cycle starts and the extension should stop working after the subscription period is over (Monthly or Yearly). Therefore, the API is still responding back as "Active" right after the cancellation was initiated.

On recurring billing, is it possible to get declined payments back?

In our system we use Automated Recurring Billing for our members. We check our users subscription status from Recurring Billing API. We check failed payments from Transaction Reporting API and it appears that some of the subscriptions status code return “active” from API even not charged. Let me give a scenario about it :
A user has an ARB monthly subscription which payment cycle is 14th of every month. User has been successfully charged for 3 months. But on 4th payment, we saw that the payment failed and response code from API is “this transaction has been declined”. We think that credit card expiration info may be failed and user may update it. So we put the user in a grace period(two days) and let user update credit card information. If user updates credit card information in two days we call API to update subscription with new credit card info. Let’s say this update subscription request is done on 16th of the current month. Can we get the payment which has passed on 14th ? Or has user been charged on 16th which update subscription request is sent and is ARB payment cycle changed from now on ? Or user will be charged on the next month and we can not get failed payment ?
I could not find any details about failed transactions payment flow when credit card info is updated. Thanks in advance.
A failed subscription payment won't be retried after you update the customer profile. However, you can use the updated custer profile to make your own one-time payment.

Booking Engine Payment Gateway Logic

I am developing a booking engine in node js & Parse for a hotel website. In this I am checking for availability twice. Once when user fills all booking details and other before going to payment gateway. The payment gateway (CCAvenue) has success and cancel URL where they post data as per users behaviour. But the problem here is that if the tab is closed by the user there is no event called by the payment gateway. I can open this payment gateway page in new tab. But still I want the booking id of the booking cancelled due to tab close.
NOTE: I am creating booking with PENDING status and updating the status to ACTIVE when payment is successful.
The simpler answer is to update to PENDING status and also a "Pending Expire DateTime". Make this whatever works for your business. Maybe 1 Hour.
Then if they have NOT posted a payment successfully within one hour then you change the PENDING to "FailedDeposit" and allow the room to be booked again.
Make sure your user is aware of that they have to pay deposit and do NOT give them a confirmation until after the payment is received. The user doesn't need to know that you are holding the room for them. They should believe that they are not confirmed until they pay.

After how long do venue checkins expire?

My script is currently monitoring the hereNow value for a couple of venues. When working with this data, though, I do not want to count the same checkins twice; when a user checks into a venue, after how long does this checkin expire?
The hereNow count reflects the number of users currently checked in at a venue. Polling the hereNow count of a venue to determine the number of unique users who check in at a venue is not recommended, and will not work reliably. If you are the manager of the venue, you can use the venue manager API, or the venue push API to get reliable data about how many users have checked in at the venue.

Resources