Create a recurrence plan
Creates a new recurrence plan for Pix Automatic.
curl --request POST \
--url https://api.paymee.com.br/v1.1/pix-automatic/plans \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>' \
--data '
{
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": true
}
'import requests
url = "https://api.paymee.com.br/v1.1/pix-automatic/plans"
payload = {
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-token': '<x-api-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Plano Premium Mensal',
description: 'Acesso completo a todas as funcionalidades da plataforma.',
frequency: 'MONTHLY',
period: 1,
imediateAmount: 49.9,
recurrenceAmount: 29.9,
minimumRecurrenceAmount: 29.9,
retryPolicy: 'ACCEPT_3R_7D',
enabled: true
})
};
fetch('https://api.paymee.com.br/v1.1/pix-automatic/plans', 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.paymee.com.br/v1.1/pix-automatic/plans",
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([
'title' => 'Plano Premium Mensal',
'description' => 'Acesso completo a todas as funcionalidades da plataforma.',
'frequency' => 'MONTHLY',
'period' => 1,
'imediateAmount' => 49.9,
'recurrenceAmount' => 29.9,
'minimumRecurrenceAmount' => 29.9,
'retryPolicy' => 'ACCEPT_3R_7D',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$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.paymee.com.br/v1.1/pix-automatic/plans"
payload := strings.NewReader("{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-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.paymee.com.br/v1.1/pix-automatic/plans")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/pix-automatic/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 0,
"message": "success",
"id": "6851c0842bf40769ead1fde5",
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": true,
"creation": "2025-06-17 19:22:44"
}{
"errorCount": 1,
"errors": [
{
"field": "title",
"message": "may not be empty"
}
],
"message": "field validation failure",
"status": -1
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}Headers
"your-x-api-key"
"your-x-api-token"
Body
Title of the plan.
"Plano Premium Mensal"
Detailed description of the plan.
"Acesso completo a todas as funcionalidades da plataforma."
Billing frequency.
"MONTHLY"
Period of the frequency (e.g., 1 for monthly, 3 for quarterly).
1
Immediate charge amount upon joining the plan.
49.9
Amount for recurring charges.
29.9
Minimum amount accepted for recurring charges.
29.9
Retry policy in case of failure.
ACCEPT_3R_7D, NOT_ACCEPT "ACCEPT_3R_7D"
Indicates if the plan is active.
true
Response
Plan created successfully.
0
"success"
Unique ID of the generated plan.
"6851c0842bf40769ead1fde5"
"Plano Premium Mensal"
"Acesso completo a todas as funcionalidades da plataforma."
"MONTHLY"
1
49.9
29.9
29.9
"ACCEPT_3R_7D"
true
Date and time of plan creation.
"2025-06-17 19:22:44"
curl --request POST \
--url https://api.paymee.com.br/v1.1/pix-automatic/plans \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>' \
--data '
{
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": true
}
'import requests
url = "https://api.paymee.com.br/v1.1/pix-automatic/plans"
payload = {
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-token': '<x-api-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Plano Premium Mensal',
description: 'Acesso completo a todas as funcionalidades da plataforma.',
frequency: 'MONTHLY',
period: 1,
imediateAmount: 49.9,
recurrenceAmount: 29.9,
minimumRecurrenceAmount: 29.9,
retryPolicy: 'ACCEPT_3R_7D',
enabled: true
})
};
fetch('https://api.paymee.com.br/v1.1/pix-automatic/plans', 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.paymee.com.br/v1.1/pix-automatic/plans",
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([
'title' => 'Plano Premium Mensal',
'description' => 'Acesso completo a todas as funcionalidades da plataforma.',
'frequency' => 'MONTHLY',
'period' => 1,
'imediateAmount' => 49.9,
'recurrenceAmount' => 29.9,
'minimumRecurrenceAmount' => 29.9,
'retryPolicy' => 'ACCEPT_3R_7D',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$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.paymee.com.br/v1.1/pix-automatic/plans"
payload := strings.NewReader("{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-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.paymee.com.br/v1.1/pix-automatic/plans")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/pix-automatic/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Plano Premium Mensal\",\n \"description\": \"Acesso completo a todas as funcionalidades da plataforma.\",\n \"frequency\": \"MONTHLY\",\n \"period\": 1,\n \"imediateAmount\": 49.9,\n \"recurrenceAmount\": 29.9,\n \"minimumRecurrenceAmount\": 29.9,\n \"retryPolicy\": \"ACCEPT_3R_7D\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 0,
"message": "success",
"id": "6851c0842bf40769ead1fde5",
"title": "Plano Premium Mensal",
"description": "Acesso completo a todas as funcionalidades da plataforma.",
"frequency": "MONTHLY",
"period": 1,
"imediateAmount": 49.9,
"recurrenceAmount": 29.9,
"minimumRecurrenceAmount": 29.9,
"retryPolicy": "ACCEPT_3R_7D",
"enabled": true,
"creation": "2025-06-17 19:22:44"
}{
"errorCount": 1,
"errors": [
{
"field": "title",
"message": "may not be empty"
}
],
"message": "field validation failure",
"status": -1
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}
