Payments

The model describing payments in a receipt.

Every item in the payments array must be an object; null items are not allowed. Each individual payment amount must be nonnegative, including when the total for its payment type is nonnegative. Invalid payments are rejected with error 701003. Payment validation is skipped in preliminary validation methods when ignore_payments = true.

Name Data type Required Parameter description
type int64 Required Payment type in REGOS: VCR: 1 - cash, 2 - bank card / payment system
value int64 Required if payment_id is not set; always required in Receipt.Refund Payment amount in tiyin. Must not be less than 0
payment_id string Optional ID of a REGOS: VCR payment created using Payment.Create or Payment.Start
card_type int32 Optional Card type: 1 - corporate, 2 - personal, 3 - social. Default: 2
card_number string Required when type = 2 and card_type = 3, unless the payment was created using Payment.Create or Payment.Start Customer's social card number. Supply 16 digits; responses and printed output use a masked value
RRN string Optional Payment processing transaction identifier, if available

For cash payments (type = 1), type and value are required; payment_id must not be supplied.

When OFD receipt validation is enabled, if cash is prohibited for any product or the total value of items with one ICPS code exceeds the permitted cash-payment threshold, the cash amount for the entire receipt must be zero. This applies to sale, refund, advance, and credit receipts. A mixed payment with a positive cash amount is rejected with error 701003. Reaching the threshold exactly does not trigger the threshold restriction.

For payments made through Payment.Create or Payment.Start, pass the local payment id in payment_id. This payment can be used only once in a sale receipt.

In Receipt.Sale, when payment_id is supplied, REGOS: VCR uses the amount and details of the created payment.

In Receipt.Refund, payment_id does not initiate a monetary refund. It links the receipt to an already confirmed refund operation for the original integrated payment; value must equal that operation's amount. Omit this field for cash refunds or refunds through another payment method.

UzQR payments are registered as noncash card payments; the UzQR payment identifier is used as the RRN.

For QR payments, before closing the receipt, ensure that Payment.Get returned status = 3.

Important: A receipt can contain no more than one payment object with type = 2.