v1

latestOpenAPI 3.0.02026-07-1498163181.9 KB
Invoices

Create an invoice

Creates as invoice

post/api/v1/invoices

Request body

descriptionstring
dueDatestring date-time
footerstring
fromInvoiceIdstring uuid
metadataobject
clientReferenceIdstring
visibilitystring
allowPromotionCodesboolean

Enables user redeemable promotion codes.

customerIdstring uuid
taxRateIdsstring[]

Example request

{
  "fromInvoiceId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "customerId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "lineItems": {
    "data": [
      {
        "priceId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
        "priceData": {
          "intervalCount": 1,
          "productId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
        },
        "quantity": 1
      }
    ]
  },
  "paymentSetting": {
    "allowedChains": [
      {
        "chainId": 137
      }
    ],
    "preferredChainId": 1
  }
}

Response

idstring required
createdAtstring date-time
updatedAtstring date-time
organizationIdstring uuid required
descriptionstring
totalinteger
subTotalinteger
currency'usdc' | 'usdt' | 'pyusd' | 'eurc' | 'brett' | 'dai' | 'btc' | 'eth' | 'matic' | 'bnb' | 'sol' | 'busd' | 'trx' | 'food' | 'bonk' | 'wif' | 'goat' | 'spx' | 'truf' | 'pengu'
customerIdstring uuid required
autoAdvanceboolean required
collectionMethod'charge_automatically' | 'send_invoice' required
invoiceType'one_time' | 'recurring'
paymentSettingIdstring uuid required
status'draft' | 'open' | 'paid' | 'void' | 'uncollectible' required
attemptedboolean required
attemptCountnumber
nextPaymentAttemptstring date-time
dueDatestring date-time
footerstring
fromInvoiceIdstring uuid
latestRevisionIdstring uuid
invoicePdfUrlstring
invoiceNumberstring
paidboolean required
paidOutOfBandboolean
metadataobject
clientReferenceIdstring
finalizedAtstring date-time
paidAtstring date-time
markedUncollectibleAtstring date-time
visibilitystring
paymentIntentIdstring uuid
urlstring required

The URL to redirect the customer to pay invoice

subscriptionIdstring
periodStartstring date-time
periodEndstring date-time
billingReason'subscription_cycle' | 'subscription_create' | 'subscription_update' | 'subscription' | 'manual' | 'upcoming' | 'subscription_threshold' required
allowPromotionCodesboolean

Enables user redeemable promotion codes.

finalizeScheduleAtstring date-time

The date on which invoice will be finalize and send

totalTaxinteger
taxRateIdsstring[]

Example response

{
  "organizationId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "customerId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "customer": {
    "id": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
    "taxIds": {
      "data": [
        {
          "customerId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
        }
      ]
    }
  },
  "paymentSettingId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "paymentSetting": {
    "allowedChains": [
      {
        "chainId": 137
      }
    ],
    "allowedCurrencies": [
      "usdc",
      "usdt"
    ],
    "preferredChainId": 1,
    "feePercentage": 1,
    "slippagePercentage": 1
  },
  "attemptCount": 1,
  "fromInvoiceId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "latestRevisionId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "lineItems": {
    "data": [
      {
        "quantity": 1,
        "price": {
          "productId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
          "intervalCount": 1,
          "product": {
            "defaultPriceId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
          }
        },
        "taxRates": [
          {
            "percentage": 1
          }
        ]
      }
    ]
  },
  "paymentIntentId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
  "paymentIntent": {
    "organizationId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
    "paymentMethodId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
    "paymentMethod": {
      "assetId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
      "asset": {
        "chainId": 1,
        "decimals": 1,
        "superToken": {
          "decimals": 1
        }
      },
      "customerId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
    },
    "transactions": [
      {
        "nonce": 1,
        "gasLimit": 1,
        "asset": {
          "chainId": 1,
          "decimals": 1,
          "superToken": {
            "decimals": 1
          },
          "chain": {
            "id": 1
          }
        }
      }
    ],
    "paymentReceipt": {
      "organizationId": "c3611c05-df51-4b47-b601-f2eac02f4ef0",
      "paymentIntentId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
    }
  },
  "paymentIntentAttempt": [
    {
      "paymentIntentId": "c3611c05-df51-4b47-b601-f2eac02f4ef0"
    }
  ]
}