List the payments of a sales order
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/payments/v2-sales-order-payment-index.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.
GET/
Returns 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 portal (action CUSTOMER_CHECKOUT) with their refunds and lost disputes (CUSTOMER_CHECKOUT_CHARGEBACK). It also lists the records YoPrint adds itself: credit a refund took back (ORDER_CREDIT_RECOVERY), credit given back when that refund failed (ORDER_CREDIT_RESTORED), and money returned to a payment when its card refund failed (REFUND_REVERSAL). Refunds and other money out have a negative amount.
Card payments also say whether they are frozen by a dispute (has_open_hold, payment_freeze_reason, payment_notices). {hash_id} is the order's id (for example V4keXwwxMQyXw7); the ord_ unique key is not accepted here.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The sales order's or quote's
id(a hash id). Theord_unique key and the order number do not work here.- Example
V4keXwwxMQyXw7
- Example
Request body
This operation takes no request body.
Response
200Successful response.
Newest first.
Fields of each item (36)
Signed: negative for
DECREASE(a 25.00 refund is-25000). Thousandths, an older encoding:12500is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5is 1.2345), or as a string ("1234.5") when you sendX-Yoprint-Decimal-Format: exact-v1. See Money and quantities.actionstring | nullORDER_PAYMENT,ORDER_REFUND,ORDER_CREDIT_DEPOSIT(paid from customer credit),ORDER_CREDIT_WITHDRAW(moved to customer credit),ORDER_CREDIT_RECOVERY,ORDER_CREDIT_RESTORED,CUSTOMER_CHECKOUT(paid in the customer portal, and its refunds),CUSTOMER_CHECKOUT_CHARGEBACK(a lost dispute), or the gateway:STRIPE,SQUARE,SQUARE_V2,PAYPAL,AUTHORIZE_NET,CHARGE_IT_PRO. AREFUND_REVERSALcarries its refund's gateway.credit_sourceobject | nullWhere a customer credit record came from. Always present; null on an order's records.
credit_source_payment_idstring | nullORDER_CREDIT_RECOVERYandORDER_CREDIT_RESTOREDonly: the payment the credit was issued from.customer_idstring | nullAlways null on an order's records.
customer_payment_funding_idstring | nullCustomer Portal payment rows and credit applied from one only: the customer payment it belongs to.
customer_payment_sourcesarray of objectsCustomer Portal rows only: the customer payments the money came from, each with
customer_payment_funding_id,funding_transaction_id,amount(a decimal string) andcurrency_iso.datestring (date-time) | nullWhen it was recorded (the payment date you sent). ISO 8601 with offset, or null.
delete_blocked_reasonobject | nullRecorded payments (
ORDER_PAYMENT) and card payments only: why Delete a payment or refund refuses it, or null when it can be deleted.codeiscredit_issued_from_payment(withamount, a decimal string) orprovider_payment_not_removable;messageis the refusal's text.directionstringINCREASE(payments, payments from customer credit,REFUND_REVERSAL,ORDER_CREDIT_RECOVERY) orDECREASE(refunds and lost disputes, moves to customer credit, card voids,ORDER_CREDIT_RESTORED).funding_payment_gatewaystring | nullCustomer Portal rows only: the provider (
STRIPE,PAYPAL,SQUARE_V2,AUTHORIZE_NET,CHARGE_IT_PRO) or null.has_open_holdbooleanList and Get only, on
STRIPE,PAYPALandSQUARE_V2card payments and Customer Portal payments: true while a dispute (or, for a Customer Portal payment, a review) is open.is_deletablebooleanfalse for card payments, Customer Portal payments, credit moves, card refunds, payments part of which moved to customer credit (and their refunds), refunds recorded against card payments, and the records YoPrint adds itself.
is_editablebooleantrue only for recorded payments (
ORDER_PAYMENT).negative_credit_amountinteger | number | string | nullCard refunds only: credit issued from the payment that the customer had already spent and the refund took back anyway, leaving their credit negative (usually 0). Thousandths, an older encoding:
12500is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5is 1.2345), or as a string ("1234.5") when you sendX-Yoprint-Decimal-Format: exact-v1. See Money and quantities.order_idstring | nullpayment_freeze_reasonstring | nullList and Get only, on
STRIPE,PAYPALandSQUARE_V2card payments and direct Customer Portal payments:chargeback_openorpayment_under_reviewwhile refunds and credit moves are refused, otherwise null.payment_gatewaystring | nullThe gateway (
STRIPE,SQUARE_V2and so on) for card payments and refunds; for a Customer Portal payment its provider (null when unknown), andCUSTOMER_CHECKOUTorCUSTOMER_CHECKOUT_CHARGEBACKon its refunds and lost disputes; null otherwise.payment_gateway_sourcestring | nullCard payments and refunds only: Square v2's source type (for example
CARD), otherwise null.payment_method_idstring | nullRefunds take their payment's; null for card payments and credit moves.
payment_noticesarray of objectsList and Get only, on the same payments as
has_open_hold: one notice per open dispute.Fields of each item (10)
amountobject | nullThe disputed amount as a decimal pair with
dp3, or null when the payment covered several orders.codestringdispute_openordispute_under_review; on Customer Portal payments alsopayment_needs_attention.currency_isostringcustomer_payment_funding_idstring | nulldeadline_atstring | nullWhen the response to the provider is due (ISO 8601), or null.
next_actionstringFor example
respond_to_providerorawaiting_provider.providerstringprovider_statusstringstagestring | null
recovery_kindstring | nullORDER_CREDIT_RECOVERYandORDER_CREDIT_RESTOREDonly: null on an order's records.reference_descriptionstring | nullreference_idstring | nullrefundable_amountinteger | number | string | nullPayments only: the amount minus its refunds. Money moved to customer credit is not taken off here, though a refund can't include it. 0 for refunds, credit moves, payments from customer credit, and
CHARGE_IT_PROandSQUAREcard payments. Thousandths, an older encoding:12500is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5is 1.2345), or as a string ("1234.5") when you sendX-Yoprint-Decimal-Format: exact-v1. See Money and quantities.restores_transaction_idstring | nullORDER_CREDIT_RESTOREDonly: theORDER_CREDIT_RECOVERYrecord it gives back.reversal_transaction_idstring | nullCard refunds and
ORDER_CREDIT_RESTOREDonly: theREFUND_REVERSALrecord when the refund failed, or null.reverses_transaction_idstring | nullREFUND_REVERSALonly: the failed refund.subtypestringPAYMENT,REFUND(also a lost dispute),TRANSFER(a customer credit move),ORDER_PAYMENT_VOIDED_NEG_ADJ(a voided card payment),REFUND_REVERSAL(a failed card refund given back to its payment),ORDER_CREDIT_RECOVERY(credit a refund took back) orORDER_CREDIT_RESTORED(that credit given back when the refund failed).tokenstring | nullThe gateway's charge token; null for recorded payments.
typestringMANUAL(recorded in YoPrint) orSYSTEM(card and Customer Portal payments and refunds, Shopify payments, adjustments).user_idstring | nullThe team member who recorded it.
voidedboolean
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.
Related
- POSTRecord a payment on a sales order
/v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment - GETGet one payment of a sales order
/v2/ api/ store/ {team_slug}/ v2/ sales_order/ {hash_id}/ payment/ {payment_reference}
