Integration of Java-based POS & Kiosk with Square Devices

Hello,

I have a quick question regarding Square device integration.

We (https://chalkboardstoday.com/) have developed our Point of Sale (POS) and Self-Service Kiosk applications using Java & JavaFX. We would like to integrate these applications with Square Devices to accept in-person credit card payments.

Could you please provide details on the following:

Which API/SDK should we use to integrate with Square for in-person payments?
Which Square device (Square Reader, Square Stand, or Square Terminal) is best suited for our integration requirements?
Any additional documentation or setup guidelines that would help with the integration process?

Looking forward to your response.

Best regards,
Ravi

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Point of Sale API and POS Integration Tools
Reader SDK Quickstart
Reader SDK Quickstart

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

To integrate your POS and Self-Service Kiosk applications with Square for in-person payments, you can use the Terminal API or Mobile Payments SDK.

The Terminal API allows your POS application to process purchases using a seller’s Square Terminal device. The Mobile Payments SDK lets developers embed the Square checkout flow and accept in-person payments in custom applications using Square Readers.

As for the hardware, the choice between Square Terminal, Square Reader, or Square Stand depends on your specific use case and requirements. Square Terminal combines hardware and software and can be accessed from a third-party POS application. Square Reader is a device that reads contactless cards, Apple Pay, Google Pay, and chip cards. Square Stand is an iPad stand with a built-in card reader for tap, dip, and swipe scans. :slight_smile:

Hi Bryan, We have purchased one New Square Terminal and tried to integrate it with my JavaFX POS machine. we tried to create Virtual checkout , we are getting 400 Bad Request error. we need to collect order amount + tip amount . can you give me one simple json example please ? we tried in SQUARE API explorer, we got the same 400 BAD request response… Please help me out…

Thanks,
Ravi Repaka

Yeah, of course. This is what I use for testing all the time:

{
    "idempotency_key": "{{$guid}}",
    "checkout": {
      "amount_money": {
        "amount": 100,
        "currency": "USD"
      },
      "device_options": {
        "device_id": "{{device_id}}"
      },
      "order_id": "{{order_id}}"
    }
  }

:slight_smile:

Hi Bryan,
Thanks for quick response.

URL: https://connect.squareup.com/v2/payments
Request JSon : {
“idempotency_key”: “Uniq23”,
“checkout”: {
“amount_money”: {
“amount”: 100,
“currency”: “USD”
},
“device_options”: {
“device_id”: “438CS149B8002517”
},
“order_id”: “Order34”

}

}

Got response like below:
{
“errors”: [
{
“code”: “VALUE_EMPTY”,
“detail”: “Field must not be blank”,
“field”: “source_id”,
“category”: “INVALID_REQUEST_ERROR”
}
]
}

My phone number is 408 515 0064 , we can discuss on the phone if you want…

Oh, that’s the base path URL for CreatePayment. I thought you wanted to take a payment with Terminal API? The path for that call is https://connect.squareup.com/v2/terminals/checkouts.

Also the order_id needs to be an order created with our Orders API. :slight_smile:

Hi Bryan,

I apologize for the confusion, and I appreciate your patience. I am new to Square Payments, so please bear with me.

Here is my requirement:

We have a POS system (Chalkboards) built with JavaFX, where we create orders on our end.
We want to process customer payments using a Square Terminal, collect the payment response, and save it in our Chalkboards order. We do not want to create an order on the Square side—just use the Square Terminal for payment processing.

That’s it. What steps do I need to take to achieve this? Which APIs should I use? Please explain in detail.

Sorry for the trouble, and thank you for your help.

Best regards,
Ravi Repaka

Okay, then you’ll make a request like this:

{
    "checkout": {
      "amount_money": {
        "amount": 100,
        "currency": "USD"
      },
      "device_options": {
        "skip_receipt_screen": true,
        "tip_settings": {
          "allow_tipping": true,
          "custom_tip_field": true,
          "separate_tip_screen": true
        },
        "device_id": "{{device_id}}"
      },
      "note": "hamberger",
      "reference_id": "232323223"
    },
    "idempotency_key": "{{$guid}}"
  }

:slight_smile: