Squarepay API
  1. Payments
Squarepay API
  • Authentication
    • Test Authentication
      POST
  • PayTo
    • Agreements
      • Create Agreement
      • List Agreements
      • Show Agreement
      • Show Agreement History
    • Agreement Actions
      • Cancel Agreement
    • Payments
      • Create Payment
        POST
      • List Payments
        GET
      • Show Payment
        GET
      • Retry Payment
        POST
  • 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. Payments

Create Payment

POST
/pay-to/payments

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 *****************
Header Params

Body Params application/json

Example
{
    "reference": "Loan1337-1",
    "agreement_uuid": "2e9d9df0-5c70-4bdf-b031-1caa64121602",
    "amount": 10000,
    "priority": "unattended",
    "statement_reference": "Loan #1337",
    "statement_description": "Loan Payment 1 of 10",
    "last_payment": true,
    "payment_date": "2024-02-01"
}

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 POST 'https://api-sandbox.squarepay.com.au/v2/pay-to/payments' \
--header 'Accept: application/json' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reference": "Loan1337-1",
    "agreement_uuid": "2e9d9df0-5c70-4bdf-b031-1caa64121602",
    "amount": 10000,
    "priority": "unattended",
    "statement_reference": "Loan #1337",
    "statement_description": "Loan Payment 1 of 10",
    "last_payment": true,
    "payment_date": "2024-02-01"
}'

Responses

🟢201OK
application/json
Body

Example
{
    "data": {
        "uuid": "94968d84-6551-446d-9ceb-bad3ca62e8b7",
        "reference": "Loan1337-1",
        "agreement_uuid": "2e9d9df0-5c70-4bdf-b031-1caa64121602",
        "amount": 10000,
        "priority": "unattended",
        "statement_reference": "Loan #1337",
        "statement_description": "Loan Payment 1 of 10",
        "last_payment": true,
        "payment_date": "2024-02-01"
    }
}
🟠401Unauthorised
🟠422Unprocessable Entity
🔴500Server Error
Modified at 2024-08-21 11:12:10
Previous
Cancel Agreement
Next
List Payments
Built with