Quick Start Guide
This guide will walk you through the fastest way to integrate NowPost pickup point delivery into your e-commerce checkout.
Prerequisites
Before you begin, ensure you have:
- A NowPost Partner account.
- Your API Keys (Test mode).
- Access to your e-commerce platform's code or configuration.
Step 1: Get Your API Keys
Log in to the NowPost Dashboard, go to Settings > API Keys, and copy your Public Key and Secret Key.
Note: Use Test Mode keys for development. Do not use Live keys until you are ready to launch.
Step 2: Display Pickup Options
At your checkout page, you need to let customers choose a pickup location instead of home delivery.
We recommend using our Maps Widget for the easiest integration.
<!-- Add this to your checkout page -->
<script src="https://js.nowpost.com/widget.js"></script>
<button id="select-pickup-point">Select Pickup Point</button>
<script>
const widget = new NowPost.Widget({
key: 'YOUR_PUBLIC_KEY',
onSelect: (point) => {
console.log('Selected Point:', point);
// Save point.id to your checkout form
document.getElementById('pickup-point-id').value = point.id;
}
});
document.getElementById('select-pickup-point').onclick = () => widget.open();
</script>
See Displaying Pickup Points for more details.
Step 3: Create the Order
When the customer completes the checkout, send the order details to NowPost via our API.
Endpoint: POST /api/v1/orders
{
"partner_order_id": "YOUR_ORDER_ID_123",
"pudo_point_id": "SELECTED_POINT_ID",
"customer": {
"name": "John Doe",
"phone": "+2348012345678",
"email": "john@example.com"
},
"items": [
{ "name": "Blue Shirt", "qty": 1, "price": 5000 }
]
}
See Creating Orders for the full payload.
Step 4: Handle Fulfillment
Once created, drop off the package at the designated sorting center or request a pickup (depending on your arrangement).
Step 5: Go Live!
- Switch to Live Mode in your dashboard.
- Replace your Test Keys with Live Keys.
- Place a real test order to verify.