> ## Documentation Index
> Fetch the complete documentation index at: https://developers.nova.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Charges API — Pay Invoice and Charge Link Endpoints

> REST API for Nova.Pay charges (invoice payment links). Retrieve charge details, check the last payment, and submit payment for a charge.

A **charge** in Nova.Pay represents a single invoice or payment link sent to a specific customer. Unlike a checkout page (which is reusable and public), a charge is a one-time payment request tied to a particular customer and order. Use these endpoints to fetch charge details, monitor payment status, and accept payment programmatically.

**Base URL:** `https://pay.nova.money/api/v1`

***

## Retrieve a charge

Fetch the full details of a charge, including customer information, products, and attached documents.

```http theme={null}
GET /charges/{id}
```

### Path parameters

<ParamField path="id" type="string" required>
  The Order UID of the charge.
</ParamField>

### Response

Returns a **ChargeShow** object.

<ResponseField name="id" type="string">
  The Order UID for this charge.
</ResponseField>

<ResponseField name="gateway" type="string">
  Payment gateway handling this charge (e.g. `"stripe"`, `"pagarme"`).
</ResponseField>

<ResponseField name="main_color" type="string">
  Hex colour code used on the hosted charge payment page.
</ResponseField>

<ResponseField name="menus" type="array">
  Navigation menu items shown on the hosted page.
</ResponseField>

<ResponseField name="page_title" type="string">
  Title displayed to the customer on the hosted payment page.
</ResponseField>

<ResponseField name="public_key" type="string">
  Gateway public key used for client-side card tokenisation.
</ResponseField>

<ResponseField name="logo" type="string">
  URL of the logo image displayed on the hosted page.
</ResponseField>

<ResponseField name="currency" type="string">
  ISO 4217 currency code (e.g. `"BRL"`, `"USD"`).
</ResponseField>

<ResponseField name="date" type="string">
  ISO 8601 date on which the charge was issued.
</ResponseField>

<ResponseField name="due_date" type="string">
  ISO 8601 due date by which the charge should be paid. Used to calculate interest and fines for late payments.
</ResponseField>

<ResponseField name="retention" type="number">
  Retention / withholding amount deducted from the charge value.
</ResponseField>

<ResponseField name="freight" type="number">
  Shipping / freight amount included in the charge.
</ResponseField>

<ResponseField name="enable_two_cards" type="boolean">
  Whether the customer can split this charge across two credit cards.
</ResponseField>

<ResponseField name="observation" type="string">
  Free-text note attached to the charge, visible to the customer.
</ResponseField>

<ResponseField name="customer" type="object">
  Customer to whom the charge is addressed.

  <Expandable title="customer fields">
    <ResponseField name="email" type="string">Customer email address.</ResponseField>
    <ResponseField name="name" type="string">Customer full name.</ResponseField>
    <ResponseField name="foreign" type="boolean">Whether the customer is a foreign (non-local) entity.</ResponseField>
    <ResponseField name="identification" type="string">CPF, CNPJ, or other national identifier.</ResponseField>
    <ResponseField name="social_reason" type="string">Company legal name (for corporate customers).</ResponseField>
    <ResponseField name="address" type="object">Customer address details.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="coupon" type="object">
  Coupon applied to this charge, if any.

  <Expandable title="coupon fields">
    <ResponseField name="code" type="string">Coupon code string.</ResponseField>
    <ResponseField name="discount" type="number">Discount amount or percentage applied by the coupon.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="products" type="array">
  Products included in this charge.

  <Expandable title="product fields">
    <ResponseField name="id" type="integer">Internal product ID.</ResponseField>
    <ResponseField name="name" type="string">Product name.</ResponseField>
    <ResponseField name="description" type="string">Product description.</ResponseField>
    <ResponseField name="product_type" type="string">Product category (e.g. `"digital"`, `"physical"`).</ResponseField>
    <ResponseField name="subscription" type="boolean">Whether the product is a subscription.</ResponseField>
    <ResponseField name="quantity" type="integer">Number of units included in the charge.</ResponseField>
    <ResponseField name="value" type="number">Unit price of the product.</ResponseField>
    <ResponseField name="image" type="string">URL of the product image.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="invoices" type="array">
  Fiscal invoices (NF-e / NFS-e) attached to this charge.

  <Expandable title="invoice fields">
    <ResponseField name="type" type="string">Invoice type (e.g. `"nfe"`, `"nfse"`).</ResponseField>
    <ResponseField name="url" type="string">Download URL for the invoice document.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="files" type="array">
  Additional files attached to the charge (e.g. contracts, receipts).

  <Expandable title="file fields">
    <ResponseField name="url" type="string">Download URL for the file.</ResponseField>
    <ResponseField name="name" type="string">File name.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="custom_code" type="string">
  Arbitrary code snippet injected into the hosted charge page.
</ResponseField>

<ResponseField name="default_payment_plan" type="object">
  The pre-selected payment plan for this charge.
</ResponseField>

***

## Get the last payment for a charge

Returns the most recent active or failed payment attempt for a charge. This is useful for polling payment status without needing to manage a list of payment IDs.

