Skip to content
QaydTech Beta launch

Purchases

Pay a purchase invoice

post https://your-business.qaydtech.com/api/v1/purchases/{id}/payments

Records a payment voucher settling the invoice: all that is left unless an amount is named, never more. The key needs payments (payments.write) as well as purchases.

Permission: purchases.write Supports Idempotency-Key to prevent duplicates.

The user the key acts as also needs: Pay purchase invoices

Request

Path parameters

  • id integer required

    The record’s number.

    Example: 42

Headers

  • Authorization string required

    Bearer followed by the API key.

    Example: Bearer qayd_…

  • Accept-Language string optional

    en for English error messages. Arabic by default.

    Example: en

  • Content-Type string required

    application/json with every request that has a body.

    Example: application/json

  • Idempotency-Key string optional

    A unique value so a request sent again creates nothing twice.

    Example: order-10045

Request body application/json

  • method string required

    How it was paid: cash, bank_transfer, card or cheque.

    Example: card

  • account_id integer optional

    For payments and refunds: the cash box or bank account from GET /payment-accounts, defaulting to the method’s account. For stock documents: the offset account, defaulting to stock adjustments.

  • amount number optional

    The amount in riyals, up to 2 decimals.

  • date date optional

    The date; today when not sent.

    Example: 2026-11-10

  • reference string optional

    Your reference, such as your store’s order number, up to 60 characters. Searchable later.

    Example: PAY-88231

Responses

  • 201 Created
  • Errors · 401 · 403 · 429