Skip to content

Payments

Open .md

API reference Invoices and payments

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/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/paymentRecords a payment you received outside YoPrint, such as cash, a check or a bank transfer.
  • PUTRecord a refund of a payment/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{id}/refundRecords that you gave back some or all of a payment outside YoPrint.
  • GETList the payments of a sales order/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/paymentReturns every money record on an order, newest first and all at once (no pagination): payments, refunds, customer credit moves (subtype TRANSFER), voided card payments, Shopify payments, and payments the customer made in the customer…
  • GETGet one payment of a sales order/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_reference}Returns one money record of the order (a payment, refund or credit move), with the same fields as the list, dispute fields included.
  • POSTPay an order from the customer's credit/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/credit/pay_with_customer_creditUses the customer's credit balance to pay part of the order.
  • PATCHMove all of an order's payments to customer credit/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/credit/refund_all_to_customer_creditMoves everything paid on the order to the customer's credit.
  • POSTMove part of an order's payments to customer credit/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/credit/refund_to_customer_creditTakes some of what the customer paid on this order and keeps it as their credit, to use on another order.
  • PUTRefund a card payment through the gateway/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment_gateway_refund/{id}Refunds a card payment through the gateway that took it: real money goes back to the card.
  • PUTUpdate a recorded payment/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_reference}Changes a recorded payment's date, references and, for a payment recorded in YoPrint, its payment method.
  • DELETEDelete a payment or refund/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_reference}Deletes a payment or refund record from the order.

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/v1/api/store/{team_slug}/sales_order/{hash_id}/square_terminal/createThe older path for starting a Square Terminal checkout.
  • POSTCheck a pending card payment (v1, not usable)Legacy · deprecated/v1/api/store/{team_slug}/sales_order/poll_pending_paymentMeant to check a pending card payment.
  • PUTRefund a card payment (v1)Legacy · deprecated/v1/api/store/{team_slug}/sales_order/{hash_id}/payment_gateway_refund/{id}The older path for refunding a card payment.
  • POSTCharge a card through the gateway (v1)Legacy · deprecated/v1/api/store/{team_slug}/sales_order/{hash_id}/payment/{payment_gateway}The older path for charging a card ({payment_gateway} is the gateway name).
  • POSTPrepare a card payment (v1)Legacy · deprecated/v1/api/store/{team_slug}/sales_order/{hash_id}/payment/{payment_gateway}/pre_executeThe older path for preparing a card payment.
  • PATCHCancel a Square Terminal checkout (v1)Legacy · deprecated/v1/api/store/{team_slug}/sales_order/{hash_id}/square_terminal/{checkout_id}/cancelThe older path for cancelling a Square Terminal checkout.
  • POSTStart a Square Terminal checkoutInternalMoves money/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/square_terminal/createSends a payment request for this order to a Square Terminal device; the customer pays on the device.
  • POSTCheck a pending card payment (not usable)Internal/v2/api/store/{team_slug}/v2/sales_order/poll_pending_paymentMeant to check a pending card payment from Charge a card (with its poll_token).
  • POSTPrepare a card paymentInternal/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_gateway}/pre_executeCard payments run through the team's connected payment gateway and charge real money.
  • POSTCharge a card through the payment gatewayInternalMoves money/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_reference}Card payments run through the team's connected payment gateway and charge real money.
  • PATCHCancel a Square Terminal checkoutInternal/v2/api/store/{team_slug}/v2/sales_order/{hash_id}/square_terminal/{checkout_id}/cancelCancels a Square Terminal checkout that is still waiting.