Where is the full development reference including list of methods available?

Is there a full reference for square development somewhere? I’m trying to setup a site to use Square’s checkout-api, and I got a page setup to create a payment link (createPaymentLink), and I even get a response, but it took me 10 minutes just to figure out how to easily access the payment link URL that gets returned (without having to try to parse it out of the full JSON that is returned. It turns out that it’s as easy as

$api_response->getResult()->getPaymentLink()->getUrl()

But why did I have to dig through source code to find that?!? There are 2 separate locations for help just on the Checkout API. These 2 links…

But neither of them list the methods available to use when developing. I’ve been looking for 2 days, but cannot find a list anywhere. I even did a search of the Square documentation site for “checkout api geturl” and nothing is returned. I did a Google search for the same, and still nothing came up. How is anyone supposed to know that this method exists when they just want the URL that is returned from an api response to the createPaymentLink method? Am I missing something, or is the Square documentation missing a lot?!?

esto solo nos hace saber que no supieron realizar la documentaciòn, literalmente perdi 5 dias de mi vida implementando este api de pagos nueva. adivinando literalmente como tu lo hiciste. al fin lo logre, consegui la url tambien asi

$apiResponse = $client->getPaymentsApi()->createPayment($body);
$payment = $apiResponse->getResult()->getPayment();
$data = $payment->getReceipturl();

Thanks for the feedback. When you were using the API Reference did you switch it to the language you are using? That contains the response objects.


:slightly_smiling_face:

Bryan, thank you for your response.

Yes, I switch the language to PHP on every square page I go to that shows code. And I do see the response, but all that shows me are the objects. I would still have to parse the object myself to get the data I want. After digging through source code in the PHP SDK, I found the getUrl() function that I could call to get the URL in a single command like this
$api_response->getResult()->getPaymentLink()->getUrl();

Where on the Square site can I find that info? I tried searching the entire Square site for it, including the built-in search, and nothing for “getUrl” comes up. I even tried doing a google search for “Square PHP getUrl” and nothing comes up. How are developers supposed to know about all of the functions or methods that are available to use if they’re not listed or even referenced anywhere by Square? It seems like the Square SDK is missing some majorly useful developer references and information.

We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

If you’re looking for the API call detailed documentation, for example with PHP you can find the details at (hoping this is the correct version!):

I found this with Google - search for the exact call you want information on, and scroll down until you find the github-based readme.md, with similar URL to the above - sometimes quite a way down.

Square/Bryan - the way the language dropdown works currently is really useful, makes things really simple except for just one thing - when you want details on setter/getter functions and arguments. It would be super ideal if a link to the detailed doco on the language call could be provided on the API page there, ideally so the link changed as the language changed. It’s currently really hard to find in Google.

I realize that’s probably a lot of work, so not expecting anything fast, but just thought I’d clarify what was being asked here.

BrianC, thank you for the link. I had not been reading any of the documentation on Github because I assumed anything there would also be on the actual square developer site too.

For anyone also looking for an answer to the original question, the page below actually does show the getter / setter functions for the payment link response.