This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Transactions in Zuora
Overview
The following operations allow you to work with transactions. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with transactions, see Sample configuration.
Operation | Description |
---|---|
Get the invoices detail | |
getPayments | Get the payments detail |
createAndCollectInvoice | Generate and collect invoice |
Operation details
This section provides further details on the operations related to transactions.
Get the invoice detail
The getInvoices
operation retrieves invoice detail.
<zuora.getInvoices> <accountKey>{$ctx:accountKey}</accountKey> <pageSize>{$ctx:pageSize}</pageSize> </zuora.getInvoices>
Properties
accountKey:
pageSize:
Number of rows to return.
Sample request
Following is a sample REST/JSON request that can be handled by the
getInvoices
operation.
{ "apiUrl":"https://apisandbox-api.zuora.com/rest", "apiVersion":"v1", "apiAccessKeyId":"ZuoraTest@wso2.com", "apiSecretAccessKey":"ZuoraTest@wso2", "accountKey":" A00000669", "pageSize":"10" }
Related Zuora documentation
Get the payments detail
The getPayments
operation gets the payments detail.
<zuora.getPayments> <accountKey>{$ctx:accountKey}</accountKey> <pageSize>{$ctx:pageSize}</pageSize> </zuora.getPayments>
Properties
accountKey:
pageSize:
Number of rows to return.
Sample request
Following is a sample REST/JSON request that can be handled by the getPayments
operation.
{ "apiUrl":"https://apisandbox-api.zuora.com/rest", "apiVersion":"v1", "apiAccessKeyId":"ZuoraTest@wso2.com", "apiSecretAccessKey":"ZuoraTest@wso2", "accountKey":" A00000669", "pageSize":"10" }
Related Zuora documentation
Generate and collect invoice
The createAndCollectInvoice
operation generates and collects invoice.
<zuora.createAndCollectInvoice> <accountKey>{$ctx:accountKey}</accountKey> <invoiceId>{$ctx:invoiceId}</invoiceId> <paymentGateway>{$ctx:paymentGateway}</paymentGateway> <invoiceDate>{$ctx:invoiceDate}</invoiceDate> <invoiceTargetDate>{$ctx:invoiceTargetDate}</invoiceTargetDate> </zuora.createAndCollectInvoice>
Properties
accountKey:
invoiceId:
The ID of an existing invoice for which to collect payment using the account's default payment method.paymentGateway
: The name of the gateway that will be used for the payment.invoiceDate
: The invoice date that should appear on the invoice being generated, in yyyy-mm-dd format.invoiceTargetDate
: The date, in yyyy-mm-dd format, through which charges on this account will be processed when generating a new invoice.
Sample request
Following is a sample REST/JSON request that can be handled by the getPayments
operation.
{ "apiUrl":"https://apisandbox-api.zuora.com/rest", "apiVersion":"v1", "apiAccessKeyId":"ZuoraTest@wso2.com", "apiSecretAccessKey":"ZuoraTest@wso2", "accountKey":" A00000669", "invoiceId":"4028925a4cb74ec9014cb7540988002e", "paymentGateway”:"TestGateway" }
Related Zuora documentation
Sample configuration
Following is a sample proxy service that illustrates how to connect to Zuora with the init
operation and use the getInvoices
operation. The sample request for this proxy can be found in getInvoices sample request. You can use this sample as a template for using other operations in this category.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="zuora_GetInvoices" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiVersion" expression="json-eval($.apiVersion)"/> <property name="apiAccessKeyId" expression="json-eval($.apiAccessKeyId)"/> <property name="apiSecretAccessKey" expression="json-eval($.apiSecretAccessKey)"/> <property name="accountKey" expression="json-eval($.accountKey)"/> <property name="pageSize" expression="json-eval($.pageSize)"/> <zuora.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiVersion>{$ctx:apiVersion}</apiVersion> <apiAccessKeyId>{$ctx:apiAccessKeyId}</apiAccessKeyId> <apiSecretAccessKey>{$ctx:apiSecretAccessKey}</apiSecretAccessKey> </zuora.init> <zuora.getInvoices> <accountKey>{$ctx:accountKey}</accountKey> <pageSize>{$ctx:pageSize}</pageSize> </zuora.getInvoices> <respond/> </inSequence> </target> <description/> </proxy>