Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Transactions > Get payments

Get payments

Retrieves payments for a specified account.  

Payments are returned in reverse chronological order by updatedDate.

Request

  • Production: GET https://api.zuora.com/rest/v1/transactions/payments/accounts/{account-key}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/transactions/payments/accounts/{account-key}

Request parameters

accountKey

required

path

Account number or account ID

pageSize

optional

query

Number of rows to return. Maximum is 40; default is 20.

Response

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

payments

Information about one or more payments:

id

PaymentID

accountID

Customer account ID

accountNumber

Customer account number

type

Possible values are: External, Electronic.

effectiveDate

Effective payment date as yyyy-mm-dd

paymentNumber

Unique payment number 

paymentMethodID

Payment method

amount

Payment amount

paidInvoices

Information about one or more invoices to which this payment was applied:

invoiceID

Invoice ID

invoiceNumber

Invoice number

appliedPaymentAmount

Amount of the payment applied to this invoice

gatewayTransactionNumber

Transaction ID from payment gateway

status

Possible values are: Draft, Processing, Processed, Error, Voided, Canceled, Posted.

cf_txtn__c

One or more custom fields

cf_pkn__c

One or more custom fields

nextPage

URL for requesting the next page of the response, if it exists; otherwise absent

Examples

HTTP/JSON request:

GET https://api.zuora.com/rest/v1/transa...15?pageSize=10

JSON response:

{
  "success": true,
  "payments": [
    {
      "paymentMethodId": "2c92c8f83dabf9cf013daef12dd303b0",
      "paidInvoices": [
        {
          "invoiceId": "2c92a09539190dbe0139190f42780012",
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0
        },
        {
          "invoiceId": "2c92a0953a3fa95d013a407c10a60100",
          "invoiceNumber": "INV00000323",
          "appliedPaymentAmount": 139722.1
        },
        {
          "invoiceId": "2c92a09739190dc60139194bcf1b0098",
          "invoiceNumber": "INV00000160",
          "appliedPaymentAmount": 10521.0
        }
      ],
      "effectiveDate": "2013-03-27",
      "accountId": "2c92a0f9391832b10139183e277a0042",
      "accountName": "subscribeCallYan_1",
      "id": "2c92c8f83dabf9cf013daf3bfa0305a6",
      "status": "Processed",
      "paymentNumber": "P-00000075",
      "gatewayTransactionNumber": null,
      "type": "Electronic",
      "accountNumber": "A00001115",
      "amount": 150248.1
    },
    {
      "paymentMethodId": "2c92a0f9391832b10139183e279e0044",
      "paidInvoices": [
        {
          "invoiceId": "2c92a09539190dbe0139190f42780012",
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0
        }
      ],
      "effectiveDate": "2012-08-11",
      "accountId": "2c92a0f9391832b10139183e277a0042",
      "accountName": "subscribeCallYan_1",
      "id": "2c92a0f9391832b101391922ad5f049d",
      "status": "Processed",
      "paymentNumber": "P-00000056",
      "gatewayTransactionNumber": null,
      "type": "Electronic",
      "accountNumber": "A00001115",
      "amount": 5.0
    }
  ]
}

CURL request:

##
## Query Payments
##
echo
echo "=============Get Payments by Account Key============="
echo
curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Accept:application/json" -X GET $BASE_URL/v1/transactions/payments/accounts/A00000001

JSON response:

{
  "success": true,
  "payments": [
    {
      "paymentMethodId": "2c92c8f83dabf9cf013daef12dd303b0",
      "paidInvoices": [
        {
          "invoiceId": "2c92a09539190dbe0139190f42780012",
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0
        },
        {
          "invoiceId": "2c92a0953a3fa95d013a407c10a60100",
          "invoiceNumber": "INV00000323",
          "appliedPaymentAmount": 139722.1
        },
        {
          "invoiceId": "2c92a09739190dc60139194bcf1b0098",
          "invoiceNumber": "INV00000160",
          "appliedPaymentAmount": 10521.0
        }
      ],
      "effectiveDate": "2013-03-27",
      "accountId": "2c92a0f9391832b10139183e277a0042",
      "accountName": "subscribeCallYan_1",
      "id": "2c92c8f83dabf9cf013daf3bfa0305a6",
      "status": "Processed",
      "paymentNumber": "P-00000075",
      "gatewayTransactionNumber": null,
      "type": "Electronic",
      "accountNumber": "A00001115",
      "amount": 150248.1
    },
    {
      "paymentMethodId": "2c92a0f9391832b10139183e279e0044",
      "paidInvoices": [
        {
          "invoiceId": "2c92a09539190dbe0139190f42780012",
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0
        }
      ],
      "effectiveDate": "2012-08-11",
      "accountId": "2c92a0f9391832b10139183e277a0042",
      "accountName": "subscribeCallYan_1",
      "id": "2c92a0f9391832b101391922ad5f049d",
      "status": "Processed",
      "paymentNumber": "P-00000056",
      "gatewayTransactionNumber": null,
      "type": "Electronic",
      "accountNumber": "A00001115",
      "amount": 5.0
    }
  ]
}
Last modified
10:39, 7 Feb 2016

Tags

Classifications

(not set)