For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inGet Paid
DocumentationAPI ReferenceCLI
DocumentationAPI ReferenceCLI
  • Introduction
    • Overview
  • API Reference
      • GETList orders
      • POSTCreate a new order
      • GETGet order
      • PUTUpdate order
      • DELDelete order
      • POSTActivate order
      • GETGet order lines
      • GETList seats
      • PUTAssign or unassign seat
      • POSTBatch assign seats
LogoLogo
Log inGet Paid
API Referenceorders

Activate order

POST
https://api.agentpaid.io/api/v2/orders/:id/activate
POST
/api/v2/orders/:id/activate
1import { PaidClient } from "@paid-ai/paid-node";
2
3async function main() {
4 const client = new PaidClient({
5 token: "YOUR_TOKEN_HERE",
6 });
7 await client.orders.activateOrderById("id");
8}
9main();
1{
2 "id": "a3f47c2e-9b1d-4f3a-8c2e-1d2f3b4a5c6d",
3 "customerId": "c1234567-89ab-4def-0123-456789abcdef",
4 "billingCustomerId": "b9876543-21fe-4dc3-ba98-76543210fedc",
5 "billingContactIds": [
6 "bc456789-0123-4def-89ab-cdef01234567"
7 ],
8 "createdAt": "2024-01-15T09:30:00Z",
9 "updatedAt": "2024-04-20T14:45:00Z",
10 "endDate": "2025-01-15T09:30:00Z",
11 "name": "Premium Subscription Plan",
12 "startDate": "2024-01-15T09:30:00Z",
13 "subscriptionTerms": 12,
14 "billedAmountNoTax": 1200,
15 "billedTax": 96,
16 "estimatedTax": 96,
17 "orderAmount": 1296,
18 "pendingBillingAmount": 0,
19 "totalAmount": 1296,
20 "totalBilledAmount": 1296,
21 "creationState": "active",
22 "paymentTerms": "Net 30",
23 "number": 1001,
24 "metadata": {
25 "source": "dashboard",
26 "campaign": "spring_promo"
27 },
28 "showPaymentLink": true,
29 "showBankDetails": true,
30 "autoPostInvoices": true,
31 "autoSendBillingEmails": true,
32 "autoSendPaymentEmails": true,
33 "version": 3,
34 "billingFrequencyOverridden": true,
35 "purchaseOrderReference": "PO-2024-0456",
36 "billingFrequencyOverride": {
37 "frequency": "monthly",
38 "customMonths": 1
39 }
40}
Activate a draft order by ID. Activation starts billing for the order using the same validation and side effects as the dashboard activation flow.
Was this page helpful?
Previous

Get order lines

Next
Built with

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

idstringRequired

Response

200
idstring
customerIdstring
billingCustomerIdstring or null
billingContactIdslist of strings
createdAtdatetime
updatedAtdatetime
endDatedatetime or null
namestring
startDatedatetime
subscriptionTermsinteger or null
billedAmountNoTaxdouble
billedTaxdouble
estimatedTaxdouble
orderAmountdouble
pendingBillingAmountdouble
totalAmountdouble
totalBilledAmountdouble
creationStateenum
Allowed values:
paymentTermsstring or null
numberdouble
metadatamap from strings to any or null
showPaymentLinkboolean or null
showBankDetailsboolean or null
autoPostInvoicesboolean or null
autoSendBillingEmailsboolean or null
autoSendPaymentEmailsboolean or null
versioninteger
billingFrequencyOverriddenboolean
purchaseOrderReferencestring or null
billingFrequencyOverrideobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error