Skip to content

Latest commit

 

History

History
403 lines (288 loc) · 12.4 KB

PaymentsApi.md

File metadata and controls

403 lines (288 loc) · 12.4 KB

billabear.PaymentsApi

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

charge_invoice

InlineResponse20014 charge_invoice(invoice_id)

Charge Invoice

Attempts to charge a card that is on file for the invoice amount

Example

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)

Parameters

Name Type Description Notes
invoice_id str The id of the invoice

Return type

InlineResponse20014

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

download_invoice

str download_invoice(invoice_id)

Download Invoice

Returns the pdf blob for the invoice

Example

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)

Parameters

Name Type Description Notes
invoice_id str The id of the invoice

Return type

str

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf

[Back to top] [Back to API list] [Back to Model list] [Back to README]

download_receipt

str download_receipt(receipt)

Download Receipt

Returns the pdf blob for the Receipt

Example

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)

Parameters

Name Type Description Notes
receipt str The id of the receipt

Return type

str

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_invoices_for_customer

InlineResponse2006 get_invoices_for_customer(customer_id)

List Customer Invoices

List Customer Invoices

Example

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)

Parameters

Name Type Description Notes
customer_id str The id of the customer to retrieve

Return type

InlineResponse2006

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_payments_for_customer

InlineResponse2004 get_payments_for_customer(customer_id, limit=limit, last_key=last_key, name=name)

List Customer Payments

List Customer Payment

Example

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)

Parameters

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]

Return type

InlineResponse2004

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_payment

InlineResponse2009 list_payment(limit=limit, last_key=last_key, name=name)

List

List all payment

Example

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)

Parameters

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]

Return type

InlineResponse2009

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

refund_payment

refund_payment(body, payment_id)

Refund Payment

Issue a refund for payment

Example

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)

Parameters

Name Type Description Notes
body IssueRefundPayment
payment_id str The id of the payment

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]