All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice |
downloadReceipt | GET /receipt/{receiptId}/download | Download Receipt |
getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices |
getPaymentsForCustomer | GET /customer/{customerId}/payment | List Customer Payments |
listPayment | GET /payment | List |
refundPayment | POST /payment/{paymentId}/refund | Refund Payment |
\BillaBear\Model\InlineResponse20012 chargeInvoice($invoice_id)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$invoice_id = "invoice_id_example"; // string | The id of the invoice
try {
$result = $apiInstance->chargeInvoice($invoice_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->chargeInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | string | The id of the invoice |
\BillaBear\Model\InlineResponse20012
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string downloadInvoice($invoice_id)
Download Invoice
Returns the pdf blob for the invoice
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$invoice_id = "invoice_id_example"; // string | The id of the invoice
try {
$result = $apiInstance->downloadInvoice($invoice_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->downloadInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | string | The id of the invoice |
string
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string downloadReceipt($receipt)
Download Receipt
Returns the pdf blob for the Receipt
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$receipt = "receipt_example"; // string | The id of the receipt
try {
$result = $apiInstance->downloadReceipt($receipt);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->downloadReceipt: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
receipt | string | The id of the receipt |
string
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2004 getInvoicesForCustomer($customer_id)
List Customer Invoices
List Customer Invoices
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
try {
$result = $apiInstance->getInvoicesForCustomer($customer_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->getInvoicesForCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
customer_id | string | The id of the customer to retrieve |
\BillaBear\Model\InlineResponse2004
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2003 getPaymentsForCustomer($customer_id, $limit, $last_key, $name)
List Customer Payments
List Customer Payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$customer_id = "customer_id_example"; // string | The id of the customer to retrieve
$limit = 56; // int | How many items to return at one time (max 100)
$last_key = "last_key_example"; // string | The key to be used in pagination to say what the last key of the previous page was
$name = "name_example"; // string | The name to search for
try {
$result = $apiInstance->getPaymentsForCustomer($customer_id, $limit, $last_key, $name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->getPaymentsForCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
customer_id | string | The id of the customer to retrieve | |
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | string | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | string | The name to search for | [optional] |
\BillaBear\Model\InlineResponse2003
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\BillaBear\Model\InlineResponse2007 listPayment($limit, $last_key, $name)
List
List all payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 56; // int | How many items to return at one time (max 100)
$last_key = "last_key_example"; // string | The key to be used in pagination to say what the last key of the previous page was
$name = "name_example"; // string | The name to search for
try {
$result = $apiInstance->listPayment($limit, $last_key, $name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->listPayment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | string | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | string | The name to search for | [optional] |
\BillaBear\Model\InlineResponse2007
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string refundPayment($body, $payment_id)
Refund Payment
Issue a refund for payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new BillaBear\Api\PaymentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \BillaBear\Model\IssueRefundPayment(); // \BillaBear\Model\IssueRefundPayment |
$payment_id = "payment_id_example"; // string | The id of the payment
try {
$result = $apiInstance->refundPayment($body, $payment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->refundPayment: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \BillaBear\Model\IssueRefundPayment | ||
payment_id | string | The id of the payment |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]