Storefronts

The Storefronts API allows you to create and manage digital shops to display and sell your products.

Create Storefront

Create a digital shop to manage and display your products

Headers

authorization
String

Set value to Bearer SECRET_KEY

content-type
String

Set value to application/json

Body Parameters

name
String

Name of the storefront

slug
String
optional

URL slug for the storefront. Must be unique

description
String
optional

A description for this storefront

POST/storefront
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4content_type="Content-Type: application/json"
5data='{
6 "name": "My Storefront",
7 "slug": "my-storefront",
8 "description": "A description of my storefront"
9}'
10
11curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST
12
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront created",
4 "data": {
5 "id": 1559046,
6 "name": "My Storefront",
7 "slug": "my-storefront",
8 "description": "A description of my storefront",
9 "status": "inactive",
10 "currency": "NGN",
11 "createdAt": "2024-11-01T12:00:00.000Z",
12 "updatedAt": "2024-11-01T12:00:00.000Z"
13 }
14}

List Storefronts

List the storefronts available on your integration

Headers

authorization
String

Set value to Bearer SECRET_KEY

Query Parameters

perPage
Integer
optional

Specify how many records you want to retrieve per page. If not specified, we use a default value of 50.

page
Integer
optional

Specify exactly what page you want to retrieve. If not specified, we use a default value of 1.

status
String
optional

Filter by storefront status. Value can be active or inactive

GET/storefront
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X GET
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefronts retrieved",
4 "data": [
5 {
6 "id": 1559046,
7 "name": "My Storefront",
8 "slug": "my-storefront",
9 "description": "A description of my storefront",
10 "status": "active",
11 "currency": "NGN",
12 "createdAt": "2024-11-01T12:00:00.000Z",
13 "updatedAt": "2024-11-01T12:00:00.000Z"
14 }
15 ],
16 "meta": {
17 "total": 1,
18 "skipped": 0,
19 "perPage": 50,
20 "page": 1,
21 "pageCount": 1
22 }
23}

Fetch Storefront

Get the details of a storefront on your integration

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID you want to fetch

GET/storefront/:id
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X GET
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront retrieved",
4 "data": {
5 "id": 1559046,
6 "name": "My Storefront",
7 "slug": "my-storefront",
8 "description": "A description of my storefront",
9 "status": "active",
10 "currency": "NGN",
11 "createdAt": "2024-11-01T12:00:00.000Z",
12 "updatedAt": "2024-11-01T12:00:00.000Z"
13 }
14}

Update Storefront

Update the details of a storefront on your integration

Headers

authorization
String

Set value to Bearer SECRET_KEY

content-type
String

Set value to application/json

Path Parameters

id
Integer

The storefront ID you want to update

Body Parameters

name
String
optional

Name of the storefront

description
String
optional

A description for this storefront

PUT/storefront/:id
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4content_type="Content-Type: application/json"
5data='{
6 "name": "Updated Storefront Name",
7 "description": "An updated description"
8}'
9
10curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT
11
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront updated",
4 "data": {
5 "id": 1559046,
6 "name": "Updated Storefront Name",
7 "slug": "my-storefront",
8 "description": "An updated description",
9 "status": "active",
10 "currency": "NGN",
11 "createdAt": "2024-11-01T12:00:00.000Z",
12 "updatedAt": "2024-11-01T14:00:00.000Z"
13 }
14}

Delete Storefront

Delete a storefront on your integration

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID you want to delete

DELETE/storefront/:id
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X DELETE
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront deleted"
4}

Verify Storefront Slug

Verify the availability of a slug before using it for your storefront

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

slug
String

The slug you want to verify

GET/storefront/verify/:slug
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/verify/my-storefront"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X GET
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Slug is available"
4}

Fetch Storefront Orders

Fetch all orders in your storefront

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID

GET/storefront/:id/order
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046/order"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X GET
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Orders retrieved",
4 "data": [
5 {
6 "id": 12345,
7 "code": "ORD_abc123def456",
8 "amount": 50000,
9 "currency": "NGN",
10 "status": "success",
11 "customer": {
12 "email": "customer@email.com"
13 },
14 "createdAt": "2024-11-01T12:00:00.000Z"
15 }
16 ],
17 "meta": {
18 "total": 1,
19 "skipped": 0,
20 "perPage": 50,
21 "page": 1,
22 "pageCount": 1
23 }
24}

Add Products to Storefront

Add previously created products to a storefront

Headers

authorization
String

Set value to Bearer SECRET_KEY

content-type
String

Set value to application/json

Path Parameters

id
Integer

The storefront ID

Body Parameters

products
Array

An array of product IDs to add to the storefront

POST/storefront/:id/product
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046/product"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4content_type="Content-Type: application/json"
5data='{
6 "products": [2196244, 2196245]
7}'
8
9curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST
10
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Products added to storefront"
4}

List Storefront Products

List the products in a storefront

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID

GET/storefront/:id/product
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046/product"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X GET
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Products retrieved",
4 "data": [
5 {
6 "id": 2196244,
7 "name": "Sample Product",
8 "description": "A sample product",
9 "price": 10000,
10 "currency": "NGN",
11 "active": true
12 }
13 ],
14 "meta": {
15 "total": 1,
16 "skipped": 0,
17 "perPage": 50,
18 "page": 1,
19 "pageCount": 1
20 }
21}

Publish Storefront

Make your storefront publicly available

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID you want to publish

POST/storefront/:id/publish
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046/publish"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X POST
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront published"
4}

Duplicate Storefront

Duplicate a previously created storefront

Headers

authorization
String

Set value to Bearer SECRET_KEY

Path Parameters

id
Integer

The storefront ID you want to duplicate

POST/storefront/:id/duplicate
cURL
1#!/bin/sh
2url="https://api.paystack.co/storefront/1559046/duplicate"
3authorization="Authorization: Bearer YOUR_SECRET_KEY"
4
5curl "$url" -H "$authorization" -X POST
6
Sample Response
200 Ok
1{
2 "status": true,
3 "message": "Storefront duplicated"
4}