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 |
InlineResponse20012 chargeInvoice(invoiceId)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let invoiceId = "invoiceId_example"; // String | The id of the invoice
apiInstance.chargeInvoice(invoiceId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
'Blob' downloadInvoice(invoiceId)
Download Invoice
Returns the pdf blob for the invoice
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let invoiceId = "invoiceId_example"; // String | The id of the invoice
apiInstance.downloadInvoice(invoiceId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
'Blob'
- Content-Type: Not defined
- Accept: application/pdf
'Blob' downloadReceipt(receipt)
Download Receipt
Returns the pdf blob for the Receipt
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let receipt = "receipt_example"; // String | The id of the receipt
apiInstance.downloadReceipt(receipt, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
receipt | String | The id of the receipt |
'Blob'
- Content-Type: Not defined
- Accept: application/pdf
InlineResponse2004 getInvoicesForCustomer(customerId)
List Customer Invoices
List Customer Invoices
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
apiInstance.getInvoicesForCustomer(customerId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2003 getPaymentsForCustomer(customerId, opts)
List Customer Payments
List Customer Payment
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
let opts = {
'limit': 56, // Number | How many items to return at one time (max 100)
'lastKey': "lastKey_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
};
apiInstance.getPaymentsForCustomer(customerId, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve | |
limit | Number | How many items to return at one time (max 100) | [optional] |
lastKey | 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] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2007 listPayment(opts)
List
List all payment
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let opts = {
'limit': 56, // Number | How many items to return at one time (max 100)
'lastKey': "lastKey_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
};
apiInstance.listPayment(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | How many items to return at one time (max 100) | [optional] |
lastKey | 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] |
- Content-Type: Not defined
- Accept: application/json
'String' refundPayment(body, paymentId)
Refund Payment
Issue a refund for payment
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.PaymentsApi();
let body = new BillaBear.IssueRefundPayment(); // IssueRefundPayment |
let paymentId = "paymentId_example"; // String | The id of the payment
apiInstance.refundPayment(body, paymentId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | IssueRefundPayment | ||
paymentId | String | The id of the payment |
'String'
- Content-Type: application/json
- Accept: application/json