GoCommerce JS
This is a JS client library for GoCommerce API.
It handles orders and payments. Integrates with Stripe for payments and will support international pricing and VAT verification.
Usage
; const commerce = APIUrl: "https://commerce.netlify.com"; commerce; console;/*{ items: [{ title: "Netlify Mug", sku: "netlify-mug-01", description: "A mug with a netlify sticker!", price: {amount: "49.00", "currency": "USD", cents: 4900}, tax: {amount: "0.00", currency: "USD", cents: 0}, quantity: 2, metadata: { photo: "/images/mugs/netlig-01.png" // You can add anything in metadata } }], subtotal: {amount: "98.00", "currency": "USD", cents: 9800}, taxes: {amount: "0.00", "currency": "USD", cents: 0}, total: {amount: "98.00", "currency": "USD", cents: 9800}}*/ commerce; // Set to 0 to remove commerce; commerce; // Will be called automatically after a successful order
You can change country (for VAT calculations) or currency at any time:
commerce;commerce;
You can use GoCommerce JS together with GoTrue to let users log in and claim view order history.
goTrue;