Skip to content

API Reference: Billing API

by zuora.com

No authHTTPSFinance
Open documentation ↗

Overview

# Introduction Welcome to the reference for the Zuora Billing REST API! To learn about the common use cases of Zuora Billing REST APIs, check out the [API Guides](https://www.zuora.com/developer/api-guides/). In addition to Zuora API Reference; Billing, we also provide API references for other Zuora products: * [API Reference: Collect](https://www.zuora.com/developer/collect-api/) * [API Reference: Revenue](https://www.zuora.com/developer/revpro-api/) The Zuora REST API provides a broad set of operations and resources that: * Enable Web Storefront integration from your website. * Support self-service subscriber sign-ups and account management. * Process revenue schedules through custom revenue rule models. * Enable manipulation of most objects in the Zuora Billing Object Model. Want to share your opinion on how our API works for you? <a href="https://community.zuora.com/t5/Developers/API-Feedback-Form/gpm-p/21399" target="_blank">Tell us how you feel </a>about using our API and what we can do to make it better. ## Access to the API If you have a Zuora tenant, you can access the Zuora REST API via one of the following endpoints: | Tenant | Base URL for REST Endpoints | |-------------------------|-------------------------| |US Production | https://rest.zuora.com | |US API Sandbox | https://rest.apisandbox.zuora.com| |US Performance Test | https://rest.pt1.zuora.com | |US Production Copy | Submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a> to enable the Zuora REST API in your tenant and obtain the base URL for REST endpoints. See [REST endpoint base URL of Production Copy (Service) Environment for existing and new customers](https://community.zuora.com/t5/API/REST-endpoint-base-URL-of-Production-Copy-Service-Environment/td-p/29611) for more information. | |US Cloud Production | https://rest.na.zuora.com | |US Cloud API Sandbox | https://rest.sandbox.na.zuora.com | |US Central Sandbox | https://rest.test.zuora.com | |EU Production | https://rest.eu.zuora.com | |EU API Sandbox | https://rest.sandbox.eu.zuora.com | |EU Central Sandbox | https://rest.test.eu.zuora.com | The Production endpoint provides access to your live user data. Sandbox tenants are a good place to test code without affecting real-world data. If you would like Zuora to provision a Sandbox tenant for you, contact your Zuora representative for assistance. If you do not have a Zuora tenant, go to <a href="https://www.zuora.com/resource/zuora-test-drive" target="_blank">https://www.zuora.com/resource/zuora-test-drive</a> and sign up for a Production Test Drive tenant. The tenant comes with seed data, including a sample product catalog. # API Changelog You can find the <a href="https://community.zuora.com/t5/Developers/API-Changelog/gpm-p/18092" target="_blank">Changelog</a> of the API Reference: Billing in the Zuora Community. # Authentication ## OAuth v2.0 Zuora recommends that you use OAuth v2.0 to authenticate to the Zuora REST API. Currently, OAuth is not available in every environment. See [Zuora Testing Environments](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Zuora_Environments) for more information. Zuora recommends you to create a dedicated API user with API write access on a tenant when authenticating via OAuth, and then create an OAuth client for this user. See <a href="https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users/Create_an_API_User" target="_blank">Create an API User</a> for how to do this. By creating a dedicated API user, you can control permissions of the API user without affecting other non-API users. If a user is deactivated, all of the user's OAuth clients will be automatically deactivated. Authenticating via OAuth requires the following steps: 1. Create a Client 2. Generate a Token 3. Make Authenticated Requests ### Create a Client You must first [create an OAuth client](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/

API Reference: Billing is a finance API from zuora.com. It needs no API key. It is served over HTTPS. Its OpenAPI description documents 428 endpoints.

At a glance

Authentication
No auth
HTTPS
Yes
CORS
Unknown
Category
Finance
Base URL
https://rest.zuora.com
Version
2021-08-20
Endpoints
428
Spec updated
2021-08-23

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://rest.zuora.com/charge-metrics/data/charge-metrics" \
  -H "Accept: application/json"
