All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
charge_invoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
download_invoice | GET /invoice/{invoiceId}/download | Download Invoice |
download_receipt | GET /receipt/{receiptId}/download | Download Receipt |
get_invoices_for_customer | GET /customer/{customerId}/invoices | List Customer Invoices |
get_payments_for_customer | GET /customer/{customerId}/payment | List Customer Payments |
list_payment | GET /payment | List |
refund_payment | POST /payment/{paymentId}/refund | Refund Payment |
InlineResponse20014 charge_invoice(invoice_id)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
invoice_id = 'invoice_id_example' # str | The id of the invoice
try:
# Charge Invoice
api_response = api_instance.charge_invoice(invoice_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->charge_invoice: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | str | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str download_invoice(invoice_id)
Download Invoice
Returns the pdf blob for the invoice
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
invoice_id = 'invoice_id_example' # str | The id of the invoice
try:
# Download Invoice
api_response = api_instance.download_invoice(invoice_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->download_invoice: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | str | The id of the invoice |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str download_receipt(receipt)
Download Receipt
Returns the pdf blob for the Receipt
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
receipt = 'receipt_example' # str | The id of the receipt
try:
# Download Receipt
api_response = api_instance.download_receipt(receipt)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->download_receipt: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
receipt | str | The id of the receipt |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2006 get_invoices_for_customer(customer_id)
List Customer Invoices
List Customer Invoices
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
try:
# List Customer Invoices
api_response = api_instance.get_invoices_for_customer(customer_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->get_invoices_for_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2004 get_payments_for_customer(customer_id, limit=limit, last_key=last_key, name=name)
List Customer Payments
List Customer Payment
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
customer_id = 'customer_id_example' # str | The id of the customer to retrieve
limit = 56 # int | How many items to return at one time (max 100) (optional)
last_key = 'last_key_example' # str | The key to be used in pagination to say what the last key of the previous page was (optional)
name = 'name_example' # str | The name to search for (optional)
try:
# List Customer Payments
api_response = api_instance.get_payments_for_customer(customer_id, limit=limit, last_key=last_key, name=name)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->get_payments_for_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | The id of the customer to retrieve | |
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | str | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | str | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2009 list_payment(limit=limit, last_key=last_key, name=name)
List
List all payment
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
limit = 56 # int | How many items to return at one time (max 100) (optional)
last_key = 'last_key_example' # str | The key to be used in pagination to say what the last key of the previous page was (optional)
name = 'name_example' # str | The name to search for (optional)
try:
# List
api_response = api_instance.list_payment(limit=limit, last_key=last_key, name=name)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentsApi->list_payment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | How many items to return at one time (max 100) | [optional] |
last_key | str | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | str | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
refund_payment(body, payment_id)
Refund Payment
Issue a refund for payment
from __future__ import print_function
import time
import billabear
from billabear.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = billabear.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = billabear.PaymentsApi(billabear.ApiClient(configuration))
body = billabear.IssueRefundPayment() # IssueRefundPayment |
payment_id = 'payment_id_example' # str | The id of the payment
try:
# Refund Payment
api_instance.refund_payment(body, payment_id)
except ApiException as e:
print("Exception when calling PaymentsApi->refund_payment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | IssueRefundPayment | ||
payment_id | str | The id of the payment |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]