POST https://sandbox.payme.io/api/productsPOST https://live.payme.io/api/productsAuthorization: Bearer <token>This endpoint is an essential part of the product management system.
The endpoint allows clients to add new products to the system by sending the necessary information in the request.
This endpoint takes no path, query or header parameters.
Content type: application/json
Post the necessary fields for the API to create a new user.
| Field | Type | Required | Description |
|---|---|---|---|
product_remote_id |
string | no | The extneral product identifier. |
name |
string | yes | The name of the product. |
status |
integer | yes | The status of the product. Options: 1 = Available, 0 = Not Available |
description |
string | yes | The product description. Maximum Length = 75 Characters. |
store_prices |
object | no | The item store configuration. |
store_prices.currency |
string | no | 3 Letter ISO. |
store_prices.is_vat_free |
boolean | no | The VAT indicator. |
store_prices.price_without_vat |
number | no | Price without VAT. |
store_prices.price_include_vat |
number | no | Price with VAT. |
costs |
object | no | The item costs object. |
costs.currency |
string | no | 3 Letter ISO. |
costs.is_vat_free |
boolean | no | The VAT indicator. |
costs.price_without_vat |
number | no | The price without VAT. |
costs.price_include_vat |
number | no | The price including VAT. |
{
"payme_client_key": "your_payme_client_key",
"seller_payme_id": "seller789",
"product_code": "PROD003",
"name": "Detailed Costs Product",
"status": 0,
"category": 2,
"description": "This product includes detailed cost information.",
"item_sale_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 150,
"Price_include_vat": 180
},
"item_costs_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 70,
"Price_include_vat": 84
}
}
curl -X POST 'https://sandbox.payme.io/api/products' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
--data-raw '{
"payme_client_key": "your_payme_client_key",
"seller_payme_id": "seller789",
"product_code": "PROD003",
"name": "Detailed Costs Product",
"status": 0,
"category": 2,
"description": "This product includes detailed cost information.",
"item_sale_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 150,
"Price_include_vat": 180
},
"item_costs_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 70,
"Price_include_vat": 84
}
}'
const response = await fetch("https://sandbox.payme.io/api/products", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <YOUR_TOKEN>",
},
body: JSON.stringify({
"payme_client_key": "your_payme_client_key",
"seller_payme_id": "seller789",
"product_code": "PROD003",
"name": "Detailed Costs Product",
"status": 0,
"category": 2,
"description": "This product includes detailed cost information.",
"item_sale_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 150,
"Price_include_vat": 180
},
"item_costs_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 70,
"Price_include_vat": 84
}
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/products",
headers={
"Authorization": "Bearer <YOUR_TOKEN>",
},
json={
"payme_client_key": "your_payme_client_key",
"seller_payme_id": "seller789",
"product_code": "PROD003",
"name": "Detailed Costs Product",
"status": 0,
"category": 2,
"description": "This product includes detailed cost information.",
"item_sale_details": {
"currency": "GBP",
"vat_free": False,
"Price_without_vat": 150,
"Price_include_vat": 180,
},
"item_costs_details": {
"currency": "GBP",
"vat_free": False,
"Price_without_vat": 70,
"Price_include_vat": 84,
},
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"payme_client_key": "your_payme_client_key",
"seller_payme_id": "seller789",
"product_code": "PROD003",
"name": "Detailed Costs Product",
"status": 0,
"category": 2,
"description": "This product includes detailed cost information.",
"item_sale_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 150,
"Price_include_vat": 180
},
"item_costs_details": {
"currency": "GBP",
"vat_free": false,
"Price_without_vat": 70,
"Price_include_vat": 84
}
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer <YOUR_TOKEN>',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
created_at |
string | The timestamp of the creation. |
guid |
integer | The unique PayMe product identifier. |
{
"status_code": 0,
"message": "OK",
"Created_date": "2024-05-16T00:00:00Z",
"Payme_product_id": 1234567890
}
| Field | Type | Description |
|---|---|---|
message |
string | The error text message. |
status_error_code |
integer | The error code. |
{
"status_code": 1,
"message": "Bad Request",
"status_error_code": 400
}
| Field | Type | Description |
|---|---|---|
message |
string | The error text message. |
status_error_code |
integer | The error code. |
{
"status_code": 1,
"message": "Unauthorized request",
"status_error_code": 401
}
| Field | Type | Description |
|---|---|---|
message |
string | The error text message. |
status_error_code |
integer |
{
"status_code": 1,
"message": "Internal Server Error",
"status_error_code": 500
}