Créer un plan de paiements échelonnés
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"
}
]
}Paiements échelonnés
Créer un plan de paiement échelonné
POST
/
api
/
payin
/
installments-plan
Créer un plan de paiements échelonnés
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"
}
]
}Cet endpoint crée un plan de paiement échelonné pour une transaction Payin, ce qui vous permet d’offrir à vos clients la possibilité de régler leurs achats en plusieurs fois. Vous pouvez indiquer le nombre d’échéances, le montant de chaque échéance et d’autres informations utiles. La réponse comprend les détails du plan de paiement échelonné, comme le montant total à payer et la date d’échéance de chaque versement.
Expiration du jeton Le jeton fourni dans la réponse est valable 10 minutes à compter de sa génération. Passé ce délai, le jeton expire et ne peut plus être utilisé pour traiter des plans de paiement échelonné.
Autorisations
En-têtes
Jeton d'accès Bearer pour l'authentification. Ce jeton s'obtient via les endpoints Obtenir un jeton d'accès ou Actualiser le jeton d'accès.
Corps
application/json
Pays. ISO 3166-1 alpha-3.
Réponse
Créé
Dernière modification le 22 novembre 2026

