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
      • Delete Agreement
        DELETE
    • 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

Delete Agreement

DELETE
/pay-to/agreements/{identifier}
Cancels a PayTo agreement by sending a cancellation request to the bank. The agreement status will be set to pending while the bank processes the cancellation.

Request

Path Params

Header Params

Body Params application/json

Example
{
    "reason": "customer_requested"
}

Request Code 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 DELETE 'https://api-sandbox.squarepay.com.au/v2/pay-to/agreements/Loan1337' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reason": "customer_requested"
}'

Responses

🟢200OK
application/json
Agreement cancellation request submitted successfully
Body

Example
{
    "reference": "Loan1337",
    "status": "pending"
}
🟠401Unauthorised
🟠404Not Found
🟠422Validation Error
🔴500Server Error
Modified at 2025-09-30 11:25:21
Previous
Show Agreement History
Next
Cancel Agreement
Built with