Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Attach a payment to an Invoice


Attach a payment to an Invoice

POST / v1 / invoices /:id / attach_payment

Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.

For the PaymentIntent, when the PaymentIntent’s status changes to succeeded, the payment is credited to the invoice, increasing its amount_paid. When the invoice is fully paid, the invoice’s status becomes paid.

If the PaymentIntent’s status is already succeeded when it’s attached, it’s credited to the invoice immediately.

See: Partial payments to learn more.

Parameters

  • payment _ intent string The ID of the PaymentIntent to attach to the invoice.
  • payment _ record string The ID of the PaymentRecord to attach to the invoice.

Returns

Returns the invoice object that the payment was attached to.

Response

Finalize an invoice

POST / v1 / invoices /:id / finalize

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

Parameters

  • auto _ advance boolean Controls whether Stripe performs automatic collection of the invoice. If false, the invoice’s state doesn’t automatically advance without an explicit action.

Returns

Returns an invoice object with status=open.

Response

Mark an invoice as uncollectible

POST / v1 / invoices /:id / mark_uncollectible

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

Parameters

No parameters.

Returns

Returns the invoice object.

Response

Last verified 2026-09-24

Is this helpful?