Docs

Get payment history

https://api.apifonica.com/v2/accounts/{accountSID}/balance/payments

Overview

To receive the payment history, make the GET request to the /accounts/{accountSID}/balance/payments resource.

Request example

The following example demonstrates getting the payment history.

curl –X GET ‘https://api.apifonica.com/v2/accounts/{accountSID}/balance/payments’ \
-u {accountSID}:{authToken}

Response example

{
  "limit": 20,
  "prev": null,
  "next": null,
  "account_sid": {AccountSID},
  "payments_history": [
    {
      "date": "Mon, 18 June 2016 01:11:11 +0000",
      "amount": 20,
      "currency": "EUR",
      "status": "completed",
      "payment_sid": {paymentSID},
      "payment_method": "VISA credit card"
    },
    {...}
  ]
}

Response parameters

Parameter

Description

limit

A parameter describing how many records are returned at once.

The default and maximum value is 20.

prev

URI to the previous part of the list.

next

URI to the next part of the list.

account_sid

Account SID

payments_history

List of payments.

payments_history/date

Date and time of a payment.

payments_history/amount

Amount of the payment.

payments_history/currency

Currency of the payment (EUR is default).

payments_history/status

The payment status.

payments_history/payment_sid

Unique transaction identifier.

payments_history/payment_method

Payment method which was used to make the payment.

Description

A parameter describing how many records are returned at once.

The default and maximum value is 20.

Description

URI to the next part of the list.

Description

URI to the previous part of the list.

Description

Unique account identifier.

Description

List of payments.

Description

Date and time of a payment.

Description

Amount of the payment.

Description

Currency of the payment.

Description

The payment status.

Description

Unique transaction identifier.

Description

Payment method which was used to make the payment.

Response filtering

To narrow the response results, specify filtering parameters in your request.

Parameter

Description

limit

A parameter describing how many records are returned at once.

The default and maximum value is 20.

status

The payment status.

This can be one of the following: completed, pending, failed, and refunded.

payment_sid

Unique account top up action identifier.

amount

Amount of the payment.

date_from

A parameter that allows displaying payments made after a specific date.

The date should be specified in the YYYY-MM-DD format.

date_to

A parameter that allows displaying payments made before a specific date.

The date should be specified in the YYYY-MM-DD format.

amount_from

A parameter that allows displaying payments exceeding a specific amount.

amount_to

A parameter that allows displaying payments not exceeding a specific amount.

Description

A parameter describing how many records are returned at once.

The default and maximum value is 20.

Description

The payment status.

This can be one of the following: completed,pendingfailed, and refunded.

Description

Unique account top up action identifier.

Description

Amount of the payment.

You can specify both integer and decimal numbers, for example, 20 or 20.34.

Description

A parameter that allows displaying payments made after a specific date.

The date should be specified in the YYYY-MM-DD format.

Description

A parameter that allows displaying payments made before a specific date.

The date should be specified in the YYYY-MM-DD format.

Description

A parameter that allows displaying payments exceeding a specific amount.

You can specify both integer and decimal numbers, for example, 20 or 20.34.

Description

A parameter that allows displaying payments not exceeding a specific amount.

You can specify both integer and decimal numbers, for example, 20 or 20.34.

Request example (with filtering)

curl –X GET ‘https://api.apifonica.com/v2/accounts/{accountSID}/balance/payments?limit=15&amount_from=50’ \
-u {accountSID}:{authToken}