Skip to content

Check account details

End-user flow

Imagine you want to create a "My Account Details" menu option or button. Your customers can confirm their bill-to address and view their account balances.

Sample code

The following sample code calls the Retrieve an account API, which returns their account details including the bill-to contact information.

The account number can be obtained from the "Create a billing account" section.

cURL
curl -L -g -X GET 'https://rest.test.zuora.com/object-query/accounts/A00000029?expand[]=billto' \
-H 'Authorization: Bearer 55969055e1804f139126a5890fc9ff84'

If the request succeeds, you will get a response similar to the following snippet:

{
    "accountNumber": "A00000029",
    "allowInvoiceEdit": false,
    "autoPay": false,
    "balance": 149.97,
    "batch": "Batch1",
    "bcdSettingOption": "ManualSet",
    "billCycleDay": 1,
    "billToId": "8a8aa3bc90e7ff5f019125e2896e6ff0",
    "createdById": "ebd653b0f1ea46df87835085e26897ce",
    "createdDate": "2024-08-06T04:11:28Z",
    "creditBalance": 0.0,
    "currency": "USD",
    "id": "8a8aa3bc90e7ff5f019125e2893f6fef",
    "invoiceDeliveryPrefsEmail": false,
    "invoiceDeliveryPrefsPrint": false,
    "invoiceTemplateId": "8a368bbf87b6d5910187b80ab8f40d0b",
    "lastInvoiceDate": "2024-08-07",
    "mrr": 249.95,
    "name": "Amy's account",
    "partnerAccount": false,
    "paymentMethodCascadingConsent": false,
    "paymentTerm": "Due Upon Receipt",
    "soldToId": "8a8aa3bc90e7ff5f019125e2897b6ff2",
    "status": "Active",
    "taxExemptStatus": "No",
    "totalDebitMemoBalance": 0.0,
    "totalInvoiceBalance": 149.97,
    "unappliedBalance": 0.0,
    "unappliedCreditMemoAmount": 0.0,
    "updatedById": "ebd653b0f1ea46df87835085e26897ce",
    "updatedDate": "2024-08-07T09:30:39Z",
    "billTo": {
        "accountId": "8a8aa3bc90e7ff5f019125e2893f6fef",
        "country": "United States",
        "createdById": "ebd653b0f1ea46df87835085e26897ce",
        "createdDate": "2024-08-06T04:11:28Z",
        "firstName": "Amy",
        "id": "8a8aa3bc90e7ff5f019125e2896e6ff0",
        "lastName": "Lawrence",
        "state": "California",
        "updatedById": "ebd653b0f1ea46df87835085e26897ce",
        "updatedDate": "2024-08-06T04:11:28Z"
    }
}