Atualiza receiver
curl --request PATCH \
--url https://api.astronpay.co/api/v1/receivers/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressStreet": "<string>",
"addressNumber": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressState": "<string>",
"addressZipCode": "<string>"
}
'import requests
url = "https://api.astronpay.co/api/v1/receivers/{id}"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressStreet": "<string>",
"addressNumber": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressState": "<string>",
"addressZipCode": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
addressStreet: '<string>',
addressNumber: '<string>',
addressComplement: '<string>',
addressNeighborhood: '<string>',
addressCity: '<string>',
addressState: '<string>',
addressZipCode: '<string>'
})
};
fetch('https://api.astronpay.co/api/v1/receivers/{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 => "https://api.astronpay.co/api/v1/receivers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'addressStreet' => '<string>',
'addressNumber' => '<string>',
'addressComplement' => '<string>',
'addressNeighborhood' => '<string>',
'addressCity' => '<string>',
'addressState' => '<string>',
'addressZipCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-secret: <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://api.astronpay.co/api/v1/receivers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<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.patch("https://api.astronpay.co/api/v1/receivers/{id}")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronpay.co/api/v1/receivers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João Silva",
"document": "12345678901",
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"phone": "+5511999999999",
"limits": {
"dailyLimitBrl": 50000,
"dailyTransactionLimit": 20,
"nightTransactionsEnabled": false
},
"walletAddress": "4k5d...Solana",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "VALIDATION_ERROR",
"message": "Campo 'amountBrl' é obrigatório",
"details": {},
"requestId": "req_abc123"
}{
"error": "VALIDATION_ERROR",
"message": "Campo 'amountBrl' é obrigatório",
"details": {},
"requestId": "req_abc123"
}Receivers
Atualiza receiver
Atualiza campos não-críticos do receiver. Pelo menos um campo deve ser fornecido. Documento e tipo são imutáveis.
PATCH
/
receivers
/
{id}
Atualiza receiver
curl --request PATCH \
--url https://api.astronpay.co/api/v1/receivers/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressStreet": "<string>",
"addressNumber": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressState": "<string>",
"addressZipCode": "<string>"
}
'import requests
url = "https://api.astronpay.co/api/v1/receivers/{id}"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"addressStreet": "<string>",
"addressNumber": "<string>",
"addressComplement": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressState": "<string>",
"addressZipCode": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
addressStreet: '<string>',
addressNumber: '<string>',
addressComplement: '<string>',
addressNeighborhood: '<string>',
addressCity: '<string>',
addressState: '<string>',
addressZipCode: '<string>'
})
};
fetch('https://api.astronpay.co/api/v1/receivers/{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 => "https://api.astronpay.co/api/v1/receivers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'addressStreet' => '<string>',
'addressNumber' => '<string>',
'addressComplement' => '<string>',
'addressNeighborhood' => '<string>',
'addressCity' => '<string>',
'addressState' => '<string>',
'addressZipCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-api-secret: <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://api.astronpay.co/api/v1/receivers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<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.patch("https://api.astronpay.co/api/v1/receivers/{id}")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronpay.co/api/v1/receivers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"addressStreet\": \"<string>\",\n \"addressNumber\": \"<string>\",\n \"addressComplement\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressZipCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João Silva",
"document": "12345678901",
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"phone": "+5511999999999",
"limits": {
"dailyLimitBrl": 50000,
"dailyTransactionLimit": 20,
"nightTransactionsEnabled": false
},
"walletAddress": "4k5d...Solana",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "VALIDATION_ERROR",
"message": "Campo 'amountBrl' é obrigatório",
"details": {},
"requestId": "req_abc123"
}{
"error": "VALIDATION_ERROR",
"message": "Campo 'amountBrl' é obrigatório",
"details": {},
"requestId": "req_abc123"
}Authorizations
apiKey & apiSecretbearerAuth
Path Parameters
Body
application/json
Required string length:
2 - 255Maximum string length:
20Maximum string length:
2Maximum string length:
10Response
Atualizado
Available options:
PF, PJ Example:
"João Silva"
Example:
"12345678901"
Available options:
CPF, CNPJ Available options:
PENDING, ACTIVE, SUSPENDED, BLOCKED Available options:
PENDING, SUBMITTED, UNDER_REVIEW, APPROVED, REJECTED Example:
"+5511999999999"
Show child attributes
Show child attributes
Example:
"4k5d...Solana"
⌘I
