curl --request POST \
--url https://tapipay-facade.homo.tapila.cloud/adhesions/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-authorization-token: <api-key>' \
--data '
{
"externalClientId": "<string>",
"productId": "<string>",
"externalProductId": "<string>",
"companyCode": "<string>"
}
'import requests
url = "https://tapipay-facade.homo.tapila.cloud/adhesions/cancel"
payload = {
"externalClientId": "<string>",
"productId": "<string>",
"externalProductId": "<string>",
"companyCode": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-authorization-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-authorization-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
externalClientId: '<string>',
productId: '<string>',
externalProductId: '<string>',
companyCode: '<string>'
})
};
fetch('https://tapipay-facade.homo.tapila.cloud/adhesions/cancel', 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://tapipay-facade.homo.tapila.cloud/adhesions/cancel",
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([
'externalClientId' => '<string>',
'productId' => '<string>',
'externalProductId' => '<string>',
'companyCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-authorization-token: <api-key>"
],
]);
$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://tapipay-facade.homo.tapila.cloud/adhesions/cancel"
payload := strings.NewReader("{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-authorization-token", "<api-key>")
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://tapipay-facade.homo.tapila.cloud/adhesions/cancel")
.header("x-api-key", "<api-key>")
.header("x-authorization-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tapipay-facade.homo.tapila.cloud/adhesions/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-authorization-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"externalClientId": "CLI-00042",
"productId": "prd_7",
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z"
},
"requestId": "<string>"
}Dar de baja la adhesión de un usuario a un producto
Desactiva la adhesión del usuario a ese producto. Repetir la baja sobre una adhesión ya inactiva también responde 200. No modifica el medio de pago del usuario ni su marca de default; para volver a adherir, usa POST /adhesions.
curl --request POST \
--url https://tapipay-facade.homo.tapila.cloud/adhesions/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-authorization-token: <api-key>' \
--data '
{
"externalClientId": "<string>",
"productId": "<string>",
"externalProductId": "<string>",
"companyCode": "<string>"
}
'import requests
url = "https://tapipay-facade.homo.tapila.cloud/adhesions/cancel"
payload = {
"externalClientId": "<string>",
"productId": "<string>",
"externalProductId": "<string>",
"companyCode": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-authorization-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-authorization-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
externalClientId: '<string>',
productId: '<string>',
externalProductId: '<string>',
companyCode: '<string>'
})
};
fetch('https://tapipay-facade.homo.tapila.cloud/adhesions/cancel', 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://tapipay-facade.homo.tapila.cloud/adhesions/cancel",
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([
'externalClientId' => '<string>',
'productId' => '<string>',
'externalProductId' => '<string>',
'companyCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-authorization-token: <api-key>"
],
]);
$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://tapipay-facade.homo.tapila.cloud/adhesions/cancel"
payload := strings.NewReader("{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-authorization-token", "<api-key>")
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://tapipay-facade.homo.tapila.cloud/adhesions/cancel")
.header("x-api-key", "<api-key>")
.header("x-authorization-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tapipay-facade.homo.tapila.cloud/adhesions/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-authorization-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalClientId\": \"<string>\",\n \"productId\": \"<string>\",\n \"externalProductId\": \"<string>\",\n \"companyCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"externalClientId": "CLI-00042",
"productId": "prd_7",
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z"
},
"requestId": "<string>"
}Autorizaciones
API key del API Gateway de Tapi. Requerida en todas las operaciones. Distinta por ambiente (desarrollo, homologación, producción).
Token TAPI JWT. Requerido en todas las operaciones. Se envía sin prefijo "Bearer". Ej: x-authorization-token: eyJhbGci...
Cuerpo
Body de POST /adhesions y POST /adhesions/cancel. Solo acepta externalClientId, productId, externalProductId y companyCode: cualquier otro campo devuelve 400 con el campo en details[].field. Debes enviar uno de productId o externalProductId (no ambos, no ninguno).
Tu identificador del usuario final: el mismo del enrolamiento. Solo letras, dígitos, _ y -, hasta 100 caracteres.
100^[\w-]{1,100}$ID del producto en Tapi, formato prd_<número>. Excluyente con externalProductId.
^prd_\d+$Tu identificador del producto. Excluyente con productId. No admite los caracteres ', ", \, ; (400).
Opcional. Solo si tu cliente tiene varias companies; si no, se resuelve desde el token.

