Efetivar pagamento (Ambiente de teste)
curl --request POST \
--url https://api.alphagateway.com.br/v1/pix-in/pay-homologation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"idempotency": "pedido-1001",
"payer": {
"fullname": "Maria Oliveira Santos",
"document": "12345678909"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency: 'pedido-1001',
payer: {fullname: 'Maria Oliveira Santos', document: '12345678909'}
})
};
fetch('https://api.alphagateway.com.br/v1/pix-in/pay-homologation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.alphagateway.com.br/v1/pix-in/pay-homologation"
payload = {
"idempotency": "pedido-1001",
"payer": {
"fullname": "Maria Oliveira Santos",
"document": "12345678909"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alphagateway.com.br/v1/pix-in/pay-homologation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency' => 'pedido-1001',
'payer' => [
'fullname' => 'Maria Oliveira Santos',
'document' => '12345678909'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Pagamento efetivado com sucesso!",
"response": null
}{
"response": null,
"errors": [
"O valor da transação deve ser maior ou igual a R$1,00"
]
}{
"response": null,
"errors": [
"API key inválida ou expirada"
]
}{
"response": null,
"errors": [
"Credencial não possui permissão para esta funcionalidade, ajuste o escopo da credencial."
]
}{
"response": null,
"errors": [
"Limite de requisições excedido"
]
}{
"response": null,
"errors": [
"Erro interno"
]
}{
"response": null,
"errors": [
"Este serviço está temporariamente indisponível devido a manutenção"
]
}Cobranças PIX
Efetivar pagamento (Ambiente de teste)
Efetiva um pagamento manualmente para testes. Disponível apenas no ambiente de homologação.
POST
/
v1
/
pix-in
/
pay-homologation
Efetivar pagamento (Ambiente de teste)
curl --request POST \
--url https://api.alphagateway.com.br/v1/pix-in/pay-homologation \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"idempotency": "pedido-1001",
"payer": {
"fullname": "Maria Oliveira Santos",
"document": "12345678909"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency: 'pedido-1001',
payer: {fullname: 'Maria Oliveira Santos', document: '12345678909'}
})
};
fetch('https://api.alphagateway.com.br/v1/pix-in/pay-homologation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.alphagateway.com.br/v1/pix-in/pay-homologation"
payload = {
"idempotency": "pedido-1001",
"payer": {
"fullname": "Maria Oliveira Santos",
"document": "12345678909"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alphagateway.com.br/v1/pix-in/pay-homologation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency' => 'pedido-1001',
'payer' => [
'fullname' => 'Maria Oliveira Santos',
'document' => '12345678909'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Pagamento efetivado com sucesso!",
"response": null
}{
"response": null,
"errors": [
"O valor da transação deve ser maior ou igual a R$1,00"
]
}{
"response": null,
"errors": [
"API key inválida ou expirada"
]
}{
"response": null,
"errors": [
"Credencial não possui permissão para esta funcionalidade, ajuste o escopo da credencial."
]
}{
"response": null,
"errors": [
"Limite de requisições excedido"
]
}{
"response": null,
"errors": [
"Erro interno"
]
}{
"response": null,
"errors": [
"Este serviço está temporariamente indisponível devido a manutenção"
]
}Autorizações
API Key da organização
Corpo
application/json