Submit payrequests

Batch Collect

You can start collecting payments from the user by submiting payment requests, including in the request:

  • requestId: A unique ID generated by the partner application
  • amount: The amount of the payment you are collecting
  • description: The description to be included on the payment
  • payerUserId: Basiq’s unique identifier given when they are created with Basiq
POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
  "payrequests": [
    {
      "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
      "payer": {
        "payerUserId": "21824ad0-73f1-0138-3700-0a58a9feac09",
        "payerBankBranchCode": "730002",
        "payerAccountNumber": "123456789"
      },
      "description": "Investment",
      "amount": 173.45
    }
  ]
}
POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
  "payrequests": [
    {
      "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
      "payer": {
        "payerUserId": "21824ad0-73f1-0138-3700-0a58a9feac09",
        "payerBankBranchCode": "730002",
        "payerAccountNumber": "123456789"
      },
      "description": "Investment",
      "amount": 173.45,
      "collectFundsToFloat": true
    }
  ]
}
POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
  "payrequests": [
    {
      "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
      "payer": {
        "payerUserId": "21824ad0-73f1-0138-3700-0a58a9feac09",
        "payerBankBranchCode": "730002",
        "payerAccountNumber": "123456789"
      },
      "description": "Investment",
      "amount": 173.45,
      "checkAccountBalance": true
    }
  ]
}

Fast Collect

🚧

Disclaimer

Please be advised that the PayTo (Collect Fast) feature, as part of our ongoing efforts to enhance our service offerings, is not available yet. We are working diligently to ensure that this new feature meets our high standards for reliability and user experience.

You can start collecting payments from a user with an active agreement by submiting payment requests, including in the request:

  • requestId: A unique ID generated by the partner application
  • method: Specifying the value fast to indicate a Fast Collect (PayTo)
  • agreementId: Indicating the agreement Id to be used and verified against
  • amount: The amount of the payment you are collecting
  • description: The description to be included on the payment
  • reference: This is an optional field for Fast Collect payrequests to include a reference such as an invoice number that flows end to end to the payer user and the payee
  • payee: This is an optional object to indicate where the funds should go to. This can only be specified if the payee object is not defined in the agreement. It includes the following fields:
    • payeeType: Indicating whether is a personor organisation
    • payeePayId: Indicating the PayID to pay to
    • payeePayIdType: Indicating the type of PayID to pay to (email, phone-number, business-number, organisation-id)
    • bankBranchCode: The 6 digit bank and branch code of the payee
    • accountNumber: The account number of the payee
    • ultimatePayeeName: The name of the ultimate recipient of the funds. In most cases this would be the same as the Payee name

Note: You can either specify PayID fields (payeePayId and payeePayIdType) or bank account number fields (bankBranchCode and accountNumber) but not both

POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
    "payrequests": [
        {
          "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
          "agreementId": "21824ad0-73f1-0138-3700-0a58a9feac09",
          "amount": 123.20,
          "refernce": "INV-123",
          "description": "Investment"
        }
    ]
}
POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
    "payrequests": [
        {
          "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
          "agreementId": "21824ad0-73f1-0138-3700-0a58a9feac09",
          "amount": 123.20,
          "refernce": "INV-123",
          "description": "Investment",
          "payee":
          	{
               "payeeType": "person",
               "payeePayID": "[email protected]",
               "payeePayIDType": "email",
               "ultimatePayeeName": "Gavin Belson"
            }
        }
    ]
}
POST /payments/payrequests HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic $YOUR_ACCESS_TOKEN

{
    "payrequests": [
        {
            "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
            "agreementId": "21824ad0-73f1-0138-3700-0a58a9feac09",
            "amount": 123.20,
						"refernce": "INV-123",
            "description": "Investment",
          	"payee":
          		{
                "payeeType": "person",
                "bankBranchCode": "072333",
                "accountNumber": "123456789",
                "ultimatePayeeName": "Gavin Belson"
              }
        }
    ]
}

In both Fast and Batch Collect scenarios, the response will contain the job resource responsible for processing this payment request. It will not return the payment itself. You can use this job to track the progress of the payment request and know when it has successfully completed.

HTTP/1.1 202 Accepted
Content-Type: application/json

{
  "type": "job",
  "id": "b1824ad0-73f1-0138-3700-0a58a9feac09",
  "requestId": "01824ad0-73f1-0138-3700-0a58a9feac09",
  "links": {
    "self": "https://au-api.basiq.io/jobs/b1824ad0-73f1-0138-3700-0a58a9feac09"
  }
}

Use the job.Id you receive to track the payouts' progress via the Jobs You can continue to poll this endpoint regularly to stay updated of the success/failure of your payouts.

Note: The jobId returned can also be used to retrieve the payout directly via the API

HTTP/1.1 202 Accepted
Content-Type: application/json

{
  "type": "job",
  "id": "b1824ad0-73f1-0138-3700-0a58a9feac09",
  "partnerId": "e73ffa09-742f-4be3-9aae-0ad077f041a1",
  "applicationId": "3e2863df-43d1-405d-b104-701bcb34e184",
  "created": "2016-06-08T09:10:32.000Z",
  "updated": "2016-06-08T09:14:28.000Z",
  "status": "in-progress",
  "jobType": "payrequest",
  "steps": [
    {
      "title": "validate-payment",
      "status": "success",
      "result": {
        "type": "link",
        "url": "/payments/payrequests/b1824ad0-73f1-0138-3700-0a58a9feac09"
      }
    },
    {
      "title": "external-processing",
      "status": "in-progress",
      "result": null
    }
  ],
  "links": {
    "self": "/jobs/b1824ad0-73f1-0138-3700-0a58a9feac09",
    "source": "/payments/payrequests/b1824ad0-73f1-0138-3700-0a58a9feac09"
  }
}
Language
Authorization
Bearer
JWT
Click Try It! to start a request and see the response here!