Skip to Content
Paycose Docs
Invoices

Invoices

The invoice_payment object

An invoice payment links an invoice to one payment intent or charge that collects it. An invoice has one per collection attempt; list them with GET /invoices/{id}/payments.

Attributes

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • invoicestringRequired

    ID of the invoice the payment is for.

  • statusstringRequired

    State of the payment.

    • open

      The payment has not completed yet.

    • paid

      The payment succeeded.

    • canceled

      The payment was canceled and will not collect anything.

  • amount_requestedintegerRequired

    Amount this payment asked for, in the smallest currency unit (for example, 49900 is 499.00 THB).

  • amount_paidintegerNullable

    Amount this payment collected, in the smallest currency unit. Set when status is paid; omitted otherwise.

  • currencystringRequired

    Three-letter ISO 4217 currency code, in lowercase.

  • is_defaultbooleanRequired

    true for the payment Paycose created itself to collect the invoice, when it was finalized or paid through POST /invoices/{id}/pay.

  • paymentobjectRequired

    The payment intent or charge behind this invoice payment.

    Show child attributes
    • payment.typestringRequired

      Which kind of payment it is; the matching ID field is set.

      • payment_intent

        The invoice is collected through a payment intent.

      • charge

        The invoice is collected by a charge made without a payment intent.

    • payment.payment_intentstring

      ID of the payment intent. Set when type is payment_intent.

    • payment.chargestring

      ID of the charge. Set when type is charge.