### Install Project Dependencies Source: https://developer.zuora.com/docs/payment-page/payment-page-tutorial.md Run this command in the terminal to install all necessary packages for the payment page samples project. This is a prerequisite before starting the server. ```bash $ npm install ``` -------------------------------- ### Get Product Response Example Source: https://developer.zuora.com/other-api/quickstart-api/products/getproduct This is an example of a successful response when retrieving product details. It includes all relevant product information and metadata. ```json { "id": "8ad08ccf8437067601843a7af4e64rq3", "updated_by_id": "2c92c0946a6dffc0016a7faab604299b", "updated_time": "2022-08-02T08:29:09-07:00", "created_by_id": "2c92c0946a6dffc0016a7faab604299b", "created_time": "2022-08-02T08:29:09-07:00", "custom_fields": { "field__c": "custom field value" }, "start_date": "2022-07-01", "end_date": "2032-07-01", "name": "Software service", "type": "base", "description": "Software service - basic edition", "sku": "SKU-00011719", "active": true } ``` -------------------------------- ### Example Sequence Set Configuration Source: https://developer.zuora.com/v1-api-reference/api/sequence-sets/delete_sequenceset An example of a sequence set configuration, specifying prefixes and starting numbers for different document types. ```json [ {"name":"FR","sequenceSetNumber":"FR","creditMemo":{"prefix":"FCM","startNumber":10},"debitMemo":{"prefix":"FDM","startNumber":10},"invoice":{"prefix":"FINV","startNumber":10},"payment":{"prefix":"FP-","startNumber":10},"refund":{"prefix":"FR-","startNumber":10}} ] ``` -------------------------------- ### Example Sequence Set Configuration Source: https://developer.zuora.com/v1-api-reference/api/sequence-sets/post_sequencesets An example of a sequence set configuration, specifying prefixes and starting numbers for various billing and payment documents. ```json [{"name":"FR","sequenceSetNumber":"FR","creditMemo":{"prefix":"FCM","startNumber":10},"debitMemo":{"prefix":"FDM","startNumber":10},"invoice":{"prefix":"FINV","startNumber":10},"payment":{"prefix":"FP-","startNumber":10},"refund":{"prefix":"FR-","startNumber":10}}] ``` -------------------------------- ### Example GET Request for Email History Source: https://developer.zuora.com/v1-api-reference/api/notifications/get_emailhistory This example demonstrates how to construct a GET request to retrieve email notification history. It includes parameters for start and end times, failure status, event category, and page size. ```http GET https://rest.zuora.com/v1/notification-history/email?startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000&pageSize=1 ``` -------------------------------- ### Start the Payment Page Server Source: https://developer.zuora.com/docs/payment-page/payment-page-tutorial.md Execute this command to start the local development server for the payment page samples. After successful installation, this command will make the payment page accessible via `http://localhost:3000`. ```bash $ npm start ``` -------------------------------- ### GET Accounting Period Response (200 OK) Source: https://developer.zuora.com/api-references/api/operation/GET_AccountingPeriod Example of a successful response (200 OK) for the GET Accounting Period API. It includes details such as creation information, dates, fiscal year and quarter, ID, name, notes, trial balance status and timing, start and end dates, status, and update information. ```json { "createdBy": "e20b074746ec48f40147140f51e30a1a", "createdOn": "2014-11-25 22:21:22", "endDate": "2014-10-31", "fileIds": { "accountsReceivableAccountAgingDetailExportFileId": "8a8081ae5002967c015012f1230e0914", "accountsReceivableInvoiceAgingDetailExportFileId": "8a8081ae5002967c015012f122f10913", "accountsReceivableDebitMemoAgingDetailExportFileId": "8a8081ae5002967c015012f122f40913", "arRollForwardDetailExportFileId": "8a8081ae5002967c015012f15d7b09e2", "fxRealizedGainAndLossDetailExportFileId": "8a8081ae5002967c015012f151a609ba", "fxUnrealizedGainAndLossDetailExportFileId": "8a8081ae5002967c015012f150b509b8", "revenueDetailCsvFileId": "8a8081ae5002967c015012f129a10926", "revenueDetailExcelFileId": "8a8081ae5002967c015012f129870925", "unprocessedChargesFileId": null }, "fiscalYear": 2014, "id": "e20b074749d2a38b0149eac2e9550aa9", "name": "Oct 2014", "notes": "", "runTrialBalanceEnd": "2015-09-28 00:53:36", "runTrialBalanceErrorMessage": null, "runTrialBalanceStart": "2015-09-28 00:53:13", "runTrialBalanceStatus": "Completed", "startDate": "2014-10-01", "status": "Closed" } ``` -------------------------------- ### Get Success Response Example Source: https://developer.zuora.com/v1-api-reference/api/configurable-payment-retry This is an example of a successful response when operations are performed. ```json { "success": true, "message": "Payments with the following IDs have been removed from the retry cycle: [301]" } ``` -------------------------------- ### Example REST Request with Zephr SDK Source: https://developer.zuora.com/zephr-docs/zephr-sdk/zephr-sdk-reference/javascript-sdk.md Demonstrates how to initialize the AdminApiClient and make a GET request to the Zephr API. ```javascript const AdminApiClient = require('./blaize-sdk.js').admin; let tenant = 'mysite'; const accessKey = getAccessKeySecurely(); const secretKey = getSecretKeySecurely(); let client = AdminApiClient.build(tenant, accessKey, secretKey); let responseBody = await client.get('/v3/users'); ``` -------------------------------- ### Get Summary Statements API Response Example Source: https://developer.zuora.com/v1-api-reference/api/object-queries/getsummarystatements This is an example of a successful response from the Get Summary Statements API, indicating the operation was successful and providing updated date information. ```json { "updatedDate": "2024-08-20 10:13:57.586", "success": true } ``` -------------------------------- ### Create Account Source: https://developer.zuora.com/api-references/api/operation/POST_Account This example demonstrates how to create a new account with basic contact and billing information. ```APIDOC ## POST /v1/accounts ### Description Creates a new account with the provided details. If a sold-to contact is not specified, it will be created from the bill-to contact. ### Method POST ### Endpoint /v1/accounts ### Parameters #### Request Body - **name** (string) - Required - The name of the account. - **billToContact** (object) - Required - The billing address information for the account. - **firstName** (string) - Required - The first name of the contact. - **lastName** (string) - Required - The last name of the contact. - **country** (string) - Required - The country of the contact's address. - **state** (string) - Required - The state of the contact's address. - **autoPay** (boolean) - Optional - Specifies if auto-pay is enabled for the account. - **currency** (string) - Required - The currency for the account (e.g., USD). - **billCycleDay** (integer) - Required - The day of the month for the billing cycle. ### Request Example ```json { "name": "Amy Lawrence", "billToContact": { "firstName": "Amy", "lastName": "Lawrence", "country": "United States", "state": "CA" }, "autoPay": false, "currency": "USD", "billCycleDay": 1 } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the newly created account. - **name** (string) - The name of the account. - **currency** (string) - The currency of the account. - **billCycleDay** (integer) - The billing cycle day of the account. #### Response Example ```json { "id": "8a80808e7d11111111117d1111111111", "name": "Amy Lawrence", "currency": "USD", "billCycleDay": 1 } ``` ``` -------------------------------- ### Using the AdminApiClient Source: https://developer.zuora.com/zephr-docs/zephr-sdk/zephr-sdk-reference/php-sdk.md This example shows how to instantiate and use the AdminApiClient to make requests to the Admin API, including setting up the client and sending a POST request to register a user. ```APIDOC ## Using the AdminApiClient ### Description This section provides an example of how to use the `AdminApiClient.php` to interact with the Admin API. It covers building the client, creating a request, and sending it, then processing the response. ### Code Example ```php require_once('AdminApiClient.php'); require_once('./vendor/autoload.php'); use Http\Discovery\MessageFactoryDiscovery; $blaizeAdminClient = AdminApiClient::build("44501ace-c533-4b9e-b4ea-cfa24d18c179", "1a3eadb4-1f54-470f-a0aa-1cf233f65bdd"); // The AdminApiClient still uses php-http so use an appropriate message factory from there $messageFactory = MessageFactoryDiscovery::find(); $registerRequestBody = array( "identifiers" => array("email_address" => "bob@bobberson.bob"), "validators" => array("password" => "sup3rS3cr3t!"), "attributes" => array("job-title" => "dogsbody", "allow-marketing" => "true", "company" => "Test-co")); $registerRequest = $messageFactory->createRequest('POST', 'https://demo.admin.blaize.io/v3/users', array("Content-Type" => "application/json"), json_encode($registerRequestBody)); // The public member "httpClientPool" exposes the php-http client pool interface $registerResponse = $blaizeAdminClient->httpClientPool->sendRequest($registerRequest); echo "Blaize responded with status: $registerResponse->getStatusCode() \n"; echo $registerResponse->getBody()->getContents(); ``` ``` -------------------------------- ### Get Invoice API Response Example Source: https://developer.zuora.com/other-api/quickstart-api/invoices/getinvoice This is an example of a successful response (200 OK) from the Get Invoice API. It includes pagination details and a data array containing invoice objects. ```json { "next_page": "W3sib3JkZXJCeSI6eyJmaWVsZCI6IlVwZGF0ZWREYXRlIiwib3JkZXIiOiJERVNDIn0sInZhbHVlIjoiMjAyMi0xMi0yMFQxMjoyODo1NC0wODowMCJ9LHsib3JkZXJCeSI6eyJmaWVsZCI6IklkIiwib3JkZXIiOiJERVNDIn0sInZhbHVlIjoiMmM5MmMwZjk2YWJjMTdkZTAxNmFiZDYyYmQwYzU4NTQifV0=", "data": [ { "…" }, { "…" }, { "…" }, { "…" } ] } ``` -------------------------------- ### GET Debit Memo Items Response Example Source: https://developer.zuora.com/api-references/api/operation/GET_DebitMemoItems This is an example of a successful response from the GET Debit Memo Items API. It shows the structure and typical values for a debit memo item. ```json { "amount": 1, "amountWithoutTax": 1, "appliedToItemId": "402890555a7d4022015a2dadb3b700a6", "balance": 1, "beAppliedAmount": 0, "comment": "aa", "createdById": "402881e522cf4f9b0122cf5d82860002", "createdDate": "2017-03-01 17:01:00", "excludeItemBillingFromRevenueAccounting": true, "financeInformation": { "deferredRevenueAccountingCode": "Subscription Revenue", "deferredRevenueAccountingCodeType": "SalesRevenue", "recognizedRevenueAccountingCode": "Subscription Revenue", "recognizedRevenueAccountingCodeType": "SalesRevenue" }, "id": "402890555a87d7f5015a8919e500002f", "processingType": "Charge", "quantity": 1, "serviceEndDate": "2017-03-26", "serviceStartDate": "2017-02-27", "sku": "SKU-00000002", "skuName": "ZTax Component", "soldToContactId": "402881e522cf4f9b0122cf5d82860003", "soldToContactSnapshotId": "402881e522cf4f9b0122cf5d82860004", "sourceItemId": "402890555a7d4022015a7dadb3b700a6", "sourceItemType": "InvoiceDetail", "subscriptionId": null, "success": true, "taxMode": "TaxExclusive", "taxationItems": { "data": [ … ] }, "unitOfMeasure": "Each", "unitPrice": 1, "updatedById": "402881e522cf4f9b0122cf5d82860002", "updatedDate": "2017-03-01 17:01:00" } ``` -------------------------------- ### Get File Status Request Example Source: https://developer.zuora.com/v1-api-reference/api/files/get_filestatus This example shows how to make a GET request to retrieve the status of a file using its ID. Ensure you replace `{file-id}` with the actual Zuora file ID. ```bash GET /v1/files/{file-id}/status ``` -------------------------------- ### List All Settings Response Sample Source: https://developer.zuora.com/settings-api/ListAllSettingsResponseSample.csv This sample demonstrates the structure of the response when listing all settings. It includes various subscription-related settings that can be configured for a tenant. ```APIDOC ## GET /settings ### Description Retrieves all settings for the tenant. ### Method GET ### Endpoint /settings ### Response #### Success Response (200) - **autoRenewJobScheduleId** (string) - The ID of the auto-renew job schedule. - **acceptanceOfOrders** (boolean) - Indicates if acceptance of orders is enabled. - **increasePriceRenewSubscription** (boolean) - Indicates if price increases are allowed upon subscription renewal. - **subscriptionsInvoicedSeparately** (boolean) - Indicates if subscriptions are invoiced separately. - **termType** (string) - The type of term for subscriptions (e.g., TERMED, EVERGREEN). - **updateChargeTriggerCondition** (boolean) - Indicates if the trigger condition for rate plan charges can be updated. - **description** (string) - A description of the setting. - **skipAmendmentGenerationBySubscribe** (boolean) - Controls asynchronous order generation when creating subscriptions. - **turnOffAmendmentsInTheUI** (boolean) - Controls whether amendment features are enabled in the UI. - **initialTerm** (integer) - The initial term for subscriptions in months. - **productFeatureOfSubscription** (boolean) - Indicates if product features are enabled for subscriptions. - **implementationPeriod** (boolean) - Indicates if an implementation period is configured. - **priceChangeOption** (string) - The option for price changes during renewal (e.g., NoChange, SpecificPercentageValue, UseLatestProductCatalogPricing). - **contractRenewal** (boolean) - Indicates if contract renewal is enabled. - **invoicePastEndOfTerm** (boolean) - Indicates if invoicing past the end of the term is allowed. - **enableOrderUI** (boolean) - Controls whether order features are enabled in the UI. - **autoRenewJobRunTime** (integer) - The time of day for the auto-renew job to run. - **orderMetricsTaxationOption** (string) - The taxation option for order metrics (e.g., YES, NO, ONLY_FOR_TAX_INCLUSIVE_CHARGES). - **autoRenewByOrder** (boolean) - Controls notifications sent for auto-renewal of subscriptions. - **priceIncreasePercentage** (number) - The percentage for price increases during renewal. - **skipOwnerTransferValidationForDeletionAccount** (boolean) - Controls whether to skip owner transfer validation for deleting accounts. - **updateSubscriptionActivationDate** (boolean) - Controls whether subscription activation dates can be updated. - **autoRenewJobRunTimeType** (string) - The type of run time for the auto-renew job (e.g., SystemDefault, TenantSpecified). - **enableAccountLevelDiscount** (boolean) - Controls whether account-level discounts are enabled. - **renewalTerm** (integer) - The renewal term for subscriptions in months. #### Response Example ```json { "autoRenewJobScheduleId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "acceptanceOfOrders": true, "increasePriceRenewSubscription": false, "subscriptionsInvoicedSeparately": true, "termType": "EVERGREEN", "updateChargeTriggerCondition": true, "description": "Subscription settings for the tenant.", "skipAmendmentGenerationBySubscribe": false, "turnOffAmendmentsInTheUI": false, "initialTerm": 12, "productFeatureOfSubscription": true, "implementationPeriod": false, "priceChangeOption": "NoChange", "contractRenewal": true, "invoicePastEndOfTerm": false, "enableOrderUI": true, "autoRenewJobRunTime": 2, "orderMetricsTaxationOption": "YES", "autoRenewByOrder": true, "priceIncreasePercentage": 5.0, "skipOwnerTransferValidationForDeletionAccount": false, "updateSubscriptionActivationDate": true, "autoRenewJobRunTimeType": "TenantSpecified", "enableAccountLevelDiscount": true, "renewalTerm": 12 } ``` ``` -------------------------------- ### Get Report List - Request Example Source: https://developer.zuora.com/other-api/revenue/reports/get_downloadreports This example shows how to make a GET request to retrieve a list of available reports created on a specific date. Ensure you include a valid authentication token in the headers. ```http GET /api/integration/v1/reports/list?createddate=2023-01-01 HTTP/1.1 Host: revenue.zuora.com Authorization: Bearer YOUR_AUTH_TOKEN ``` -------------------------------- ### Query Products in Node.js Source: https://developer.zuora.com/docs/get-started/tutorials/show-products.md This Node.js example shows how to fetch products using the Zuora client and log the result to the console. ```javascript const products = await zuoraClient.objectQueriesApi.queryProducts(); console.log(JSON.stringify(products, (k, v) => v ?? undefined, 2)) ``` -------------------------------- ### Get Plans API Response Example Source: https://developer.zuora.com/other-api/quickstart-api/plans/getplans This is an example of a successful response from the Get Plans API. It includes a `next_page` token for pagination and a `data` array containing plan objects. The `data` array is truncated for brevity. ```json { "next_page": "W3sib3JkZXJCeSI6eyJmaWVsZCI6IlVwZGF0ZWREYXRlIiwib3JkZXIiOiJERVNDIn0sInZhbHVlIjoiMjAyMi0xMi0yMFQxMjoyODo1NC0wOC0wMCJ9LHsib3JkZXJCeSI6eyJmaWVsZCI6IklkIiwib3JkZXIiOiJERVNDIn0sInZhbHVlIjoiMmM5MmMwZjk2YWJjMTdkZTAxNmFiZDYyYmQwYzU4NTQifV0=", "data": [ { … }, { … }, { … }, { … }, { … } ] } ``` -------------------------------- ### Example Product Charge Definitions Update Source: https://developer.zuora.com/v1-api-reference/api/product-charge-definitions/put_updateproductchargedefinitionbulk.md This example demonstrates how to update product charge definitions, including setting prices and defining tiered pricing structures for different currencies. ```json [ { "productChargeDefinitionKey": "CD-00052014", "prices": [ { "currency": "USD", "price": 22 } ], "tiers": [ { "startingUnit": "1", "endingUnit": "150", "currency": "USD", "price": 1.95, "priceFormat": "Per Unit" }, { "startingUnit": "151", "endingUnit": "300", "currency": "USD", "price": 1.45, "priceFormat": "Per Unit" }, { "startingUnit": "1", "endingUnit": "150", "currency": "EUR", "price": 1.75, "priceFormat": "Per Unit" }, { "startingUnit": "151", "endingUnit": "300", "currency": "EUR", "price": 1.30, "priceFormat": "Per Unit" } ] } ] ``` -------------------------------- ### Get Billing Period Start Days Source: https://developer.zuora.com/settings-api/ListAllSettingsResponseSample.csv Retrieves the allowed days in the month for billing periods to start. ```APIDOC ## GET /settings/billing-period-starts ### Description Retrieves the allowed days in the month for billing periods to start. This is applicable for billing periods that are an integral number of month(s). ### Method GET ### Endpoint /settings/billing-period-starts ### Response #### Success Response (200) - **billingPeriodStartDays** (array) - An array of numbers representing the allowed days of the month for billing period starts. #### Response Example { "billingPeriodStartDays": [ 1, 15, 30 ] } ``` -------------------------------- ### Retrieve a Product - Response Example Source: https://developer.zuora.com/zephr-api-reference/zephr-admin-api/products/deleteproduct This is an example of a successful response when retrieving a product's details. It includes all the product's configuration, such as ID, label, description, entitlement, mapping, and sharing limit. ```json { "tenantId": "company", "subTenantId": "company|demo", "id": "gold", "label": "Gold Subscription", "description": "The most premium subscription.", "entitlement": { "id": "gold-bundle", "type": "bundle", "entitlementTenant": "company" }, "mapping": { "braintree_one_off": { ... } }, "sharingLimit": 5 } ``` -------------------------------- ### Get Report List Request Example Source: https://developer.zuora.com/other-api/revenue/reports/get_reportlist This example demonstrates how to make a GET request to the /api/integration/v1/reports/list endpoint to retrieve a list of reports created on a specific date. Ensure you include a valid authentication token in the 'token' header. ```bash curl -X GET \ 'https://your-zuora-revenue-instance.com/api/integration/v1/reports/list?createddate=2023-10-26' \ -H 'token: YOUR_AUTH_TOKEN' ``` -------------------------------- ### Query Product Rate Plans with Charges and Tiers (Node.js) Source: https://developer.zuora.com/docs/get-started/tutorials/show-product-details.md This Node.js example shows how to query product rate plans, including their charges and charge tiers, by filtering on the product ID. The response is then logged to the console. ```javascript const resp = await zuoraClient.objectQueriesApi.queryProductRatePlans({ filter: ["productId.EQ:" + productId], expand: ['productrateplancharges', 'productrateplancharges.productrateplanchargetiers'] }); console.log(JSON.stringify(resp, (k, v) => v ?? undefined, 2)); ``` -------------------------------- ### Install a Tenant Source: https://developer.zuora.com/zephr-api-reference/zephr-admin-api/configuration/getconfiguration Installs a tenant in Blaize. ```APIDOC ## POST /v3/initialize ### Description Installs a tenant in Blaize. ### Method POST ### Endpoint /v3/initialize ### Response #### Success Response (200) OK ``` -------------------------------- ### Get Payment Schedule Statistic Response Source: https://developer.zuora.com/v1-api-reference/api/payment-schedules/get_paymentschedulestatistic Example response for the Get Payment Schedule Statistic API endpoint. ```APIDOC ## GET /v1/payment-schedules/{id}/statistic ### Description Retrieves statistics for a specific payment schedule. ### Method GET ### Endpoint /v1/payment-schedules/{id}/statistic ### Response #### Success Response (200) - **scheduledDate** (string) - The date the payment is scheduled. - **runHour** (integer) - The hour the payment is scheduled to run. - **paymentMethodId** (string) - The ID of the payment method used. - **paymentGatewayId** (string) - The ID of the payment gateway used (null if not applicable). - **paymentGatewayNumber** (string) - The number of the payment gateway (null if not applicable). - **amount** (number) - The amount of the payment. - **balance** (number) - The remaining balance. - **currency** (string) - The currency of the payment. - **status** (string) - The status of the payment schedule (e.g., "Pending"). - **errorMessage** (string) - An error message if the payment failed (null if successful). - **paymentId** (string) - The ID of the payment if it has been processed (null otherwise). - **billingDocument** (object) - Information about the associated billing document. - **id** (string) - The ID of the billing document. - **number** (string) - The number of the billing document. - **type** (string) - The type of the billing document. - **description** (string) - A description for the payment schedule (null if not provided). - **cancellationReason** (string) - The reason for cancellation (null if not cancelled). - **cancelledById** (string) - The ID of the user who cancelled the schedule (null if not cancelled). - **cancelledOn** (string) - The date and time the schedule was cancelled (null if not cancelled). - **createdDate** (string) - The date and time the payment schedule was created. - **createdById** (string) - The ID of the user who created the payment schedule. - **updatedDate** (string) - The date and time the payment schedule was last updated. - **updatedById** (string) - The ID of the user who last updated the payment schedule. - **success** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "scheduledDate": "2024-07-31", "runHour": 0, "paymentMethodId": "8a90b44890c9bb0d0190d960b9191eea", "paymentGatewayId": null, "paymentGatewayNumber": null, "amount": 14.99, "balance": 14.99, "currency": "USD", "status": "Pending", "errorMessage": null, "paymentId": null, "billingDocument": { "id": "8a90b44890c9bb0d0190d8c048a90da6", "number": "INV00001823", "type": "Invoice" }, "description": null, "cancellationReason": null, "cancelledById": null, "cancelledOn": null, "createdDate": "2024-07-22 13:29:43", "createdById": "2c92c8f95e2d6ebb015e325df48e02da", "updatedDate": "2024-07-22 15:40:21", "updatedById": "2c92c8f95e2d6ebb015e325df48e02da", "success": true } ``` ``` -------------------------------- ### List All Settings Response Sample Source: https://developer.zuora.com/settings-api/ListAllSettingsResponseSample.csv This sample demonstrates the structure of a successful response when retrieving all settings. It includes detailed information about revenue recognition rules, transaction rules, and other configuration parameters. ```APIDOC ## Response ### Success Response (200) - **transactionDateRule** (string) - Specifies the transaction date rule for revenue recognition. Possible values: `RecognizeWithoutImpact`, `AccumulateToTransactionDate`. - **invoiceItemAdjustmentTransactionRule** (object) - Defines the transaction rule for invoice item adjustments. Refers to `RevenueTransactionRule`. - **name** (string) - The name of the setting. Maximum length: 50 characters. - **roundingRule** (string) - Specifies the rounding rule. Possible values: `RoundLast`, `RoundTrailing`. - **description** (string) - A description of the setting. Maximum length: 500 characters. - **active** (boolean) - Indicates if the setting is active. Defaults to `false`. - **apClosedDistributionRule** (string) - Specifies the distribution rule for AP closed items. Possible value: `MergeToNextOpen`. - **id** (string) - Unique identifier for the revenue recognition rule. - **invoiceItemTransactionRule** (object) - Defines the transaction rule for invoice items. Refers to `RevenueTransactionRule`. - **creditMemoTransactionRules** (array) - A list of transaction rules for credit memos. Each item refers to `CreditMemoTransactionRule`. - **debitMemoTransactionRules** (array) - A list of transaction rules for debit memos. Each item refers to `CreditMemoTransactionRule`. - **recognitionModel** (string) - Specifies the revenue recognition model. Possible values: `UponInvoicing`, `Daily`, `Monthly`, `SpecificDate`, `Manually`, `Unlimited`. ### Response Example ```json { "transactionDateRule": "RecognizeWithoutImpact", "invoiceItemAdjustmentTransactionRule": { "termStartField": "InvoiceDate", "termEndField": "InvoiceDueDate" }, "name": "Default Revenue Rule", "roundingRule": "RoundLast", "description": "Applies standard revenue recognition rules.", "active": true, "apClosedDistributionRule": "MergeToNextOpen", "id": "rr_12345", "invoiceItemTransactionRule": { "termStartField": "ChargeStartDate", "termEndField": "ChargeEndDate" }, "creditMemoTransactionRules": [ { "termStartField": "CreditMemoDate", "termEndField": "MaximumDate" } ], "debitMemoTransactionRules": [], "recognitionModel": "Daily" } ``` ### Definitions #### RevenueTransactionRule - **termStartField** (string) - The field to use as the start of the term. Possible values include: `SubscriptionStartDate`, `SubscriptionEndDate`, `ChargeStartDate`, `ChargeEndDate`, `ChargeTriggerDate`, `InvoiceDate`, `InvoiceDueDate`, `InvoiceItemServicePeriodStart`, `InvoiceItemServicePeriodEnd`, `InvoiceItemAdjustmentDate`, `IIAServicePeriodStart`, `IIAServicePeriodEnd`, `RecognitionTermStartDate`, `MaximumDate`, `CMIServicePeriodStart`, `DMIServicePeriodStart`, `CMIServicePeriodEnd`, `DMIServicePeriodEnd`, `CreditMemoDate`, `DebitMemoDate`, `DebitMemoDueDate`. - **termEndUnitOfFixedPeriod** (string) - The unit for a fixed period term end. Possible values: `Years`, `Months`, `Days`. - **termEndField** (string) - The field to use as the end of the term. Possible values include: `SubscriptionStartDate`, `SubscriptionEndDate`, `ChargeStartDate`, `ChargeEndDate`, `ChargeTriggerDate`, `InvoiceDate`, `InvoiceDueDate`, `InvoiceItemServicePeriodStart`, `InvoiceItemServicePeriodEnd`, `InvoiceItemAdjustmentDate`, `IIAServicePeriodStart`, `IIAServicePeriodEnd`, `RecognitionTermStartDate`, `MaximumDate`, `CMIServicePeriodStart`, `DMIServicePeriodStart`, `CMIServicePeriodEnd`, `DMIServicePeriodEnd`, `CreditMemoDate`, `DebitMemoDate`, `DebitMemoDueDate`. ```