Atualizar método de pagamento da assinatura
curl --request PUT \
--url https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method \
--header 'Content-Type: application/json' \
--header 'X-Api-Client-Token: <api-key>' \
--data '
{
"card": {
"encrypted": "<string>"
}
}
'import requests
url = "https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method"
payload = { "card": { "encrypted": "<string>" } }
headers = {
"X-Api-Client-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Client-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({card: {encrypted: '<string>'}})
};
fetch('https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method', 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://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'card' => [
'encrypted' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Client-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://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method"
payload := strings.NewReader("{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Client-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.put("https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method")
.header("X-Api-Client-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Client-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payment_method": "bank_slip"
}Financeiro
Atualizar método de pagamento da assinatura
Atualiza o método de pagamento de uma assinatura
PUT
/
financial
/
subscriptions
/
{subscription_code}
/
payment-method
Atualizar método de pagamento da assinatura
curl --request PUT \
--url https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method \
--header 'Content-Type: application/json' \
--header 'X-Api-Client-Token: <api-key>' \
--data '
{
"card": {
"encrypted": "<string>"
}
}
'import requests
url = "https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method"
payload = { "card": { "encrypted": "<string>" } }
headers = {
"X-Api-Client-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Client-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({card: {encrypted: '<string>'}})
};
fetch('https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method', 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://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'card' => [
'encrypted' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Client-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://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method"
payload := strings.NewReader("{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Client-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.put("https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method")
.header("X-Api-Client-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.ticto.com.br/api/v1/financial/subscriptions/{subscription_code}/payment-method")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Client-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"card\": {\n \"encrypted\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"payment_method": "bank_slip"
}Authorizations
ApiClientTokenbearerAuth
Token de autenticação do cliente obtido via endpoint /auth
Path Parameters
Código da assinatura
Body
application/json
Método de pagamento da assinatura.
pix_recurring não é aceito aqui (422): o PIX Automático só nasce no checkout, porque o mandato depende do QR code autorizado pelo pagador.
Available options:
bank_slip, credit_card, pix Obrigatório somente quando payment_method = credit_card
Show child attributes
Show child attributes
Response
Método de pagamento atualizado com sucesso
Método de pagamento atualizado
Available options:
bank_slip, credit_card, pix