Create BSB/Account Number Payment
POSThttps://api.cleverhub.co/api/v1/merchants/create_bank_payment
Initiate a payment request to a BSB and account number by specifying the amount, customer details, and additional attributes. This endpoint supports only Australian Dollar (AUD) payments. Transactions will be rejected if any of the required fields, such as Account Name, BSB Number, Account Number, Description, or Amount, are incorrect or missing.
This payment method provides flexibility in sending funds directly to Australian bank accounts, ideal for merchants needing BSB and account number transfers.
Request
- application/json
Bodyrequired
The full name of the customer for whom the payment is being created.
Possible values: Value must match regular expression ^(?)[a-zA-Z0-9 ]*(?![ ])$
Jane Doe
Indicates whether Goods and Services Tax (GST) applies to the payment (for Australian merchants).
true
The total amount to be charged, specified in Australian Dollars (AUD).
1000
A brief description of the purpose of the payment.
Possible values: Value must match regular expression ^(?)[a-zA-Z0-9 _-]*(?![ ])$
Payment for invoice #1234
Comma-separated list of email addresses for notifications. Only lowercase letters are allowed.
Possible values: Value must match regular expression ^([a-z0-9_\-\.]+)@([a-z]+)\.([a-z]+)(,[a-z0-9_\-\.]+@[a-z]+\.([a-z]+))*$
customer@example.com
Expiration date and time of the payment, in UTC. Must be at least 15 minutes from the current time.
2024-12-31T23:59:59Z
A custom identifier provided by the merchant for tracking purposes.
custom-id-12345
payment_request_notification objectrequired
Responses
- 200
- 400
- 401
- 422
Payment request created successfully.
- application/json
- Schema
- Example (auto)
Schema
pending
: Awaiting payment.received
: Payment completed.expired
: Payment request expired.return_pending
: Refund process initiated.return_received
: Refund completed.return_expired
: Refund request expired.return_rejected
: Refund request rejected.
The unique identifier of the payment, used for tracking purposes.
12345
payee_detail object
The name of the customer associated with the payment request.
Jane Doe
The name of the merchant handling the payment request, allowing identification of the party being paid.
Merchant Inc.
Indicates whether GST (Goods and Services Tax) is applicable to the payment. A value of true
indicates GST is included.
true
The amount for the payment, excluding GST. This represents the base transaction value.
1000.0
The total payment amount, including GST. This is the final amount to be paid by the customer.
1100.0
The portion of the total amount that represents GST. This helps break down the tax component.
100.0
The expiration date and time of the payment request, indicating the deadline for making the payment.
2024-12-31T23:59:59Z
A custom identifier used for tracking purposes, such as an invoice or reference number provided by the user.
custom-id-12345
The cashback amount offered as part of the transaction, if applicable.
50.0
The deadline by which the payment must be completed, providing a clear due date.
2024-12-30T23:59:59Z
The date and time when the payment was successfully made, used for record-keeping.
2024-12-25T12:34:56Z
The current status of the payment request. Possible values include:
Possible values: [pending
, received
, expired
, return_pending
, return_received
, return_expired
, return_rejected
]
received
A description associated with the payment request, providing context or additional details about the transaction.
Payment for invoice #1234
refund_information object
payment_request_notification object
A nonce value used to validate the transaction, ensuring that it is unique and preventing replay attacks.
unique_nonce_string
Represents the specific stage in a pending transaction. Default value is null
unless the payment amount is incorrect or the nonce is unmatched.
Possible values: [overpaid
, underpaid
, unmatched_nonce
, null
]
overpaid
A new property added to the BSBAccountObject for extended functionality or specific use cases.
Additional value
{
"id": 12345,
"payee_detail": {
"account_holder_name": "Jane Doe",
"bsb": "654321",
"account_number": "987654321"
},
"name": "Jane Doe",
"merchant_name": "Merchant Inc.",
"gst": true,
"amount": "1000.0",
"total": "1100.0",
"gst_amount": "100.0",
"expired_at": "2024-12-31T23:59:59Z",
"external_id": "custom-id-12345",
"cashback_amount": "50.0",
"pay_by": "2024-12-30T23:59:59Z",
"paid_at": "2024-12-25T12:34:56Z",
"status": "received",
"description": "Payment for invoice #1234",
"refund_information": {
"refund_bsb": "654321",
"refund_account_number": "987654321",
"refund_amount": "10.99",
"request_date": "2024-07-01T00:00:00Z",
"reason": "Refund for incorrect payment"
},
"payment_request_notification": {
"endpoint_url": "https://merchant.com/payment_callback",
"authorization_header": "Bearer your_token"
},
"nonce": "unique_nonce_string",
"stage": "overpaid",
"additional_property": "Additional value"
}
Bad Request
Unauthorized
Unprocessable Entity
Callbacks
- POST statusChange
POST{$request.body#/payment_request_notification.endpoint_url}
- application/json
Bodyrequired
pending
: Awaiting payment.received
: Payment completed.expired
: Payment request expired.return_pending
: Refund process initiated.return_received
: Refund completed.return_expired
: Refund request expired.return_rejected
: Refund request rejected.
The unique identifier of the payment, used for tracking purposes.
12345
payee_detail object
The name of the customer associated with the payment request.
Jane Doe
The name of the merchant handling the payment request, allowing identification of the party being paid.
Merchant Inc.
Indicates whether GST (Goods and Services Tax) is applicable to the payment. A value of true
indicates GST is included.
true
The amount for the payment, excluding GST. This represents the base transaction value.
1000.0
The total payment amount, including GST. This is the final amount to be paid by the customer.
1100.0
The portion of the total amount that represents GST. This helps break down the tax component.
100.0
The expiration date and time of the payment request, indicating the deadline for making the payment.
2024-12-31T23:59:59Z
A custom identifier used for tracking purposes, such as an invoice or reference number provided by the user.
custom-id-12345
The cashback amount offered as part of the transaction, if applicable.
50.0
The deadline by which the payment must be completed, providing a clear due date.
2024-12-30T23:59:59Z
The date and time when the payment was successfully made, used for record-keeping.
2024-12-25T12:34:56Z
The current status of the payment request. Possible values include:
Possible values: [pending
, received
, expired
, return_pending
, return_received
, return_expired
, return_rejected
]
received
A description associated with the payment request, providing context or additional details about the transaction.
Payment for invoice #1234
refund_information object
payment_request_notification object
A nonce value used to validate the transaction, ensuring that it is unique and preventing replay attacks.
unique_nonce_string
Represents the specific stage in a pending transaction. Default value is null
unless the payment amount is incorrect or the nonce is unmatched.
Possible values: [overpaid
, underpaid
, unmatched_nonce
, null
]
overpaid
A new property added to the BSBAccountObject for extended functionality or specific use cases.
Additional value
Callbacks Responses
- 200
- 400
- 401
Callback received successfully.
Bad request.
Unauthorized access.
Authorization: app-id
name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v1/merchants/create_bank_payment");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"name\": \"Jane Doe\",\n \"gst\": true,\n \"amount\": 1000,\n \"description\": \"Payment for invoice #1234\",\n \"emails\": \"customer@example.com\",\n \"expired_at\": \"2024-12-31T23:59:59Z\",\n \"external_id\": \"custom-id-12345\",\n \"payment_request_notification\": {\n \"endpoint_url\": \"https://example.com/payment_callback\",\n \"authorization_header\": \"Bearer your_token\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());