Skip to content

Get payment history

Returns a history of payments.

Authentication Required

Requires account user level access.

Arguments

Returns

query filterAccountPaymentsUsingReasons(
    $accountNumber: String!,
    $status:AccountPaymentStatusOptions!,
    $reason: PaymentReasonOptions!,
    $first: Int!){
       account(accountNumber: $accountNumber){
          payments(first: $first, reason: $reason, status: $status){
            edges {
                node {
                  status
                  amount
                  paymentDate
                  reference
                  transactionType
                  surchargeAmount
                }
            }
         }
       }
    }
1
2
3
4
5
6
7
# Input variables
{
    "accountNumber": "A-12345",
    "status": "CLEARED",
    "reason": "REGULAR_SCHEDULE",
    "first": 5
}

Example

Get auto top off payment history

Returns cleared payments that were applied to top up a payment schedule (applies to customers with a pre-pay agreement).

Note: amount is returned in cents.

query filterAccountPaymentsUsingReasons(
    $accountNumber: String!,
    $status:AccountPaymentStatusOptions!,
    $reason: PaymentReasonOptions!,
    $first: Int!){
       account(accountNumber: $accountNumber){
          payments(first: $first, reason: $reason, status: $status){
            edges {
                node {
                  status
                  amount
                  paymentDate
                  reference
                  transactionType
                  surchargeAmount
                }
            }
         }
       }
    }
1
2
3
4
5
6
7
# Input variables
{
    "accountNumber": "A-12345",
    "status": "CLEARED",
    "reason": "BALANCE_THRESHOLD_CROSSED",
    "first": 5,
}
{
  "data": {
    "account": {
      "payments": {
        "edges": [
          {
            "node": {
              "status": "CLEARED",
              "amount": 5000,
              "paymentDate": "2022-08-24",
              "reference": "abcd_12345_redacted",
              "transactionType": "DD_REGULAR_COLLECTION",
              "surchargeAmount": 0
            }
          },
          {
            "node": {
              "status": "CLEARED",
              "amount": 5000,
              "paymentDate": "2022-08-01",
              "reference": "abcd_12345_redacted",
              "transactionType": "DD_REGULAR_COLLECTION",
              "surchargeAmount": 0
            }
          },
          {
            "node": {
              "status": "CLEARED",
              "amount": 5000,
              "paymentDate": "2022-06-28",
              "reference": "abcd_12345_redacted",
              "transactionType": "CREDIT_CARD",
              "surchargeAmount": 0
            }
          },
          {
            "node": {
              "status": "CLEARED",
              "amount": 5000,
              "paymentDate": "2022-06-13",
              "reference": "abcd_12345_redacted",
              "transactionType": "DD_REGULAR_COLLECTION",
              "surchargeAmount": 0
            }
          },
          {
            "node": {
              "status": "CLEARED",
              "amount": 5000,
              "paymentDate": "2022-05-28",
              "reference": "abcd_12345_redacted",
              "transactionType": "DD_REGULAR_COLLECTION",
              "surchargeAmount": 0
            }
          }
        ]
      }
    }
  }
}
Back to top