Create a product
Before you create a payment link using Pay by Link, you must first create a product by performing a POST
call to the /catalog/products
endpoint.
Required information
Before you proceed with creating a product, ensure the following required fields are present in your request body.
Field | Data Type | Description | Required (R) or Optional (O) |
---|---|---|---|
name |
string | Name of the product. | R |
sku |
string | Merchant identifier (Stock Keeping Unit). | O |
description |
string | Description of the product. | O |
The following is a sample request to create a new product.
HTTP method: POST
Endpoint: /catalog/products
Json
{
"name": "Casio watch",
"sku": "ABC123DEF",
"description": "This is a 1989 model Casio watch"
}
Response:
Json
{
"productId": "GHIJ1234KLMN",
"name": " Casio watch",
"sku": "ABC123DEF",
"description": " This is a 1989 model Casio watch"
}
Now you have the product ID for which you can create a payment link.