Skip to content
Rushifakami edited this page Oct 21, 2023 · 8 revisions

Welcome to the API-Coinbase-Commerce-cbc_api wiki!

Here is an explanation of the functions of this library

Library functionality:

cbc_api.CBCApi(token='YOUR_COINBASE_COMMERCE_API') - The main object that accepts the api key from Coinbase Commerce

charge_list() - Returns all charges

create_charge() - Create charge using some parameters:

  • name='' - You can indicate the name of the charge that you want to create.

  • description='' - You can indicate the description of the charge you want to create.

  • pricing_type='' - The pricing_type parameter determines the specific type of charge you intend to create. Our pricing_type object consists of two distinct value options:

  • no_price - This pricing type lets the receiver initiate the amount they want to pay in cryptocurrency.

  • fixed_price - With this pricing type, you can specify the quantity of cryptocurrency you desire to receive from your customer.

  • amount=''(required only for fixed_price type!) - Amount of charge.

  • currency='' - You can indicate the currency of the charge you want to create(Example: USD, BTC, EUR, MATIC, BCH…​.). It can be fiat currency or cryptocurrency. The list of available cryptocurrency is available on the official website of Coinbase Commerce.

  • customer_id and customer_name parameters lets you indicate your customer information.

charge_show(charge_code) - Retrieves the details of a charge that has been previously created. Supply the unique charge code that was returned when the charge was created.

charge_cancel(charge_code) - Cancels a charge that has been previously created. Supply the unique charge code that was returned when the charge was created.

charge_resolve(charge_code) - Resolve a charge that has been previously marked as unresolved.

checkouts_list() - Lists all checkouts.

checkouts_create() - Create a new checkout.

checkouts_show(checkout_id) - Show a single checkout.

checkouts_update(checkout_id, name, description, requested_info(list type), pricing_type, amount(only for fixed_price type), currency) - Update a checkout.

checkouts_delete(checkout_id) - Delete a checkout.

invoice_list() - Lists all invoices.

invoice_create(business_name, customer_email, customer_name, memo, amount, currency) - To send an invoice in cryptocurrency, you need to create an invoice object and provide the user with the hosted url where they will be able to pay. Once an invoice is viewed at the hosted url, a charge will be generated on the invoice.

invoice_show(invoice_id)- Retrieves the details of an invoice that has been previously created. Supply the unique short code that was returned when the invoice was created.

invoice_void(invoice_id) - Voids an invoice that has been previously created. Supply the unique invoice code that was returned when the invoice was created.

invoice_resolve(invoice_id) - Resolve an invoice that has been previously marked as unresolved. Supply the unique invoice code that was returned when the invoice was created.

events_list() - Lists all events.

event_show(event_id) - Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

Clone this wiki locally