curl --request POST \
--url https://api.example.com/v1/webhooks/validates/async \
--header 'Authorization: Bearer <token>' \
--header 'Chave-Idempotencia: <chave-idempotencia>' \
--header 'Content-Type: application/json' \
--data '
{
"creditos": [
{
"creditoOrdemPagamento": {
"endToEndId": "E0435879820200123221500000000002",
"idConciliacaoRecebedor": "REC00000000000000000000000000000001"
},
"pagador": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nome": "Jane Doe",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
},
"recebedor": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
}
}
],
"tpCanal": 1
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/validates/async"
payload := strings.NewReader("{\n \"creditos\": [\n {\n \"creditoOrdemPagamento\": {\n \"endToEndId\": \"E0435879820200123221500000000002\",\n \"idConciliacaoRecebedor\": \"REC00000000000000000000000000000001\"\n },\n \"pagador\": {\n \"cpfCnpj\": \"11144477735\",\n \"ispb\": \"12345678\",\n \"nome\": \"Jane Doe\",\n \"nrConta\": \"1234567\",\n \"nrAgencia\": \"0001\",\n \"tpConta\": 0,\n \"tpPessoa\": 0\n },\n \"recebedor\": {\n \"cpfCnpj\": \"11144477735\",\n \"ispb\": \"12345678\",\n \"nrConta\": \"1234567\",\n \"nrAgencia\": \"0001\",\n \"tpConta\": 0,\n \"tpPessoa\": 0\n }\n }\n ],\n \"tpCanal\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Chave-Idempotencia", "<chave-idempotencia>")
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))
}const options = {
method: 'POST',
headers: {
'Chave-Idempotencia': '<chave-idempotencia>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
creditos: [
{
creditoOrdemPagamento: {
endToEndId: 'E0435879820200123221500000000002',
idConciliacaoRecebedor: 'REC00000000000000000000000000000001'
},
pagador: {
cpfCnpj: '11144477735',
ispb: '12345678',
nome: 'Jane Doe',
nrConta: '1234567',
nrAgencia: '0001',
tpConta: 0,
tpPessoa: 0
},
recebedor: {
cpfCnpj: '11144477735',
ispb: '12345678',
nrConta: '1234567',
nrAgencia: '0001',
tpConta: 0,
tpPessoa: 0
}
}
],
tpCanal: 1
})
};
fetch('https://api.example.com/v1/webhooks/validates/async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/webhooks/validates/async"
payload = {
"creditos": [
{
"creditoOrdemPagamento": {
"endToEndId": "E0435879820200123221500000000002",
"idConciliacaoRecebedor": "REC00000000000000000000000000000001"
},
"pagador": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nome": "Jane Doe",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
},
"recebedor": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
}
}
],
"tpCanal": 1
}
headers = {
"Chave-Idempotencia": "<chave-idempotencia>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"dtHrAvisoSgct": "2023-08-07T22:10:05.025Z",
"idValidacaoSgct": "58F963C6-7487-4363-9406-A1DE1A8525D1"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Receive an asynchronous account validation
Receives a section 9.3.4 asynchronous validation: up to 500 credits, each a payment order JD holds on the CSM channel until this participant says whether the receiving account may take it. This operation only stores the call and answers 202 with ; each credit is then validated with the section 9.3.1 checks and its result registered on JD through section 8.4.12.
Chave-Idempotencia is the call’s identity: a redelivery under the same key and the same body answers the first 202 again without a second validation, and the same key with a different body is 409. A body the edge rejects is 400; a call that could not be stored is 500 and is safe to redeliver.
curl --request POST \
--url https://api.example.com/v1/webhooks/validates/async \
--header 'Authorization: Bearer <token>' \
--header 'Chave-Idempotencia: <chave-idempotencia>' \
--header 'Content-Type: application/json' \
--data '
{
"creditos": [
{
"creditoOrdemPagamento": {
"endToEndId": "E0435879820200123221500000000002",
"idConciliacaoRecebedor": "REC00000000000000000000000000000001"
},
"pagador": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nome": "Jane Doe",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
},
"recebedor": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
}
}
],
"tpCanal": 1
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/validates/async"
payload := strings.NewReader("{\n \"creditos\": [\n {\n \"creditoOrdemPagamento\": {\n \"endToEndId\": \"E0435879820200123221500000000002\",\n \"idConciliacaoRecebedor\": \"REC00000000000000000000000000000001\"\n },\n \"pagador\": {\n \"cpfCnpj\": \"11144477735\",\n \"ispb\": \"12345678\",\n \"nome\": \"Jane Doe\",\n \"nrConta\": \"1234567\",\n \"nrAgencia\": \"0001\",\n \"tpConta\": 0,\n \"tpPessoa\": 0\n },\n \"recebedor\": {\n \"cpfCnpj\": \"11144477735\",\n \"ispb\": \"12345678\",\n \"nrConta\": \"1234567\",\n \"nrAgencia\": \"0001\",\n \"tpConta\": 0,\n \"tpPessoa\": 0\n }\n }\n ],\n \"tpCanal\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Chave-Idempotencia", "<chave-idempotencia>")
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))
}const options = {
method: 'POST',
headers: {
'Chave-Idempotencia': '<chave-idempotencia>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
creditos: [
{
creditoOrdemPagamento: {
endToEndId: 'E0435879820200123221500000000002',
idConciliacaoRecebedor: 'REC00000000000000000000000000000001'
},
pagador: {
cpfCnpj: '11144477735',
ispb: '12345678',
nome: 'Jane Doe',
nrConta: '1234567',
nrAgencia: '0001',
tpConta: 0,
tpPessoa: 0
},
recebedor: {
cpfCnpj: '11144477735',
ispb: '12345678',
nrConta: '1234567',
nrAgencia: '0001',
tpConta: 0,
tpPessoa: 0
}
}
],
tpCanal: 1
})
};
fetch('https://api.example.com/v1/webhooks/validates/async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/webhooks/validates/async"
payload = {
"creditos": [
{
"creditoOrdemPagamento": {
"endToEndId": "E0435879820200123221500000000002",
"idConciliacaoRecebedor": "REC00000000000000000000000000000001"
},
"pagador": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nome": "Jane Doe",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
},
"recebedor": {
"cpfCnpj": "11144477735",
"ispb": "12345678",
"nrConta": "1234567",
"nrAgencia": "0001",
"tpConta": 0,
"tpPessoa": 0
}
}
],
"tpCanal": 1
}
headers = {
"Chave-Idempotencia": "<chave-idempotencia>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"dtHrAvisoSgct": "2023-08-07T22:10:05.025Z",
"idValidacaoSgct": "58F963C6-7487-4363-9406-A1DE1A8525D1"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
Idempotency key of the call (section 6).
36"69F963C6-7487-4363-9406-A1DE2A9636D4"
Corpo
Resposta
Accepted
Esta página foi útil?

