Submeter recibo de pagamento on-chain
curl --request POST \
--url https://api-bc.pgubright.com/transactions/receipts \
--header 'Content-Type: application/json' \
--data '
{
"payment_id": "<string>",
"tx_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({payment_id: '<string>', tx_hash: '<string>'})
};
fetch('https://api-bc.pgubright.com/transactions/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-bc.pgubright.com/transactions/receipts"
payload = {
"payment_id": "<string>",
"tx_hash": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"payment_id": "<string>",
"match_id": "<string>",
"tx_hash": "<string>",
"status": "CONFIRMED"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}Transações
Submeter recibo de pagamento on-chain
POST
/
transactions
/
receipts
Submeter recibo de pagamento on-chain
curl --request POST \
--url https://api-bc.pgubright.com/transactions/receipts \
--header 'Content-Type: application/json' \
--data '
{
"payment_id": "<string>",
"tx_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({payment_id: '<string>', tx_hash: '<string>'})
};
fetch('https://api-bc.pgubright.com/transactions/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-bc.pgubright.com/transactions/receipts"
payload = {
"payment_id": "<string>",
"tx_hash": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"payment_id": "<string>",
"match_id": "<string>",
"tx_hash": "<string>",
"status": "CONFIRMED"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}{
"message": "Usuário sem permissão para operar neste sensor.",
"code": "SENSOR_FORBIDDEN"
}