Invoices

Creates a draft invoice backed by a receipt, with saved items, quantities, prices, and recipients. Issue the draft to resolve final tax and open the invoice. The pay_ ID stays the same when paid. Needs invoice:create or payment:charge; a payment_method_id needs payment:charge.

post/invoices

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    • HTTP bearer
    • or HTTP bearer

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Idempotency-Key, string
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

object required
account_id, string required

The issuing account.

billing_address, object nullable

Create a billing address linked to this member.

buyer_fee_percentage, number

The buyer's adjustable fee in percentage points, with at most two decimal places: 0 for none, or between 5 and 100. The account keeps it, and Whop waives its take rate on the invoice.

charge_at_subscription_start, boolean

When true, the customer pays only each item's initial fee now, and their payment method is first charged the renewal price at subscription_starts_at. The membership is scheduled and has no access until then. Needs subscription_starts_at, items that all renew, no split pay, and renewals that charge the payment method. With nothing due now, it also needs payment_method_id. Defaults to false. Can be updated on drafts.

customer_name, string nullable

The contact name when creating an email-only member.

due_at, string date-time nullable

When payment is due, as an ISO 8601 timestamp.

email_address, string nullable

Resolve or create the member for this email, creating a Whop user when none exists. Mutually exclusive with member_id.

items, union[] required

The variants being invoiced, all in the same currency. Each variant may appear once. Use quantity for multiple units. A recurring variant must belong to a product. Its first invoice charges initial_price plus renewal_price. Later invoices charge only renewal_price. When the variant has trial_period_days, the first invoice charges only initial_price. Paying it starts the trial, and the first renewal is billed when the trial ends. A customer who already had a subscription to the variant gets no trial, so paying starts a paid billing period immediately. Renewal invoices never start a trial. When the trial leaves nothing due, issuing or sending needs a payment_method_id or the send_invoice collection method. The subscription uses the collection_method the invoice was sent or issued with. A finite payment count includes the first paid invoice. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, access, and trial settings.

mailing_address_id, string nullable

An address associated with the member. Mutually exclusive with billing_address.

member_id, string nullable

The billed customer, a member of the account, prefixed mber_. It can't change once the draft is created. Changing email recipients does not change this buyer.

memo, string nullable

A note to the customer, shown on the invoice email, PDF, and checkout page with its line breaks kept. Trimmed; null or blank clears it. Can be updated on draft, open, or uncollectible invoices.

metadata, object

Up to 50 caller-owned string key/value pairs. The invoice_memo key is reserved and ignored; set memo instead.

payment_method_configuration, object nullable

The payment methods the customer can choose from when paying through the invoice's checkout link, in the shape a variant or checkout configuration takes. It takes precedence over the invoice's variants and the account, and changes neither. Send both lists. null uses its variants' payment methods. Can be updated on drafts.

payment_method_id, string nullable

A saved payment method belonging to the member, prefixed payt_. Sending or issuing the invoice charges this method at the charge_at passed to that call, otherwise on due_at, or right away when there is no due_at or it has passed. Sending also emails the invoice now when the charge is later; issuing does not. Setting it needs payment:charge.

recipient_emails, string[]

Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at, string date-time nullable

When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. null starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price. With charge_at_subscription_start, the subscription, its first renewal charge and its access begin at this moment instead.

time_zone, string nullable

The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Example request

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "billing_address": {
    "city": "New York",
    "country": "US",
    "line1": "123 Main St",
    "postal_code": "10001",
    "state": "NY"
  },
  "buyer_fee_percentage": 5,
  "charge_at_subscription_start": true,
  "email_address": "marcus@shinetime.example",
  "items": [
    {
      "variant_id": "plan_xxxxxxxxxxxxxx"
    }
  ],
  "member_id": "mber_xxxxxxxxxxxxxx",
  "memo": "Thanks for your business. Payment terms: net 30.",
  "metadata": {
    "purchase_order": "PO-42"
  },
  "payment_method_configuration": {
    "disabled": [
      "klarna"
    ],
    "enabled": [
      "card"
    ],
    "include_platform_defaults": true
  },
  "payment_method_id": "payt_xxxxxxxxxxxxxx",
  "subscription_starts_at": "2026-01-01T12:00:00.000Z",
  "time_zone": "America/New_York"
}

Response

invoice created

Invoice required
account, AccountSummary required

The account that sent the invoice.

