Developers
Checkout, digital delivery and store APIs.
Checkout widget
API v1Embeddable Checkout Widget
Drop-in JavaScript library for adding checkout to any website or app. Opens a popup checkout window and notifies your page on completion.
1. Include the Script
<script src="https://creativemark.co/static/js/creativemark-checkout.js"></script>
2. Create a Checkout Session (Server-side)
// Call from your backend
POST https://creativemark.co/api/v1/stores/your-store/checkout/session/
Authorization: Bearer <your_store_api_key>
Content-Type: application/json
{
"items": [{"sku": "WIN11-HOME", "qty": 1}],
"currency": "GBP"
}
// Response: { "token": "abc123", "checkout_url": "..." }
3. Open Checkout (Client-side)
Creativemark.checkout({
host: 'https://creativemark.co',
store: 'your-store',
sessionToken: 'abc123', // from step 2
onSuccess: function(data) {
console.log('Order:', data.publicId);
console.log('Status:', data.status);
},
onCancel: function() {
console.log('Customer closed checkout');
}
});
4. Add a Pay Button (Optional)
Creativemark.createButton(document.getElementById('pay-btn'), {
host: 'https://creativemark.co',
store: 'your-store',
sessionToken: 'abc123',
label: 'Buy Now — £49.99',
onSuccess: function(data) { ... }
});
Supported Payment Methods
The checkout popup supports all configured payment methods including Stripe (card, Apple Pay, Google Pay), PayPal, and manual bank transfer.