Criar Plano de Parcelamento
curl --request POST \
--url https://api.stage.localpayment.com/api/payin/installments-plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": {
"code": "1000"
},
"country": "ARG",
"currency": "ARS",
"amount": 1000,
"accountNumber": "{{accountNumber}}"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/installments-plan"
payload = {
"paymentMethod": { "code": "1000" },
"country": "ARG",
"currency": "ARS",
"amount": 1000,
"accountNumber": "{{accountNumber}}"
}
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({
paymentMethod: {code: '1000'},
country: 'ARG',
currency: 'ARS',
amount: 1000,
accountNumber: '{{accountNumber}}'
})
};
fetch('https://api.stage.localpayment.com/api/payin/installments-plan', 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.stage.localpayment.com/api/payin/installments-plan",
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([
'paymentMethod' => [
'code' => '1000'
],
'country' => 'ARG',
'currency' => 'ARS',
'amount' => 1000,
'accountNumber' => '{{accountNumber}}'
]),
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.stage.localpayment.com/api/payin/installments-plan"
payload := strings.NewReader("{\n \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\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.stage.localpayment.com/api/payin/installments-plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/installments-plan")
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 \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\n}"
response = http.request(request)
puts response.read_body{
"installmentsToken": "b71a1973-cfdc-4a7b-b014-e03eb4462e82",
"creationDate": "2025-01-01T23:53:52.7150456+00:00",
"expirationDate": "2025-01-30T00:03:52.71509+00:00",
"currency": "ARS",
"amount": 2000,
"installments": [
{
"installments": 2,
"installmentAmount": 1100,
"totalPaymentAmount": 2200,
"amountWithInternalFee": 2200,
"financingFee": 200
},
{
"installments": 3,
"installmentAmount": 941.7187,
"totalPaymentAmount": 2825.156,
"amountWithInternalFee": 2360,
"financingFee": 825.156
},
{
"installments": 6,
"installmentAmount": 633.17334,
"totalPaymentAmount": 3799.04,
"amountWithInternalFee": 2800,
"financingFee": 1799.04
}
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}Parcelas
Criar Plano de Parcelamento
POST
/
api
/
payin
/
installments-plan
Criar Plano de Parcelamento
curl --request POST \
--url https://api.stage.localpayment.com/api/payin/installments-plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethod": {
"code": "1000"
},
"country": "ARG",
"currency": "ARS",
"amount": 1000,
"accountNumber": "{{accountNumber}}"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/installments-plan"
payload = {
"paymentMethod": { "code": "1000" },
"country": "ARG",
"currency": "ARS",
"amount": 1000,
"accountNumber": "{{accountNumber}}"
}
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({
paymentMethod: {code: '1000'},
country: 'ARG',
currency: 'ARS',
amount: 1000,
accountNumber: '{{accountNumber}}'
})
};
fetch('https://api.stage.localpayment.com/api/payin/installments-plan', 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.stage.localpayment.com/api/payin/installments-plan",
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([
'paymentMethod' => [
'code' => '1000'
],
'country' => 'ARG',
'currency' => 'ARS',
'amount' => 1000,
'accountNumber' => '{{accountNumber}}'
]),
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.stage.localpayment.com/api/payin/installments-plan"
payload := strings.NewReader("{\n \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\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.stage.localpayment.com/api/payin/installments-plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/installments-plan")
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 \"paymentMethod\": {\n \"code\": \"1000\"\n },\n \"country\": \"ARG\",\n \"currency\": \"ARS\",\n \"amount\": 1000,\n \"accountNumber\": \"{{accountNumber}}\"\n}"
response = http.request(request)
puts response.read_body{
"installmentsToken": "b71a1973-cfdc-4a7b-b014-e03eb4462e82",
"creationDate": "2025-01-01T23:53:52.7150456+00:00",
"expirationDate": "2025-01-30T00:03:52.71509+00:00",
"currency": "ARS",
"amount": 2000,
"installments": [
{
"installments": 2,
"installmentAmount": 1100,
"totalPaymentAmount": 2200,
"amountWithInternalFee": 2200,
"financingFee": 200
},
{
"installments": 3,
"installmentAmount": 941.7187,
"totalPaymentAmount": 2825.156,
"amountWithInternalFee": 2360,
"financingFee": 825.156
},
{
"installments": 6,
"installmentAmount": 633.17334,
"totalPaymentAmount": 3799.04,
"amountWithInternalFee": 2800,
"financingFee": 1799.04
}
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}Este endpoint cria um plano de parcelamento para uma transação de Payin, permitindo que você ofereça aos clientes a flexibilidade de pagar suas compras em parcelas. Você pode especificar o número de parcelas, o valor da parcela e outros detalhes relevantes. A resposta incluirá os detalhes do plano de parcelamento, como o valor total a ser pago e as datas de vencimento de cada parcela.
Expiração do token O token fornecido na resposta é válido por 10 minutos a partir do momento em que é gerado. Após esse período, o token expirará e não poderá mais ser usado para processar planos de parcelamento.
Autorizações
Cabeçalhos
Token de acesso Bearer para autenticação. Este token é obtido nos endpoints Obter token de acesso ou Renovar token de acesso.
Corpo
application/json
País. ISO 3166-1 alfa-3.
Resposta
Criado
Última modificação em 10 de novembro de 2026

