curl https://api.sandbox.invoiced.com/subscriptions \
-u 1234: \
-d customer=137208 \
-d plan=starter \
-d discounts="test"
{| <?php | |
| require("../vendor/autoload.php"); | |
| $invoiced = new Invoiced\Client("MY-API-KEY"); | |
| $page = 1; | |
| $hasNextPage = true; | |
| while ($hasNextPage) { |
curl https://api.sandbox.invoiced.com/subscriptions \
-u 1234: \
-d customer=137208 \
-d plan=starter \
-d discounts="test"
{| <div class="two-col clearfix"> | |
| <div class="title"> | |
| {{theme.header}} | |
| <small>{{invoice.number}}</small> | |
| </div> | |
| <div class="col"> | |
| <div class="from-holder"> | |
| <div class="logo"> | |
| {{#company.logo}}<img src="{{company.logo}}" />{{/company.logo}} |
| import datetime | |
| import time | |
| import invoiced | |
| apiKey = "enter api key here" | |
| # Flags open invoices that are > N days old | |
| threshold = 60 # days | |
| client = invoiced.Client(apiKey, True) |
| curl "https://api.sandbox.invoiced.com/invoices" \ | |
| -u 4d7a57bdfecc2a2cb4319f3a7c158c14: \ | |
| -d customer=93886 \ | |
| -d payment_terms="NET 14" \ | |
| -d items[0][name]="Copy paper, Case" \ | |
| -d items[0][quantity]=1 \ | |
| -d items[0][unit_cost]=45 \ | |
| -d items[1][catalog_item]="delivery" \ | |
| -d items[1][quantity]=1 \ | |
| -d ship_to[name]="Parag Patel" \ |
| require 'invoiced' | |
| invoiced = Invoiced::Client.new('XXXXX', true) | |
| customerId = 134523 | |
| invoiceId = 1213602 | |
| creditNote = invoiced.CreditNote.create( | |
| :customer => customerId, | |
| :invoice => invoiceId, |
| require 'invoiced' | |
| require 'securerandom' | |
| invoiced = Invoiced::Client.new('api_key_here') | |
| # This will create a customer | |
| customer = invoiced.Customer.create({ | |
| :name => 'My Customer' | |
| }, { | |
| :idempotency_key => SecureRandom.uuid |
| invoiced.Invoice.create( | |
| # ... | |
| :metadata => { | |
| :billing_period => "Mar 1, 2017 - Mar 31, 2017" | |
| } | |
| ) |
| import invoiced | |
| client = invoiced.Client('_YOUR_API_KEY_') | |
| subscriptions, metadata = client.Subscription.list(per_page=1000, expand="customer") | |
| for subscription in subscriptions: | |
| if (subscription.approval): | |
| print(subscription.customer['name']+" approved "+subscription.plan+" from IP: "+subscription.approval['ip']) |
| <?php | |
| // prerequisite: run "composer require invoiced/invoiced" | |
| require 'vendor/autoload.php'; | |
| $invoiced = new Invoiced\Client('TODO_INSERT_API_KEY'); | |
| $objectType = 'invoice'; | |
| $invoiceId = 'TODO_INSERT_INVOICE_ID'; |