Squarepay API
  1. Agreements
Squarepay API
  • Authentication
    • Test Authentication
      POST
  • PayTo
    • Agreements
      • Create Agreement
        POST
      • List Agreements
        GET
      • Show Agreement
        GET
      • Show Agreement History
        GET
    • Agreement Actions
      • Cancel Agreement
    • Payments
      • Create Payment
      • List Payments
      • Show Payment
      • Retry Payment
  • Webhook Subscriptions
    • Create Webhook Subscription
      POST
    • List Webhook Subscriptions
      GET
    • Update Webhook Subscription
      PUT
    • Delete Webhook Subscription
      DELETE
  • Webhooks
    • List Webhooks
      GET
    • Show Webhook
      GET
    • Resend Webhook
      POST
  1. Agreements

Show Agreement

GET
/pay-to/agreements/{identifier}
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 *****************
Path Params
identifier
string 
required
When id_type is uuid, search will be conducted using the agreement uuid. Alternatively reference will search by your unique reference.
Example:
2e9d9df0-5c70-4bdf-b031-1caa64121602
Query Params
id_type
enum<string> 
optional
The type of identifier to search by. uuid is default, this is our unique identifier. reference may also be used which is your unique identifier.
Allowed values:
uuidreference
Example:
uuid
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/2e9d9df0-5c70-4bdf-b031-1caa64121602?id_type=uuid' \
--header 'Accept: application/json' \
--header 'Authorization: Basic Og=='

Responses

🟢200OK
application/json
Body
data
object (Agreement) 
required
uuid
string 
required
UUID 36 characters
<= 36 characters
status
enum<string> 
required
The agreement status.
Allowed values:
proposedcreatedactivesuspendedcancelleddeclinedfailedexpiredunsubmitted
error_code
string  | null 
optional
A reason code for an Agreement error.
reference
string 
required
This is a unique reference to prevent duplicate transactions. This is a nonce.
>= 1 characters<= 255 characters
purpose
enum<string> 
required
The reason for the agreement with the debtor.
Allowed values:
mortgageutilityloandependant_supportgamblingretailsalarypersonalgovernmentpensiontaxother
description
string 
required
The human readable reason for the agreement.
>= 1 characters<= 256 characters
last_name
string 
required
The debtor's last name.
<= 255 characters
first_name
string  | null 
optional
The debtor's first name.
<= 100 characters
customer_reference
string 
required
A unique system identifier for your customer.
<= 50 characters
response_required_by
string  | null 
optional
An optional information requested resolution (accept/decline) deadline for this agreement. It will be displayed in any notifications send to the debtor. Format: yyyy-mm-ddTHH:MM:SS Sydney time (AEST).
start_date
string  | null 
optional
Start date for validity of agreement. Format: YYYY-MM-DD timezone assumed to be Sydney time (AEST).
end_date
string  | null 
optional
End date for validity of agreement. Format: YYYY-MM-DD timezone assumed to be Sydney time (AEST).
payment_term_type
enum<string> 
required
The pattern the payments will follow.
Allowed values:
fixedusagevariableballoon
frequency
enum<string> 
required
The frequency at which payments may be made.
Allowed values:
adhocdailyweeklyfortnightlymonthlyquarterlysemi_annualannual
amount
string  | null 
optional
Displayed in cents.
count
integer  | null 
optional
Number of payments allowed per frequency period. When the frequency is adhoc the payments will be unlimited.
first_payment_date
string  | null 
optional
The date the first payment will be initiated for the agreement. Format: YYYY-MM-DD timezone assumed to be Sydney time (AEST).
last_payment_date
string  | null 
optional
The date the last payment will be initiated for the agreement. Format: YYYY-MM-DD timezone assumed to be Sydney time (AEST).
max_amount
string  | null 
optional
The maximum allowed payment amount. Displayed in cents.
first_payment_amount
string  | null 
optional
Applicable to balloon payments. Displayed in cents.
last_payment_amount
string  | null 
optional
Applicable to balloon payments. Displayed in cents.
account_type
string 
required
bsb
string  | null 
optional
This field is nullable when account_type is not bban. BSB format 032000
account_number
string  | null 
optional
This field is nullable when account_type is not bban
pay_id
string  | null 
optional
This field is nullable when account_type is bban otherwise a valid PayID address.
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
🟠404Not Found
🔴500Server Error
Previous
List Agreements
Next
Show Agreement History
Built with