How to get recent sales from Square API? - square

I'm a developer and am new to Square.
We are going to enter sales into the Square app on iPads and I have to send the sales and payment information automatically and asap to NetSuite (a cloud ERP system)
I'm reading the API docs and can't see a way to run some code when a sales
order is created. Is there a way?
If the answer to 1 is no then which part of the API can I call periodically to request a list of all sales orders since the last time I asked?

Have you looked into using webhooks to be notified when a transaction takes place? Once you receive a notification from the webhook you can then call the appropriate endpoint to get the information you want to send to NetSuite.

Related

How to set trial period in shopify app?

I have created shopify app and setting up billing Api. In the App, I want to apply trial period of 20 days. I have created the charge during the app installation and send customers to confirmation url so that they can accept or decline the charge.. So I want to know that if customer decline the payment charge, then can he uses the app featurs till trial period?
If a customer declines the subscription, you still get the confirmation URL callback. Examine the charge. The status will say declined. At this point you can kill off their DB token and destroy their session. This will ensure they cannot use your App as they declined the terms.
It is one bad aspect of the whole billing scenario. I have lots of customers that are faced with a question they don't read. So they assume the trial you offer for free is activated by declining the subscription. Silly customers... still cannot operate the Internet :)

Paypal Pro API for monthly payment with variable amount each month

I need suggestion for paypal pro API which allow me to pass variable amount each month. For some months,it can be zero too.
I tried with UpdateRecurringPaymentsProfile but it gives me error of 11592 (Subscription profiles are not supported for recurring payments).
Please someone help me with easiest solution.
Based on the error you mentioned it sounds like you're using a PayPal Standard Subscription button, not Pro. If that's the case, then as the error says, you cannot update standard subscriptions with the APIs. You would have to use the recurring payments API to create the profile in order to then update it.
That said, you won't be able to do variable amounts with recurring payments profiles. you can only raise them by 10% every 120 days, so that typically doesn't work with what you're trying to do.
Instead, you'll need to use reference transactions. So if you're using Payments Pro that will be real simple. You just pass in the transaction ID of an original authorization or sale transaction along with a new amount you need to charge. PayPal uses the card details on file to process the new amount.
If you're using DoDirectPayment then you'll use DoReferenceTransaction for the future payments. If you're using PayFlow you would use the PayFlow API, of course, and change the parameters to match a reference transaction request.
You can also do the same thing with PayPal Express Checkout, but in that case you'll need to include billing agreement parameters in the SetExpressCheckout request, and then you'd use the billing agreement ID you get back from that in the DoReferenceTransaction request.
In any case you'll need to build your own script to run everyday, pull profiles that need to be charged, and charge them accordingly.

PayPal API call daily limit

Does anyone know how many API calls PayPal allow each day? I'm using GetRecurringPaymentsProfileDetails to check if payment has been successfully made and I might be doing the API call a lot of times each day. They have the error code on their docs but didn't specify the rate limit.
Thanks
I've never run into any daily limit issues with API calls. That said, I try to avoid hitting the API that many times.
I would recommend you take a look at Instant Payment Notification (IPN). It will automatically POST details about transactions to a URL listener you have on your server. That script that receive the data and update your system accordingly. This happens in real-time so everything would update automatically and immediately. This way you don't have to hit the API to pull details because IPN will feed those details as they happen.

Shopify API - Payments

I have been reviewing the API documentation for Shopify and am trying to figure out if the cost of an item selected from the 'Store' can be passed in a Get command back to a different website so a different website can charge for the Item along with other charges from a website ...and then once the payment goes through on the website, send a POST to shopify that the sale was complete and proceed with fulfilling the order?
Our software is newspaper software so we provide newspapers with subscriber web portals were customers can sign up and pay for a newspaper subscription.
We would like to offer the ability to add Single Sales items to what a customer purchases and we want to be able to do it in one payment transaction
I have reviewed the various Shopify API documentation but it is not clear if the API supports getting cost info and posting a successful charge back to Shopify to complete the fulfillment step. We are looking to be able to GET the cost for a selected single sale item passed to us from the Shopify API so that we can add it to the Amount we pass to the Payment Gateway we integrate with and when the payment goes through, send Shopify a success on the payment.
The ultimate goal is to have a customer make one payment that can include single sales items as well as a newspaper subscription or day pass.
You should do a POST and create an Order using the Shopify API once (at your side) are sure the payment has gone through.

Getting ARB subscription information from Authorize.net using Active Merchant?

I'm trying to write a test to verify the start date and interval of an Authorize.net ARB subscription created via Rails + Active Merchant.
I can successfully create the sub using response = GATEWAY.recurring(...) and a I get a success code.
After the subscription is created, however, as far as I can see from the Active Merchant documentation I can't really request any info, like the start date for instance.
The only methods available for ARB are:
cancel_recurring recurring update_recurring
Am I missing something obvious?
The ARB API offers very limited reporting functionality. In fact all you can get through that API is the status of a subscription (ARBGetSubscriptionStatusRequest). The only other options available to you are to create (ARBCreateSubscriptionRequest), update (ARBUpdateSubscriptionRequest), and delete (ARBCancelSubscriptionRequest). This is not a RoR limitation. This is an API limitation. You can confirm this in the ARB Guide.
So, any information you want to keep track of related to a subscription (start date, end date, amount, etc) will need to be recorded by you in your database.
Authorize.Net does have a new Transaction Detail API which they are consistently enhancing. But as of right now it does not report the kind of information you are looking for.