Create Product
Create goods or services.
If the product is goods, use Create SKU to add a SKU to the product.
This method triggers the Product Created webhook. This webhook contains the same information as the response.
active
Indicates whether the product is currently available for purchase.
true
attributes
Array of up to 5 alphanumeric strings defined by the merchant. Each string defines the key in a key-value pair in the
attributesobject in the correspondingskuobjects.
description
Full text description of the product.
id
Unique string for identification of the product. Legal input includes all the English alphanumeric characters and the underscore (_) character. If the merchant does not define an ID, Rapyd generates it with a string that starts with product_.
images
Array of Base64-encoded images.
name
The name of the product or service that is displayed to the customer.
shippable
Indicates whether the product is physically shipped to the customer. Relevant when
typeis goods.false
statement_descriptor
A text description that appears in the customer's invoice. Limited to 22 characters. Relevant when
typeis service.
type
One of the following:
services
goods
unit_label
A label that represents units of this product on customers’ invoices, such as views or downloads. Relevant when
typeis service.
Code Samples
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var metadata = new { merchant_defined = true }; var attributes = new string[] { "location", "size" }; var requestObj = new { id = "", name = "Monthly parking", type = "services", active = true, attributes, description = "Monthly parking - covered area, compact car", metadata, shippable = false, statement_descriptor = "", unit_label = "", }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/products", request); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const body = { id: '', name: 'Monthly parking', type: 'services', active: true, attributes: ['location', 'size'], description: 'Monthly parking - covered area, compact car', metadata: { merchant_defined: true }, shippable: false, statement_descriptor: '', unit_label: '' }; const result = await makeRequest('POST', '/v1/products', body); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); $body = [ "id" => "", "name" => "Monthly parking", "type" => "services", "active" => true, "attributes" => [ "location", "size" ], "description" => "Monthly parking - covered area, compact car", "shippable" => false, "statement_descriptor" => "", "unit_label" => "" ]; try { $object = make_request('post', '/v1/products', $body); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
product = { "id": "", "name": "Monthly parking", "type": "services", "active": True, "attributes": [ "location", "size" ], "description": "Monthly parking - covered area, compact car", "metadata": { "merchant_defined": True }, "shippable": False, "statement_descriptor": "monthly_parking", "unit_label": "", } result = make_request(method='post', path='/v1/products', body=product) pprint(result)
/v1/products
Create Services
curl -X post 'https://sandboxapi.rapyd.net/v1/products' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "name": "Monthly parking", "type": "services", "active": true, "attributes": [ "location", "size" ], "description": "Monthly parking - covered area, compact car" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "57404a17-a32c-4409-b000-5a2e9ad1d7af" }, "data": { "id": "product_fdbe0fa3c6c7aec44d1b7cca7736486e", "active": true, "attributes": [ "location", "size" ], "created_at": 1756283215, "description": "Monthly parking - covered area, compact car", "images": [], "metadata": {}, "name": "Monthly parking", "package_dimensions": { "height": 0, "length": 0, "weight": 0, "width": 0 }, "shippable": false, "skus": [], "statement_descriptor": "", "type": "services", "unit_label": "", "updated_at": 1756283215 } }
Create Goods
curl -X post 'https://sandboxapi.rapyd.net/v1/products' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "", "name": "Gamer's Chair", "type": "goods", "attributes": [ "color", "arm_rest" ], "description": "The ultimate in comfort for the dedicated gamer.", "images": [ "64bit-encoded-image-1", "64bit-encoded-image-2" ], "package_dimensions": { "height": 10, "length": 20, "weight": 30, "width": 40 }, "shippable": true }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "b662a2c3-5be2-4c4c-931e-87b39e80302b" }, "data": { "id": "product_94f575fe0c11a26723f91db5ceef2c25", "active": true, "attributes": [ "arm_rest", "color" ], "created_at": 1761206928, "description": "The ultimate in comfort for the dedicated gamer.", "images": [], "metadata": {}, "name": "Gamer's Chair", "package_dimensions": { "height": 10, "length": 20, "weight": 30, "width": 40 }, "shippable": true, "skus": [], "statement_descriptor": "", "type": "goods", "unit_label": "", "updated_at": 1761206928 } }