Home / Servers / Square API / create_payment

CreatePayment

An MCP tool from the Square API server, hosted on mcp.hjlabs.in.

CreatePayment Creates a payment using the provided source. You can use this endpoint to charge a card (credit/debit card or Square gift card) or record a payment that the seller received outside of Square (cash… [POST /v2/payments]

Name on the gateway: square_api__create_payment · may change things.

Parameters

NameTypeDescription
source_id requiredstringThe ID for the source of funds for this payment. This could be a payment token…
idempotency_key requiredstringA unique string that identifies this CreatePayment request. Keys can be any…
amount_moneyobjectThe amount of money to accept for this payment, not including tip_money. The…
tip_moneyobjectThe amount designated as a tip, in addition to amount_money. The amount must…
app_fee_moneyobjectThe amount of money that the developer is taking as a fee for facilitating the…
app_fee_allocationsarrayDetails pertaining to recipients of the application fee. The sum of the…
delay_durationstringThe duration of time after the payment's creation when Square automatically…
delay_actionstringThe action to be applied to the payment when the delay_duration has elapsed.…
autocompletebooleanIf set to true, this payment will be completed when possible. If set to false…
order_idstringAssociates a previously created order with this payment.
customer_idstringThe Customer ID of the customer associated with the payment. This is required…
location_idstringThe location ID to associate with the payment. If not specified, the main…
team_member_idstringAn optional TeamMember ID to associate with this payment.
reference_idstringA user-defined ID to associate with the payment. You can use this field to…
verification_tokenstringAn identifying token generated by payments.verifyBuyer(). Verification tokens…
accept_partial_authorizationbooleanIf set to true and charging a Square Gift Card, a payment might be returned…
buyer_email_addressstringThe buyer's email address.
buyer_phone_numberstringThe buyer's phone number. Must follow the following format: 1. A leading +…
billing_addressobjectThe buyer's billing address.
shipping_addressobjectThe buyer's shipping address.
notestringAn optional note to be entered by the developer when creating a payment.
statement_description_identifierstringOptional additional payment information to include on the customer's card…
cash_detailsobjectAdditional details required when recording a cash payment (source_id is CASH).
external_detailsobjectAdditional details required when recording an external payment (source_id is…
customer_detailsobjectDetails about the customer making the payment.
offline_payment_detailsobjectAn optional field for specifying the offline payment details. This is intended…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "square_api__create_payment",
  "arguments": {
    "source_id": "…",
    "idempotency_key": "…"
  }
}

Or connect the Square API server directly, which lists 308 tools including this one:

Run in your terminal
claude mcp add --transport http hj-square-api https://mcp.hjlabs.in/mcp/square-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the createpayment tool with source_id set to ….

More from Square API