Produtos
Create Product
Cria um produto para ser referenciado em pagamentos e assinaturas. Limite de 500 produtos por conta por ambiente.
POST
/
v1
/
products
Create Product
curl --request POST \
--url https://api.purincash.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"metadata": "{}"
}
'import requests
url = "https://api.purincash.com/v1/products"
payload = {
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"metadata": "{}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Premium Plan',
description: 'Monthly access',
priceCents: 4990,
currency: 'BRL',
metadata: '{}'
})
};
fetch('https://api.purincash.com/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.purincash.com/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Premium Plan',
'description' => 'Monthly access',
'priceCents' => 4990,
'currency' => 'BRL',
'metadata' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.purincash.com/v1/products"
payload := strings.NewReader("{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.purincash.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.purincash.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "60f7b2a1c3e4d5f6a7b8c9d0",
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"active": true,
"metadata": "{}",
"createdAt": "2026-03-18T10:00:00.000Z"
}{
"error": "name is required"
}{
"error": "<string>"
}{
"error": "Internal error"
}Authorizations
Chave de API gerada no dashboard da PurinCash (ps_live_ ou ps_test_).
Body
application/json
Nome do produto. Obrigatório, máximo de 200 caracteres.
Maximum string length:
200Preço em centavos. Inteiro maior ou igual a 100 (mínimo R$ 1,00).
Required range:
x >= 100Descrição do produto. Máximo de 500 caracteres.
Maximum string length:
500Moeda do produto. Padrão "BRL", máximo de 3 caracteres.
Maximum string length:
3String JSON com metadados livres. Máximo de 2048 caracteres.
Maximum string length:
2048Response
Produto criado com sucesso.
Identificador único do produto.
Nome do produto.
Descrição do produto.
Preço em centavos.
Moeda do produto.
Indica se o produto está ativo.
String JSON com metadados livres.
Data de criação do produto.
⌘I
Create Product
curl --request POST \
--url https://api.purincash.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"metadata": "{}"
}
'import requests
url = "https://api.purincash.com/v1/products"
payload = {
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"metadata": "{}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Premium Plan',
description: 'Monthly access',
priceCents: 4990,
currency: 'BRL',
metadata: '{}'
})
};
fetch('https://api.purincash.com/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.purincash.com/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Premium Plan',
'description' => 'Monthly access',
'priceCents' => 4990,
'currency' => 'BRL',
'metadata' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.purincash.com/v1/products"
payload := strings.NewReader("{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.purincash.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.purincash.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Premium Plan\",\n \"description\": \"Monthly access\",\n \"priceCents\": 4990,\n \"currency\": \"BRL\",\n \"metadata\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "60f7b2a1c3e4d5f6a7b8c9d0",
"name": "Premium Plan",
"description": "Monthly access",
"priceCents": 4990,
"currency": "BRL",
"active": true,
"metadata": "{}",
"createdAt": "2026-03-18T10:00:00.000Z"
}{
"error": "name is required"
}{
"error": "<string>"
}{
"error": "Internal error"
}
