username:password
Authorization: Basic *****************
{
"reference": "4f3b4342-2d1f-47e7-aea4-f7fc47ad6042",
"purpose": "loan",
"description": "Loan 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": 10000,
"count": 10,
"first_payment_date": "2024-02-01",
"last_payment_date": "2024-04-11",
"account_type": "bban",
"bsb": "062000",
"account_number": "123456789"
}
curl --location --request POST 'https://api-sandbox.squarepay.com.au/v2/pay-to/agreements/1142b253-c844-4104-b42b-472ddeacf7fa/cancel?id_type=uuid' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"reference": "4f3b4342-2d1f-47e7-aea4-f7fc47ad6042",
"purpose": "loan",
"description": "Loan 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": 10000,
"count": 10,
"first_payment_date": "2024-02-01",
"last_payment_date": "2024-04-11",
"account_type": "bban",
"bsb": "062000",
"account_number": "123456789"
}'
{
"data": {
"uuid": "a2743d92-6d29-4b4d-9ef5-eecbf3c7a208",
"status": "cancelled",
"error_code": null,
"reference": "ac19cda6-1d62-41a6-a2f1-c1b33ff86dd2",
"purpose": "loan",
"description": "Loan 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
}
}