Copy link List Storefronts

List the storefronts you previously created

Query Parameters

perPageinteger
Number of records to fetch per request
pageinteger
The offset to retrieve data from
statusstring
Enumactiveinactive

Response

200Storefront List response
statusrequiredboolean
messagerequiredstring
datarequiredarray[object]
metarequiredobject
5 object properties
totalrequiredinteger
skippedrequiredinteger
perPagerequiredinteger
pagerequiredinteger
pageCountrequiredinteger
GET/storefront
curl https://api.paystack.co/storefront \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.list({
  perPage: 100,
  page: 100
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.list({
  per_page: 100,
  page: 100
})
puts response.data
Response
{
  "status": true,
  "message": "Storefronts retrieved",
  "data": [
    {
      "id": 1559046,
      "name": "My Storefront",
      "slug": "my-storefront",
      "description": "A description of my storefront",
      "status": "active",
      "currency": "NGN",
      "createdAt": "2024-11-01T12:00:00.000Z",
      "updatedAt": "2024-11-01T12:00:00.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "skipped": 0,
    "perPage": 50,
    "page": 1,
    "pageCount": 1
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Create Storefront

Create a digital shop to manage and display your products

Request Body

namerequiredstring
Name of the storefront
slugrequiredstring
A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug
currencyrequiredstring
Currency for prices of products in your storefront.
EnumGHSKESNGNUSDZAR
descriptionstring
The description of the storefront

Response

200Storefront Create response
statusrequiredboolean
messagerequiredstring
datarequiredobject
22 object properties
social_mediarequiredarray[object]
contactsrequiredarray[object]
namerequiredstring
slugrequiredstring
currencyrequiredstring
welcome_messagerequiredstring
success_messagerequiredstring
redirect_urlrequiredstring
descriptionrequiredstring
delivery_noterequiredstring
background_colorrequiredstring
statusrequiredstring
shippablerequiredboolean
integrationrequiredinteger
domainrequiredstring
digital_product_expiryrequiredstring
metadataobject
idrequiredinteger
createdAtrequiredstring
updatedAtrequiredstring
productsrequiredarray[object]
shipping_feesrequiredarray[object]
POST/storefront
curl https://api.paystack.co/storefront \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Obi and Sons",
    "slug": "obi_and_sons",
    "currency": "GHS"
  }' \
  -X POST
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.create({
  name: "Obi and Sons",
  slug: "obi_and_sons",
  currency: "GHS"
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.create({
  name: "Obi and Sons",
  slug: "obi_and_sons",
  currency: "GHS"
})
puts response.data
Response
{
  "status": true,
  "message": "Storefront created",
  "data": {
    "id": 1559046,
    "name": "My Storefront",
    "slug": "my-storefront",
    "description": "A description of my storefront",
    "status": "inactive",
    "currency": "NGN",
    "createdAt": "2024-11-01T12:00:00.000Z",
    "updatedAt": "2024-11-01T12:00:00.000Z"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Fetch Storefront

Get the details of a previously created Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Storefront Fetch response
statusrequiredboolean
messagerequiredstring
datarequiredobject
22 object properties
social_mediarequiredarray[object]
contactsrequiredarray[object]
namerequiredstring
slugrequiredstring
currencyrequiredstring
welcome_messagerequiredstring
success_messagerequiredstring
redirect_urlrequiredstring
descriptionrequiredstring
delivery_noterequiredstring
background_colorrequiredstring
statusrequiredstring
shippablerequiredboolean
integrationrequiredinteger
domainrequiredstring
digital_product_expiryrequiredstring
metadataobject
idrequiredinteger
createdAtrequiredstring
updatedAtrequiredstring
productsrequiredarray[object]
shipping_feesrequiredarray[object]
metarequiredobject
6 object properties
product_countrequiredinteger
totalrequiredinteger
skippedrequiredinteger
perPagerequiredinteger
pagerequiredinteger
pageCountrequiredinteger
GET/storefront/{id}
curl https://api.paystack.co/storefront/1559046 \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.fetch("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.fetch("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Storefront retrieved",
  "data": {
    "id": 1559046,
    "name": "My Storefront",
    "slug": "my-storefront",
    "description": "A description of my storefront",
    "status": "active",
    "currency": "NGN",
    "createdAt": "2024-11-01T12:00:00.000Z",
    "updatedAt": "2024-11-01T12:00:00.000Z"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Update Storefront

Update the details of a previously created Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Request Body

namestring
Name of the storefront
slugstring
A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug
descriptionstring
The description of the storefront

Response

200Storefront Update response
statusrequiredboolean
messagerequiredstring
PUT/storefront/{id}
curl https://api.paystack.co/storefront/1559046 \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "NAME",
    "slug": "SLUG"
  }' \
  -X PUT
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.update("1559046", {
  name: "NAME",
  slug: "SLUG"
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.update("1559046", {
  name: "NAME",
  slug: "SLUG"
})
puts response.data
Response
{
  "status": true,
  "message": "Storefront updated",
  "data": {
    "id": 1559046,
    "name": "Updated Storefront Name",
    "slug": "my-storefront",
    "description": "An updated description",
    "status": "active",
    "currency": "NGN",
    "createdAt": "2024-11-01T12:00:00.000Z",
    "updatedAt": "2024-11-01T14:00:00.000Z"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Delete Storefront

Delete a previously created Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Storefront Delete response
statusrequiredboolean
messagerequiredstring
DELETE/storefront/{id}
curl https://api.paystack.co/storefront/1559046 \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -X DELETE
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.delete("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.delete_("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Storefront deleted"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Verify Storefront Slug

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

Path Parameters

slugrequiredstring
The custom slug to check

Response

200Request successful
statusboolean
messagestring
dataobject
GET/storefront/verify/{slug}
curl https://api.paystack.co/storefront/verify/struct_and_faces \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.verifySlug("struct_and_faces");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.verify_slug("struct_and_faces")
puts response.data
Response
{
  "status": true,
  "message": "Slug is available"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Fetch Storefront Orders

Fetch all orders in your Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Request successful
statusboolean
messagestring
dataobject
GET/storefront/{id}/order
curl https://api.paystack.co/storefront/1559046/order \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.fetchOrders("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.fetch_orders("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Orders retrieved",
  "data": [
    {
      "id": 12345,
      "code": "ORD_abc123def456",
      "amount": 50000,
      "currency": "NGN",
      "status": "success",
      "customer": {
        "email": "[email protected]"
      },
      "createdAt": "2024-11-01T12:00:00.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "skipped": 0,
    "perPage": 50,
    "page": 1,
    "pageCount": 1
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link List Storefront Products

List the products in a Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Request successful
statusboolean
messagestring
dataobject
GET/storefront/{id}/product
curl https://api.paystack.co/storefront/1559046/product \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.listProducts("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.list_products("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Products retrieved",
  "data": [
    {
      "id": 2196244,
      "name": "Sample Product",
      "description": "A sample product",
      "price": 10000,
      "currency": "NGN",
      "active": true
    }
  ],
  "meta": {
    "total": 1,
    "skipped": 0,
    "perPage": 50,
    "page": 1,
    "pageCount": 1
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Add Products to Storefront

Add previously created products to a Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Request Body

productsrequiredarray[integer]
An array of product IDs

Response

200Request successful
statusboolean
messagestring
dataobject
POST/storefront/{id}/product
curl https://api.paystack.co/storefront/1559046/product \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "products": []
  }' \
  -X POST
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.addProducts("1559046", {
  products: []
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.add_products("1559046", {
  products: []
})
puts response.data
Response
{
  "status": true,
  "message": "Products added to storefront"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Publish Storefront

Make your Storefront publicly available

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Request successful
statusboolean
messagestring
dataobject
POST/storefront/{id}/publish
curl https://api.paystack.co/storefront/1559046/publish \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -X POST
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.publish("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.publish("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Storefront published"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Duplicate Storefront

Duplicate a previously created Storefront

Path Parameters

idrequiredinteger
The unique identifier of the Storefront

Response

200Request successful
statusboolean
messagestring
dataobject
POST/storefront/{id}/duplicate
curl https://api.paystack.co/storefront/1559046/duplicate \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -X POST
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.storefront.duplicate("1559046");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.storefront.duplicate("1559046")
puts response.data
Response
{
  "status": true,
  "message": "Storefront duplicated"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}