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 Reference
DocumentationAPI Reference
  • Introduction
    • Overview
  • API Reference
      • GETList orders
      • POSTCreate order
      • GETGet order by ID
      • DELDelete order
      • POSTActivate order
      • POSTActivate order and process payment
      • POSTCancel order renewal
      • POSTSchedule a plan change with proration
      • GETGet invoices for an order
LogoLogo
Log inGet Paid
API Referenceorders

Activate order

POST
https://api.agentpaid.io/api/v1/orders/:orderId/activate
POST
/api/v1/orders/:orderId/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.activate("orderId");
8}
9main();
200Successful
1{
2 "id": "string",
3 "name": "string",
4 "description": "string",
5 "customerId": "string",
6 "organizationId": "string",
7 "startDate": "string",
8 "endDate": "string",
9 "totalAmount": 1.1,
10 "estimatedTax": 1.1,
11 "billedAmountNoTax": 1.1,
12 "billedTax": 1.1,
13 "totalBilledAmount": 1.1,
14 "pendingBillingAmount": 1.1,
15 "creationState": "active",
16 "orderLines": [
17 {
18 "id": "string",
19 "orderId": "string",
20 "agentId": "string",
21 "name": "string",
22 "description": "string",
23 "startDate": "string",
24 "endDate": "string",
25 "totalAmount": 1.1,
26 "billedAmountWithoutTax": 1.1,
27 "billedTax": 1.1,
28 "totalBilledAmount": 1.1,
29 "creationState": "active",
30 "agent": {
31 "id": "string",
32 "organizationId": "string",
33 "name": "string",
34 "active": true,
35 "externalId": "string",
36 "description": "string",
37 "agentCode": "string",
38 "agentAttributes": [
39 {
40 "name": "string",
41 "active": true,
42 "pricing": {
43 "taxable": true,
44 "chargeType": "oneTime",
45 "pricingModel": "PerUnit",
46 "billingFrequency": "monthly",
47 "pricePoints": {},
48 "eventName": "string",
49 "creditCost": 1.1
50 }
51 }
52 ]
53 },
54 "orderLineAttributes": [
55 {
56 "agentAttributeId": "string",
57 "quantity": 1.1,
58 "currency": "string",
59 "pricing": {
60 "eventName": "string",
61 "chargeType": "oneTime",
62 "pricePoint": {
63 "currency": "string",
64 "unitPrice": 1.1,
65 "minQuantity": 1.1,
66 "tiers": [
67 {
68 "lowerBound": 1.1,
69 "upperBound": 1.1,
70 "price": 1.1
71 }
72 ]
73 },
74 "pricingModel": "PerUnit",
75 "billingFrequency": "monthly"
76 }
77 }
78 ]
79 }
80 ],
81 "customer": {
82 "id": "string",
83 "organizationId": "string",
84 "name": "string",
85 "externalId": "string",
86 "phone": "string",
87 "employeeCount": 1.1,
88 "annualRevenue": 1.1,
89 "taxExemptStatus": "none",
90 "creationSource": "manual",
91 "creationState": "active",
92 "website": "string",
93 "billingAddress": {
94 "line1": "string",
95 "city": "string",
96 "state": "string",
97 "zipCode": "string",
98 "country": "string",
99 "line2": "string"
100 },
101 "metadata": {}
102 }
103}
Was this page helpful?
Previous

Activate order and process payment

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

orderIdstringRequired

Response

Success response
idstring
namestring
descriptionstring
customerIdstring
organizationIdstring
startDatestring
endDatestring
totalAmountdouble
estimatedTaxdouble
billedAmountNoTaxdouble
billedTaxdouble
totalBilledAmountdouble
pendingBillingAmountdouble
creationStateenum
Allowed values:
orderLineslist of objects
customerobject