CData Python Connector for Square

Build 26.0.9770

PayOrder

Completes payment for an order. Payment IDs must cover the total order amount. This is a Beta API.

Stored Procedure Specific Information

Execute

You need to provide the OrderId and an IdempotencyKey to complete payment for an order. Note: This is a Beta API.

EXECUTE PayOrder OrderId = 'CAISENgvlJ6jLWAzERDzjyHVybY', IdempotencyKey = 'pay-order-20240721-001'

You can optionally provide OrderVersion for optimistic concurrency control:

EXECUTE PayOrder OrderId = 'CAISENgvlJ6jLWAzERDzjyHVybY', IdempotencyKey = 'pay-order-20240721-001', OrderVersion = 2

You can optionally provide a single PaymentId to specify which payment to collect:

EXECUTE PayOrder OrderId = 'CAISENgvlJ6jLWAzERDzjyHVybY', IdempotencyKey = 'pay-order-20240721-001', PaymentIds = 'bP9masyFnTn3xGMjRe7FhkF6MJB'

You can provide multiple comma-separated PaymentIds when the order is covered by more than one payment:

EXECUTE PayOrder OrderId = 'CAISENgvlJ6jLWAzERDzjyHVybY', IdempotencyKey = 'pay-order-20240721-001', PaymentIds = 'bP9masyFnTn3xGMjRe7FhkF6MJB,GQTFp1ZlXdpoW4o6eGiZhbjosiDZY'

You can provide all inputs together:

EXECUTE PayOrder OrderId = 'CAISENgvlJ6jLWAzERDzjyHVybY', IdempotencyKey = 'pay-order-20240721-001', OrderVersion = 2, PaymentIds = 'bP9masyFnTn3xGMjRe7FhkF6MJB,GQTFp1ZlXdpoW4o6eGiZhbjosiDZY'

Input

Name Type Required Description
OrderId String True The ID of the order being paid.
IdempotencyKey String True A unique value that identifies this request to prevent duplicate payments if the call is retried.
OrderVersion Integer False The version of the order. If omitted, the latest version is used.
PaymentIds String False Comma-separated payment IDs to collect. The total of all payments must match the order amount.

Result Set Columns

Name Type Description
OrderId String The ID of the paid order.
State String The current state of the paid order (COMPLETED).
Success Boolean Whether the operation was successful.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770