Block a card
curl --request POST \
--url https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/blockimport requests
url = "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block', 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.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block"
req, _ := http.NewRequest("POST", url, nil)
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.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "ACCOUNT_NOT_FOUND",
"origin": "BANKING",
"message": "Account not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BANKING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "organizationId",
"message": "Invalid UUID",
"code": "ORGANIZATIONID_UUID"
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider did not respond in time, please retry"
}Block a card
Blocks a card: it stops authorizing purchases until you unblock it.
POST
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
accounts
/
{accountId}
/
wallets
/
{walletId}
/
cards
/
{cardId}
/
block
Block a card
curl --request POST \
--url https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/blockimport requests
url = "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block', 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.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block"
req, _ := http.NewRequest("POST", url, nil)
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.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/cards/{cardId}/block")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "ACCOUNT_NOT_FOUND",
"origin": "BANKING",
"message": "Account not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BANKING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "organizationId",
"message": "Invalid UUID",
"code": "ORGANIZATIONID_UUID"
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider did not respond in time, please retry"
}Blocking keeps the card, its number and its limits — unblock it to use it again. Blocking an already blocked card succeeds. Use
default as walletId for the organization’s main wallet, and send x-environment: LIVE for a production card.
Any member of the organization can block a card.Headers
Environment of the card: LIVE (production) or TEST (sandbox). When you omit it, the request runs in TEST; any other value is rejected.
Available options:
LIVE, TEST Path Parameters
ID of your realm.
Format: UUID
ID of the organization the card belongs to.
Format: UUID
ID of the organization's account (24 hexadecimal characters).
Pattern:
^[0-9a-fA-F]{24}$ID of the card's wallet (24 hexadecimal characters), or default for the organization's main wallet.
Pattern:
^([0-9a-fA-F]{24}|default)$ID of the card (24 hexadecimal characters).
Pattern:
^[0-9a-fA-F]{24}$Response
No Content. The operation succeeded and the response has no body.