Recurring payments using checkout call and checkout UI in square connect - square-connect

I already integrate Square api in .net application using 'checkout' api.
https://connect.squareup.com/v2/locations/" + locationID + "/checkouts
and checkout UI provided by Square (https://connect.squareup.com/v2/checkout?c=XXXXX).
It is working fine now.
My new functionality is to subscribe a plan and pay using the square. When i search, I found out that I need to create customer and customercard and need to charge the customer card by using 'charge' api.
Is there any provision to use the 'checkout' api for the subscription...? If it is no, Is there any built in UI for charge api implementation...?
whether I need to implement my own UI for capturing the card details...?
Thanks in Advance

There is no provision for using the checkout API for recurring payments at this moment.
There is no pre-built UI for the charge API, that is essentially what the Checkout API is.
You will need to implement your own UI using the PaymentForm as well as some way to capture customer details so that you can create a customer to attach the card nonce to.
Hope that helps.

Related

Paypal V2 PHP Checkout SDK

I`m building an application using Laravel with Paypal PHP SDK, and everything was working normally, but today when I wanted to make some tests on checkout, I faced some errors, Paypal securely login stopped working, and as I checked, it seems that Paypal PHP SDK Link is now deprecated, and we have to use new SDK for API V2 Link.
I downloaded the new PHP SDK, but from the documentation, they only provided sample on how to create an Order with the SDK, and no sample provided for creating Payments.
My first question, what is the difference between Order V2 and Payment V2?
Question number 2, is there any example for how to create payment with the new PHP SDK? because I need to make the user able to click on purchase button and pay with Paypal with PHP.
The v2 SDK uses Orders for the payment approval process (instead of PAYIDs). 'v2 Payments' refer to what you get when you capture/authorize an order i.e. transaction/authorization objects.
The way you create a 'Payment' in v2 most simply is you first create an order with intent:capture, and you pass that orderid to the front-end UI https://developer.paypal.com/demo/checkout/#/pattern/server , and after approval you capture it (equivalent to v1 execute).
Capture results in a capture id, which is a v2 payment object (equivalent to a v1 sale id). This id is what will show in paypal.com account, and the only thing you need to persist for accounting purposes.
The changes can seem confusing at first, but the new system is better.

Using cashier capabilities without stripe?

Stripe and Braintree are not available in my location, so I've to use Paypal.
I'm trying to figure out the technicalities and best practices , since it's my first time integrating payments.
I'm also trying to figure how to smoothly go from a register + free access, to register + pay to access
Questions:
I want to make it a smooth transition when I decide to start charging my users for access. What do I need to set-up beforehand? Currently I haven't launched yet so I want to prepare everything I need.
Can I use cashier to manage access for users that paid but while I'm using paypal and not stripe like cashier use? (i mean to use some of cashier functionality).
note: I found a package on github (https://github.com/srmklive/laravel-paypal) that integrates paypal into a laravel app, but it uses a deprecated api from 2017.

Delay Paypal payment - Braintree APIs

I am developing a website that offers car-washings in all places publicly available through geolocation. However, due to weather instability, bookings can be cancelled at any time; instead of issuing expensive refunds, I would like to charge customers only once the washing has been performed.
I would like to accept Paypal payments and was suggested to use Braintree. Do you know if it is possible to delay charges with Braintree APIs on Paypal accounts?
I use Laravel 5.1.
Thank you
I would recommend using PayPal Preapproval profiles, specifically the Preapproval API to setup the profile, and then you would use the Pay API to process payments using the preapproval key for a given customer.
This PayPal PHP SDK makes all of those API calls very quick and easy, and it's available on Packagist so you can load it up in your composer.json for Laravel and be running in no time.
It has samples and empty templates for you to work with to make the Preapproval and Pay calls.

What i have to do in my app to receive payments? (java - spring)

I am developing a portal where users to access, must buy a plan. This portal is being developed with angular + spring.
To purchase the plan will have to be through PayPal or by entering the credit card information.
I know that PayPal has an API for this case and I have no doubt.
How can I do to implement this logic payments with credit cards? The server part is java soon recommend the use of a service, it must be compatible with Java.
thanks
You should use Paypal Java SDK (https://github.com/paypal/PayPal-Java-SDK). The repository contains working example of performing REST calls to Paypal API, so it should be easy to create a specific Spring service within your app to make use of these calls.

Downloading existing paypal payments with rest api

I need to download all existing payment information from a paypal account to do some analysis on it, so I set up paypal's ruby rest sdk, which involved creating a new application with its own API keys and whatnot. I can make a successful request with the following:
payment_history = Payment.all( :count => 10 )
However,
payment_history.payments
Is empty.
I'm not sure if this application can only access payments created with it? Can I not get pre-existing payments with the rest api? I would prefer to use ruby, if that's possible, as I would like to keep this all within the simple script I have to analyze similar stripe payments.
Some guidance would be extremely appreciated, as paypal's labrinth of documentation and overlapping APIs have me pretty confused.
You will be able to query only those payments that are made or created with Rest API not the Classic APIs. You can use the Classic Ruby SDKs for the appropriate product to get the Transaction details of the classic APIs

Resources