- Authentication
- PayTo
- Webhook Subscriptions
- Webhooks
List Agreements
GET
/pay-to/agreements
payto
Request
Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Query Params
status
string
optional
limit
integer
optional
>= 1<= 100
Default:
20
Example:
20
created_after
string
optional
Example:
2024-02-01
created_before
string
optional
Example:
2024-02-27
page
integer
optional
Example:
1
Header Params
Accept
string
optional
Example:
application/json
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api-sandbox.squarepay.com.au/v2/pay-to/agreements?status&limit=20&created_after=2024-02-01&created_before=2024-02-27&page=1' \
--header 'Accept: application/json' \
--header 'Authorization: Basic Og=='
Responses
🟢200OK
application/json
Body
data
array[object (Agreement) {25}]
required
uuid
string
required
<= 36 characters
status
enum<string>
required
Allowed values:
proposedcreatedactivesuspendedcancelleddeclinedfailedexpiredunsubmitted
error_code
string | null
optional
reference
string
required
>= 1 characters<= 255 characters
purpose
enum<string>
required
Allowed values:
mortgageutilityloandependant_supportgamblingretailsalarypersonalgovernmentpensiontaxother
description
string
required
>= 1 characters<= 256 characters
last_name
string
required
<= 255 characters
first_name
string | null
optional
<= 100 characters
customer_reference
string
required
<= 50 characters
response_required_by
string | null
optional
start_date
string | null
optional
end_date
string | null
optional
payment_term_type
enum<string>
required
Allowed values:
fixedusagevariableballoon
frequency
enum<string>
required
Allowed values:
adhocdailyweeklyfortnightlymonthlyquarterlysemi_annualannual
amount
string | null
optional
count
integer | null
optional
first_payment_date
string | null
optional
last_payment_date
string | null
optional
max_amount
string | null
optional
first_payment_amount
string | null
optional
last_payment_amount
string | null
optional
account_type
string
required
bsb
string | null
optional
account_number
string | null
optional
pay_id
string | null
optional
Example
{
"data": [
{
"uuid": "2e9d9df0-5c70-4bdf-b031-1caa64121602",
"status": "created",
"error_code": null,
"reference": "Loan1337",
"purpose": "loan",
"description": "Loan Payout 1337",
"last_name": "Bob",
"first_name": "Billy",
"customer_reference": "MEM000001337",
"response_required_by": "2024-02-25T16:45:15",
"start_date": "2024-02-01",
"end_date": "2025-01-31",
"payment_term_type": "fixed",
"frequency": "weekly",
"amount": "100.00",
"count": 10,
"first_payment_date": "2024-02-01",
"last_payment_date": "2024-04-11",
"max_amount": null,
"first_payment_amount": null,
"last_payment_amount": null,
"account_type": "bban",
"bsb": "062000",
"account_number": "123456789",
"pay_id": null
}
]
}
🟠401Unauthorised
🟠422Unprocessable Entity
🔴500Server Error