account_id, string required
amount_due, Money required
billing_address, PaymentAddress nullable required
buyer_fee_amount, Money required
buyer_fee_percentage, number required
charge_at_subscription_start, boolean required

True when the customer pays only the initial fee of each item now and is first charged the renewal price at subscription_starts_at. Until then the membership is scheduled and has no access.

checkout_link, string nullable required

A signed link that opens this invoice in a checkout session so the buyer can pay it. Pass it as link to POST /checkout_sessions. Present while the invoice is open. null in any other status, for an invoice billed to a business buyer, and for an invoice whose membership was canceled. Also null unless you have payment:charge, or invoice:create or invoice:update on an invoice with no payment_method_id.

created_at, string required
customer_name, string nullable required
deletable, boolean required

True when DELETE /invoices/{id} can delete this invoice. A draft qualifies unless it is scheduled or bills a subscription. A void invoice qualifies unless it collected money or still awaits a bank wire.

due_at, string nullable required
email_address, string nullable required
id, string required
invoice_prefix, string nullable required
issued_at, string nullable required

When the invoice was issued, as an ISO 8601 timestamp. This is when it left draft, which can be after created_at for an invoice drafted or scheduled ahead. null while the invoice is a draft, and for invoices issued before this field was introduced.

line_items, InvoiceLineItem[] required
mailing_address_id, string nullable required
member_id, string nullable required
membership_id, string nullable required

The membership this invoice bills, prefixed mem_. For a renewal invoice, it is the subscription that renews. For an invoice with a recurring item, it is the membership created when the invoice is issued. Null for one-off invoices, for a draft not yet issued, and without the member:basic:read permission.

memo, string nullable required

A note to the customer, shown on the invoice email, PDF, and checkout page with its line breaks kept. null when none is set.

metadata, object required

Key-value pairs the seller stored on the invoice. Empty when the invoice is read without a credential.

number, string required
object, 'invoice' required
overdue, boolean required
paid_at, string nullable required
payment_method_configuration, CheckoutSessionPaymentMethodConfiguration nullable required
payment_method_id, string nullable required
quote_accepted_at, string nullable required

When the customer accepted and signed the quote, as an ISO 8601 timestamp. An edit to the draft clears it, unless the edit changes only recipient_emails. null when the quote was not accepted.

quote_amount_paid, Money nullable required
quote_amount_remaining, Money nullable required
quote_deposit_amount, Money nullable required
quote_deposit_percentage, number nullable required

The share of the quote billed as a deposit when the customer signs, such as 30 for 30%. null when the deposit is a fixed amount or there is none.

quote_invoice_ids, string[] required
quote_payment_url, string nullable required

Where the customer pays the next unpaid invoice in quote_invoice_ids. Only returned when the quote is read with its customer token. null otherwise, and when nothing is waiting to be paid.

quote_sent_at, string nullable required

When the draft was last emailed to its recipients as a quote, as an ISO 8601 timestamp. A quote stays a draft and cannot be paid. It is not issued on its due_at. null when the invoice was never sent as a quote.

quote_signature_url, string nullable required

A link to the signature the customer drew, as a PNG image with a transparent background. The link expires after a short time. null when the quote was not accepted, and for a credential without the member:basic:read permission.

quote_signer_email, string nullable required

The email address of the Whop user who signed the quote. null when the quote was not accepted, when the signer was not signed in to Whop, and without the member:email:read permission.

quote_signer_name, string nullable required

The full name the customer typed to sign the quote. null when the quote was not accepted, and for a credential without the member:basic:read permission.

recipient_emails, string[] required
scheduled_charge_at, string nullable required

When the invoice's saved payment method will be charged, as an ISO 8601 timestamp. It is the charge_at the invoice was sent or issued with. Without one, it is due_at when an invoice with a payment_method_id is sent or issued before it is due. On a draft, it is the charge_at of its scheduled send. null otherwise, once the charge starts, and once the invoice is paid, void, or uncollectible.

scheduled_collection_method, 'charge_automatically' | 'send_invoice' | 'null' nullable required

The collection_method a draft's scheduled send applies when it fires. null when the draft has no scheduled send or it was scheduled without one, and once the invoice is issued.

scheduled_send_at, string nullable required
sends_on_due_date, boolean required

Whether this draft is issued automatically when its due_at arrives. Issuing it charges its payment_method_id, or emails its payment link to its recipient_emails. false for an invoice that is not a draft, for a draft with a scheduled send, and for a draft sent as a quote. false while sending the draft would fail for missing recipients or an unavailable payment link. false for a draft that had no future due_at when it was last saved. false for a draft created before 2026-11-12T22:00:00Z.

