Obter Método de Pagamento
curl --request GET \
--url http://api.gu1.ai/entities/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/entities/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/entities/{id}', 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 => "http://api.gu1.ai/entities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.gu1.ai/entities/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/entities/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"entityType": "<string>",
"entityData": {},
"relationships": [
{}
],
"riskScore": 123,
"createdAt": "<string>"
}Referência API
Obter Método de Pagamento
Recuperar uma entidade de método de pagamento por ID — no modelo de entidades gu1 para cartões, contas e carteiras, com exemplos para get.
GET
/
entities
/
{id}
Obter Método de Pagamento
curl --request GET \
--url http://api.gu1.ai/entities/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/entities/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/entities/{id}', 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 => "http://api.gu1.ai/entities/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.gu1.ai/entities/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/entities/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"id": "<string>",
"entityType": "<string>",
"entityData": {},
"relationships": [
{}
],
"riskScore": 123,
"createdAt": "<string>"
}Visão Geral
Recupera informações detalhadas sobre uma entidade de método de pagamento específica incluindo seus dados, relacionamentos e metadados.Endpoint
GET http://api.gu1.ai/entities/{id}
Autenticação
Requer uma chave API válida no cabeçalho de Autorização:Authorization: Bearer YOUR_API_KEY
Parâmetros de Rota
string
required
UUID da entidade de método de pagamento a recuperar
Exemplos de Requisições
curl -X GET "http://api.gu1.ai/entities/payment-method-uuid-123" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'http://api.gu1.ai/entities/payment-method-uuid-123',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const paymentMethod = await response.json();
console.log(paymentMethod.entityData.paymentMethod);
import requests
response = requests.get(
'http://api.gu1.ai/entities/payment-method-uuid-123',
headers={
'Authorization': 'Bearer YOUR_API_KEY'
}
)
payment_method = response.json()
print(payment_method['entityData']['paymentMethod'])
Resposta
boolean
Se a requisição foi bem-sucedida
string
UUID da entidade de método de pagamento
string
Sempre
"payment_method"object
Dados do método de pagamento
array
Array de relacionamentos com outras entidades
number
Pontuação de risco calculada (se analisado)
string
Timestamp ISO 8601 da criação
Exemplo de Resposta
{
"success": true,
"id": "payment-method-uuid-123",
"entityType": "payment_method",
"entityData": {
"paymentMethod": {
"type": "credit_card",
"last4": "4242",
"brand": "visa",
"expiryMonth": "12",
"expiryYear": "2025",
"holderName": "John Doe",
"issuerCountry": "BR",
"bin": "424242",
"funding": "credit"
}
},
"relationships": [
{
"targetEntityId": "person-uuid-123",
"relationshipType": "owns",
"strength": 1.0
}
],
"riskScore": 15,
"createdAt": "2024-01-15T10:00:00.000Z"
}
Veja Também
Was this page helpful?