JavaScript
const response = await fetch("https://rest.zuora.com/charge-metrics/data/charge-metrics", {
  method: "GET",
  headers: {
    "Accept": "application/json",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://rest.zuora.com/charge-metrics/data/charge-metrics",
    headers={
    "Accept": "application/json",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/charge-metrics/data/charge-metricsList charge metrics by time range
GET/charge-metrics/data/charge-metrics-discount-allocation-detailList discount allocation details by time range
GET/events/event-triggersList event triggers
POST/events/event-triggersCreate an event trigger
GET/events/event-triggers/{id}Retrieve an event trigger
PUT/events/event-triggers/{id}Update an event trigger
DELETE/events/event-triggers/{id}Delete an event trigger
GET/notifications/email-templatesList email templates
POST/notifications/email-templatesCreate an email template
GET/notifications/email-templates/{id}Retrieve an email template
PUT/notifications/email-templates/{id}Update an email template
DELETE/notifications/email-templates/{id}Delete an email template
DELETE/notifications/historyDelete notification histories for an account
GET/notifications/history/tasks/{id}Retrieve a notification history deletion task
GET/notifications/notification-definitionsList notification definitions
POST/notifications/notification-definitionsCreate a notification definition
GET/notifications/notification-definitions/{id}Retrieve a notification definition
PUT/notifications/notification-definitions/{id}Update a notification definition
DELETE/notifications/notification-definitions/{id}Delete a notification definition
POST/oauth/tokenCreate an OAuth token
POST/objects/batch/default/{object}Update or delete custom object records
GET/objects/definitions/defaultList custom object definitions
POST/objects/definitions/defaultCreate custom object definitions
GET/objects/definitions/default/{object}Retrieve a custom object definition
DELETE/objects/definitions/default/{object}Delete a custom object definition
GET/objects/jobsList all custom object bulk jobs
POST/objects/jobsSubmit a custom object bulk job
GET/objects/jobs/{id}Retrieve a custom object bulk job
GET/objects/jobs/{id}/errorsList all errors for a custom object bulk job
POST/objects/jobs/{id}/filesUpload a file for a custom object bulk job
POST/objects/migrationsUpdate a custom object definition
GET/objects/records/default/{object}List records for a custom object
POST/objects/records/default/{object}Create custom object records
GET/objects/records/default/{object}/{id}Retrieve a custom object record
PUT/objects/records/default/{object}/{id}Update a custom object record
PATCH/objects/records/default/{object}/{id}Partially update a custom object record
DELETE/objects/records/default/{object}/{id}Delete a custom object record
GET/query/jobsList data query jobs
POST/query/jobsSubmit a data query
GET/query/jobs/{job-id}Retrieve a data query job
DELETE/query/jobs/{job-id}Cancel a data query job
POST/settings/batch-requestsSubmit settings requests
GET/settings/listingList all settings
GET/v1/accounting-codesList all accounting codes
POST/v1/accounting-codesCreate an accounting code
GET/v1/accounting-codes/{ac-id}Retrieve an accounting code
PUT/v1/accounting-codes/{ac-id}Update an accounting code
DELETE/v1/accounting-codes/{ac-id}Delete an accounting code
PUT/v1/accounting-codes/{ac-id}/activateActivate an accounting code
PUT/v1/accounting-codes/{ac-id}/deactivateDeactivate an accounting code
GET/v1/accounting-periodsList all accounting periods
POST/v1/accounting-periodsCreate an accounting period
GET/v1/accounting-periods/{ap-id}Retrieve an accounting period
PUT/v1/accounting-periods/{ap-id}Update an accounting period
DELETE/v1/accounting-periods/{ap-id}Delete an accounting period
PUT/v1/accounting-periods/{ap-id}/closeClose an accounting period
PUT/v1/accounting-periods/{ap-id}/pending-closeSet an accounting period to pending close
PUT/v1/accounting-periods/{ap-id}/reopenReopen an accounting period
PUT/v1/accounting-periods/{ap-id}/run-trial-balanceRun trial balance
POST/v1/accountsCreate an account
POST/v1/accounts/billing-documents/files/deletion-jobsCreate a job to hard delete billing document files
GET/v1/accounts/billing-documents/files/deletion-jobs/{jobId}Retrieve a job of hard deleting billing document files
GET/v1/accounts/{account-key}Retrieve an account
PUT/v1/accounts/{account-key}Update an account
GET/v1/accounts/{account-key}/summaryRetrieve an account summary
POST/v1/accounts/{id}/billing-documents/generateGenerate billing documents by account ID
POST/v1/action/amendAmend
POST/v1/action/createCreate
POST/v1/action/deleteDelete
POST/v1/action/executeExecute
POST/v1/action/generateGenerate
POST/v1/action/queryQuery
POST/v1/action/queryMoreQueryMore
POST/v1/action/subscribeSubscribe
POST/v1/action/updateUpdate
GET/v1/amendments/subscriptions/{subscription-id}List all amendments of a subscription
GET/v1/amendments/{amendment-key}Retrieve an amendment
GET/v1/async-jobs/{jobId}Retrieve the status and response of a job
POST/v1/async/ordersCreate an order asynchronously
POST/v1/async/orders/previewPreview an order asynchronously
POST/v1/attachmentsCreate an attachment
GET/v1/attachments/{attachment-id}Retrieve an attachment
PUT/v1/attachments/{attachment-id}Update an attachment
DELETE/v1/attachments/{attachment-id}Delete an attachment
GET/v1/attachments/{object-type}/{object-key}List attachments by object type and key
POST/v1/bill-runs/{billRunId}/emailsEmail billing documents generated from a bill run
GET/v1/billing-documentsList billing documents for an account
POST/v1/billing-preview-runsCreate a billing preview run
GET/v1/billing-preview-runs/{billingPreviewRunId}Retrieve a billing preview run
POST/v1/bulkPerform a mass action
GET/v1/bulk/{bulk-key}List all results of a mass action
PUT/v1/bulk/{bulk-key}/stopStop a mass action
GET/v1/catalog/product/{product-id}Retrieve a product
GET/v1/catalog/productsList all products
POST/v1/catalog/products/{product-id}/shareMulti-entity: Share a product with an entity
GET/v1/charge-revenue-summaries/subscription-charges/{charge-key}Retrieve a charge revenue summary by charge ID
GET/v1/charge-revenue-summaries/{crs-number}List all details of a charge revenue summary
POST/v1/connectionsEstablish a connection to Zuora REST API
PUT/v1/contacts/{contactId}/scrubScrub a contact
GET/v1/creditmemosList credit memos

Showing the first 100 of 428 endpoints; the full list is in the documentation.

Questions

Does the API Reference: Billing API need an API key?

No. The API Reference: Billing API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.

Does the API Reference: Billing API support HTTPS?

Yes, the API Reference: Billing API is served over HTTPS.

How many endpoints does the API Reference: Billing API have?

Its OpenAPI description lists 428 endpoints in version 2021-08-20. The first 100 are shown on this page.

What are alternatives to the API Reference: Billing API?

Other Finance APIs include Stripe, SEC EDGAR Data, Plaid, Fed Treasury, Razorpay IFSC.

Compare alternatives →

Listed from APIs.guru (CC0).