```http theme={null}
GET /charges/{id}/last_payment
```

### Path parameters

<ParamField path="id" type="string" required>
  The Order UID of the charge.
</ParamField>

### Response

Returns a **LastPayment** object, or HTTP **204 No Content** if no payment attempt has been made yet.

```json Example response theme={null}
{
  "gateway_id": "pay_xyz789",
  "amount": 100.00,
  "interest": 0,
  "paid_at": null,
  "status": "waiting_payment"
}
```

<ResponseField name="gateway_id" type="string">
  The payment identifier issued by the gateway.
</ResponseField>

<ResponseField name="amount" type="number">
  The total amount of the payment attempt.
</ResponseField>

<ResponseField name="interest" type="number">
  Late-payment interest added to the original charge amount (zero if paid on time or in advance).
</ResponseField>

<ResponseField name="paid_at" type="string | null">
  ISO 8601 datetime at which the payment was confirmed. `null` if not yet paid.
</ResponseField>

<ResponseField name="status" type="string">
  Current payment status. Possible values: `waiting_payment`, `paid`, `failed`, `cancelled`, `pending`.
</ResponseField>

***

## Pay a charge

Submit payment for a charge. You can pay using a credit card, Pix, or bank slip (boleto).

```http theme={null}
POST /charges/{id}/pay
```

### Path parameters

<ParamField path="id" type="string" required>
  The Order UID of the charge to pay.
</ParamField>

### Request body

<ParamField body="payment_plan_id" type="string" required>
  The ID of the selected payment plan (e.g. `"42-1"`). Retrieve available plans from the [Payment Plans endpoint](/api-reference/payment-plans).
</ParamField>

<ParamField body="confirmation_token_id" type="string">
  Stripe PaymentMethod confirmation token ID. Required when the gateway is Stripe and the payment method is credit card.
</ParamField>

<ParamField body="credit_card_0_token" type="string">
  Tokenised card data for the primary credit card.
</ParamField>

<ParamField body="credit_card_0_card_id" type="string">
  ID of a saved card on file to use as the primary card.
</ParamField>

<ParamField body="credit_card_0_payment_plan" type="string">
  Payment plan ID for the primary card (used in two-card splits).
</ParamField>

<ParamField body="credit_card_0_amount" type="number">
  Amount charged to the primary card (used in two-card splits).
</ParamField>

<ParamField body="credit_card_1_token" type="string">
  Tokenised card data for the secondary credit card (two-card split).
</ParamField>

<ParamField body="credit_card_1_card_id" type="string">
  ID of a saved card to use as the secondary card.
</ParamField>

<ParamField body="credit_card_1_payment_plan" type="string">
  Payment plan ID for the secondary card.
</ParamField>

<ParamField body="credit_card_1_amount" type="number">
  Amount charged to the secondary card.
</ParamField>

<ParamField body="observation" type="string">
  Free-text note to attach to this specific payment attempt.
</ParamField>

<ParamField body="meta" type="object">
  Arbitrary key-value pairs attached to the payment for your own tracking.
</ParamField>

### Response

Returns a **ChargePayResult** object. Only the fields relevant to the chosen payment method are included.

<Warning>
  The response shape differs by payment method. Always check which fields are present before accessing them.
</Warning>

<ResponseField name="status" type="string">
  The resulting payment status for credit card payments. Possible values:

  | Value                  | Description                                     |
  | ---------------------- | ----------------------------------------------- |
  | `pending`              | Payment is being processed.                     |
  | `waiting_payment`      | Awaiting payment confirmation from the gateway. |
  | `paid`                 | Payment confirmed.                              |
  | `cancelled`            | Payment was cancelled.                          |
  | `failed`               | Payment attempt failed.                         |
  | `waiting_cancellation` | Cancellation has been requested and is pending. |
</ResponseField>

<ResponseField name="bank_slip_url" type="string">
  URL of the generated boleto PDF. **Present only for `bank_slip` payments.**
</ResponseField>

<ResponseField name="pix_qr_code" type="string">
  Base64-encoded Pix QR code image. **Present only for `pix` payments.**
</ResponseField>

<ResponseField name="pix_qr_code_url" type="string">
  URL to the Pix QR code image. **Present only for `pix` payments.**
</ResponseField>

<ResponseField name="pix_expires_at" type="string">
  ISO 8601 datetime when the Pix QR code expires. **Present only for `pix` payments.**
</ResponseField>

<ResponseField name="redirect_url" type="string">
  URL to redirect the customer to after payment (e.g. a confirmation or thank-you page).
</ResponseField>


## Related topics

- [Nova.Pay Checkout Flow: Pages, Carts, and Charge Links](/concepts/checkout-flow.md)
- [Nova.Pay API: Payments, Checkout & Order Management](/introduction.md)
- [Nova.Pay API Errors: Status Codes and Response Handling](/errors.md)
- [Payment Plans API — List and Retrieve Installment Options](/api-reference/payment-plans.md)
- [Webhooks API — Handle Payment Gateway Event Callbacks](/api-reference/webhooks.md)
