Payments
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/payments.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
Payments, refunds and customer credit on a sales order: payments you record yourself, card payments through a connected gateway, and Square Terminal checkouts.
Learn more: Invoices and payments · Take payments and refunds
10 operations
- POSTRecord a payment on a sales order
/Records a payment you received outside YoPrint, such as cash, a check or a bank transfer.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment - PUTRecord a refund of a payment
/Records that you gave back some or all of a payment outside YoPrint.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {id}/ refund - GETList the payments of a sales order
/Returns every money record on an order, newest first and all at once (no pagination): payments, refunds, customer credit moves (v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment subtypeTRANSFER), voided card payments, Shopify payments, and payments the customer made in the customer… - GETGet one payment of a sales order
/Returns one money record of the order (a payment, refund or credit move), with the same fields as the list, dispute fields included.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_reference} - POSTPay an order from the customer's credit
/Uses the customer's credit balance to pay part of the order.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ credit/ pay_with_customer_credit - PATCHMove all of an order's payments to customer credit
/Moves everything paid on the order to the customer's credit.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ credit/ refund_all_to_customer_credit - POSTMove part of an order's payments to customer credit
/Takes some of what the customer paid on this order and keeps it as their credit, to use on another order.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ credit/ refund_to_customer_credit - PUTRefund a card payment through the gateway
/Refunds a card payment through the gateway that took it: real money goes back to the card.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment_gateway_refund/ {id} - PUTUpdate a recorded payment
/Changes a recorded payment's date, references and, for a payment recorded in YoPrint, its payment method.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_reference} - DELETEDelete a payment or refund
/Deletes a payment or refund record from the order.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_reference}
Legacy and internal (11)
Prefer the operations above. Legacy operations name their replacement; internal ones are built for YoPrint's own apps.
- POSTStart a Square Terminal checkout (v1)Legacy · deprecated
/The older path for starting a Square Terminal checkout.v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ square_terminal/ create - POSTCheck a pending card payment (v1, not usable)Legacy · deprecated
/Meant to check a pending card payment.v1/ api/ store/ {team_slug}/ sales_order/ poll_pending_payment - PUTRefund a card payment (v1)Legacy · deprecated
/The older path for refunding a card payment.v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ payment_gateway_refund/ {id} - POSTCharge a card through the gateway (v1)Legacy · deprecated
/The older path for charging a card (v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ payment/ {payment_gateway} {payment_gateway}is the gateway name). - POSTPrepare a card payment (v1)Legacy · deprecated
/The older path for preparing a card payment.v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ payment/ {payment_gateway}/ pre_execute - PATCHCancel a Square Terminal checkout (v1)Legacy · deprecated
/The older path for cancelling a Square Terminal checkout.v1/ api/ store/ {team_slug}/ sales_order/ {hash_id}/ square_terminal/ {checkout_id}/ cancel - POSTStart a Square Terminal checkoutInternalMoves money
/Sends a payment request for this order to a Square Terminal device; the customer pays on the device.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ square_terminal/ create - POSTCheck a pending card payment (not usable)Internal
/Meant to check a pending card payment from Charge a card (with itsv2/ api/ store/ {team_slug}/ v2/ sales_order/ poll_pending_payment poll_token). - POSTPrepare a card paymentInternal
/Card payments run through the team's connected payment gateway and charge real money.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_gateway}/ pre_execute - POSTCharge a card through the payment gatewayInternalMoves money
/Card payments run through the team's connected payment gateway and charge real money.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_reference} - PATCHCancel a Square Terminal checkoutInternal
/Cancels a Square Terminal checkout that is still waiting.v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ square_terminal/ {checkout_id}/ cancel
