Get bank transfer instructions
How to pay an invoice by bank transfer: the bank account to send amountRemainingCents to, and the reference (the invoice number) to quote so the payment is matched. bankTransfer is null when the invoice is not open. USD invoices use US bank details (aba, swift); EUR invoices use an IBAN. The account details are specific to your organization: do not reuse another firm’s. At most 30 requests a minute per organization.
Access: read-only and full-access API keys. Dashboard members need view access to Billing & purchases revenue.
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"currency": "usd",
"amountRemainingCents": 2860000,
"reference": "HP-0042",
"hostedInvoiceUrl": "https://invoice.example.com/i/acct_1/test_YWNjdF8x",
"bankTransfer": {
"type": "us_bank_transfer",
"addresses": [
{
"type": "aba",
"accountHolderName": "Hyperprop B.V.",
"bankName": "Example Bank, N.A.",
"accountNumber": "000123456789",
"routingNumber": "110000000",
"swiftCode": "EXAMUS33",
"accountType": "checking",
"iban": "NL91ABNA0417164300",
"bic": "ABNANL2A",
"country": "NL"
}
]
}
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have view access to \"Billing & purchases revenue\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "No issued invoice with this ID in your organization",
"code": "INVOICE_NOT_FOUND"
}{
"success": false,
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests (limit: 30 a minute per organization). Retry after `Retry-After` seconds",
"code": "RATE_LIMITED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 502,
"error": "Error",
"message": "Billing is temporarily unavailable. Try again shortly.",
"code": "BILLING_UNAVAILABLE"
}{
"statusCode": 504,
"error": "Gateway Timeout",
"message": "The request did not complete within 25 seconds. Try again, or narrow it (for example a shorter date range).",
"code": "REQUEST_TIMEOUT"
}Authorizations
Organization API key (hp_live_...), sent in the X-API-Key header. Create, rotate and restrict keys in the dashboard or with the API keys endpoints; an organization can have two active keys, so you can rotate without downtime. A full-access key can call every endpoint in this reference. A read-only key can call GET endpoints (and create a trading stream token); any other request returns 403 READ_ONLY_KEY. A key with an IP allowlist returns 403 IP_NOT_ALLOWED from any other address. Each endpoint lists which keys can call it under Access.
Path Parameters
Invoice ID, from GET /billing/invoices
curl --request GET \
--url https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/billing/invoices/{invoiceId}/payment-instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"currency": "usd",
"amountRemainingCents": 2860000,
"reference": "HP-0042",
"hostedInvoiceUrl": "https://invoice.example.com/i/acct_1/test_YWNjdF8x",
"bankTransfer": {
"type": "us_bank_transfer",
"addresses": [
{
"type": "aba",
"accountHolderName": "Hyperprop B.V.",
"bankName": "Example Bank, N.A.",
"accountNumber": "000123456789",
"routingNumber": "110000000",
"swiftCode": "EXAMUS33",
"accountType": "checking",
"iban": "NL91ABNA0417164300",
"bic": "ABNANL2A",
"country": "NL"
}
]
}
}
}{
"success": false,
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"code": "VALIDATION_ERROR"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Your role does not have view access to \"Billing & purchases revenue\"",
"code": "INSUFFICIENT_PERMISSIONS"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "No issued invoice with this ID in your organization",
"code": "INVOICE_NOT_FOUND"
}{
"success": false,
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too many requests (limit: 30 a minute per organization). Retry after `Retry-After` seconds",
"code": "RATE_LIMITED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 502,
"error": "Error",
"message": "Billing is temporarily unavailable. Try again shortly.",
"code": "BILLING_UNAVAILABLE"
}{
"statusCode": 504,
"error": "Gateway Timeout",
"message": "The request did not complete within 25 seconds. Try again, or narrow it (for example a shorter date range).",
"code": "REQUEST_TIMEOUT"
}