status, 'draft' | 'open' | 'authorized' | 'paid' | 'pending' | 'uncollectible' | 'unresolved' | 'void' required
subscription_starts_at, string nullable required

When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp. Renewals count from this moment. null starts the period when the invoice is paid, and so does a time that has passed by then. An invoice with a start date skips its variants' free trial. With charge_at_subscription_start, the subscription and its access begin at this moment instead.

subtotal, Money required
tax_amount, Money nullable required
time_zone, string required

The IANA time zone for the dates on the invoice's email and PDF, such as America/New_York. UTC unless one was set.

total, Money required

The amount the invoice charges, including tax. On a draft, it includes the estimated tax_amount, if any.

totals_status, 'estimated' | 'final' required
updated_at, string required

Example response

{
  "account": {
    "id": "biz_xxxxxxxxxxxxxx",
    "title": "Shine Time Auto Detailing"
  },
  "account_id": "biz_xxxxxxxxxxxxxx",
  "amount_due": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "billing_address": {
    "city": "Austin",
    "country": "US",
    "line1": "1114 Bouldin Ave",
    "line2": "Unit B",
    "name": "Dana Whitfield",
    "postal_code": "78704",
    "state": "TX"
  },
  "buyer_fee_amount": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "checkout_link": "pay_xxxxxxxxxxxxxx.xxxxxxxxxxxxxxxx",
  "created_at": "2026-01-01T12:00:00.000Z",
  "customer_name": "Dana",
  "email_address": "marcus@shinetime.example",
  "id": "pay_xxxxxxxxxxxxxx",
  "issued_at": "2026-01-01T12:00:00.000Z",
  "line_items": [
    {
      "description": "Deposit toward invoice #xxxxxxxx: $225.00 of $750.00, $525.00 left after this",
      "discount_amount": {
        "amount": "-1234.56",
        "currency": "usd",
        "decimals": 2,
        "display_decimals": 2
      },
      "id": "li_xxxxxxxxxxxxxx",
      "initial_price": {
        "amount": "-1234.56",
        "currency": "usd",
        "decimals": 2,
        "display_decimals": 2
      },
      "label": "Deposit (30%)",
      "product_id": "prod_xxxxxxxxxxxxxx",
      "quantity": 1,
      "subtotal": {
        "amount": "-1234.56",
        "currency": "usd",
        "decimals": 2,
        "display_decimals": 2
      },
      "tax_amount": {
        "amount": "-1234.56",
        "currency": "usd",
        "decimals": 2,
        "display_decimals": 2
      },
      "unit_amount": {
        "amount": "-1234.56",
        "currency": "usd",
        "decimals": 2,
        "display_decimals": 2
      },
      "variant_id": "plan_xxxxxxxxxxxxxx"
    }
  ],
  "member_id": "mber_xxxxxxxxxxxxxx",
  "membership_id": "mem_xxxxxxxxxxxxxx",
  "metadata": {},
  "number": "#xxxxxxxx",
  "object": "invoice",
  "payment_method_configuration": {
    "disabled": [
      "card"
    ],
    "enabled": [
      "card"
    ],
    "include_platform_defaults": true
  },
  "payment_method_id": "payt_xxxxxxxxxxxxxx",
  "quote_accepted_at": "2026-01-01T12:00:00.000Z",
  "quote_amount_paid": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "quote_amount_remaining": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "quote_deposit_amount": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "quote_sent_at": "2026-01-01T12:00:00.000Z",
  "quote_signature_url": "https://whop-assets-example.s3.amazonaws.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "quote_signer_name": "Dana Whitfield",
  "recipient_emails": [
    "marcus@shinetime.example"
  ],
  "scheduled_collection_method": "charge_automatically",
  "status": "open",
  "subtotal": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "tax_amount": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "time_zone": "UTC",
  "total": {
    "amount": "-1234.56",
    "currency": "usd",
    "decimals": 2,
    "display_decimals": 2
  },
  "totals_status": "final",
  "updated_at": "2026-01-01T12:00:00.000Z"
}

Changes

    • info

      the security scope invoice:create was added to the endpoint's security scheme bearerAuth

    • info

      the security scope payment:charge was removed from the endpoint's security scheme bearerAuth

    • info

      the security scope invoice:create was added to the endpoint's security scheme bearerAuth

    1 more change in this revision