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 |
InlineResponse20014 chargeInvoice(invoiceId)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
String invoiceId = "invoiceId_example"; // String | The id of the invoice
try {
InlineResponse20014 result = apiInstance.chargeInvoice(invoiceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#chargeInvoice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
File downloadInvoice(invoiceId)
Download Invoice
Returns the pdf blob for the invoice
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
String invoiceId = "invoiceId_example"; // String | The id of the invoice
try {
File result = apiInstance.downloadInvoice(invoiceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#downloadInvoice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
invoiceId | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/pdf
File downloadReceipt(receipt)
Download Receipt
Returns the pdf blob for the Receipt
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
String receipt = "receipt_example"; // String | The id of the receipt
try {
File result = apiInstance.downloadReceipt(receipt);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#downloadReceipt");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
receipt | String | The id of the receipt |
- Content-Type: Not defined
- Accept: application/pdf
InlineResponse2006 getInvoicesForCustomer(customerId)
List Customer Invoices
List Customer Invoices
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
String customerId = "customerId_example"; // String | The id of the customer to retrieve
try {
InlineResponse2006 result = apiInstance.getInvoicesForCustomer(customerId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#getInvoicesForCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2004 getPaymentsForCustomer(customerId, limit, lastKey, name)
List Customer Payments
List Customer Payment
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
String customerId = "customerId_example"; // String | The id of the customer to retrieve
Integer limit = 56; // Integer | How many items to return at one time (max 100)
String lastKey = "lastKey_example"; // String | The key to be used in pagination to say what the last key of the previous page was
String name = "name_example"; // String | The name to search for
try {
InlineResponse2004 result = apiInstance.getPaymentsForCustomer(customerId, limit, lastKey, name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#getPaymentsForCustomer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve | |
limit | Integer | 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
InlineResponse2009 listPayment(limit, lastKey, name)
List
List all payment
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
Integer limit = 56; // Integer | How many items to return at one time (max 100)
String lastKey = "lastKey_example"; // String | The key to be used in pagination to say what the last key of the previous page was
String name = "name_example"; // String | The name to search for
try {
InlineResponse2009 result = apiInstance.listPayment(limit, lastKey, name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#listPayment");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | 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
refundPayment(body, paymentId)
Refund Payment
Issue a refund for payment
// Import classes:
//import com.billabear.sdk.invoker.ApiClient;
//import com.billabear.sdk.invoker.ApiException;
//import com.billabear.sdk.invoker.Configuration;
//import com.billabear.sdk.invoker.auth.*;
//import com.billabear.sdk.api.PaymentsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
PaymentsApi apiInstance = new PaymentsApi();
IssueRefundPayment body = new IssueRefundPayment(); // IssueRefundPayment |
String paymentId = "paymentId_example"; // String | The id of the payment
try {
apiInstance.refundPayment(body, paymentId);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentsApi#refundPayment");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | IssueRefundPayment | ||
paymentId | String | The id of the payment |
null (empty response body)
- Content-Type: application/json
- Accept: application/json