Payment and statuses
pending Created and awaiting confirmation.
paid Payment confirmed and funds transferred.
expired Canceled or expired; cannot be paid.
Payments are valid for 30 minutes after creation. The expiration check happens when payment is
attempted; retrieval may still show pending after this window. That status does not guarantee
that payment will still be accepted.
If payer_id is provided, only that user can pay. Otherwise, York uses the user who confirms
payment. The recipient cannot pay their own transaction. The payer needs enough funds to cover the
amount plus the fee.
The unit of amount depends on the currency: 100 means 1 Azeitona or 100
Caroços. Azeitonas use hundredths; Caroços use whole units. The allowed integer range is 1–50000,
equivalent to at most 500 Azeitonas or 50000 Caroços, excluding fees.
For Azeitonas, the fee in hundredths is max(1, floor(amount × 0.069)). The
recipient receives amount and the payer spends that amount plus the fee. With amount: 1000, this is 10 Azeitonas + a 0.69 fee = 10.69. There is no fee for
Caroços.
The buttons use return_url and completion_url, falling back to /carteira. Reaching the completion URL does not prove payment: always verify it
through an authenticated request from your server.