Gerar cobranca
curl --request POST \
--url https://api.axnpay.com.br/v1/integrations/create-transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150,
"currency": "brl",
"productName": "Pedido #1001",
"description": "Plano Premium",
"clientName": "Maria",
"clientEmail": "maria@example.com",
"referenceId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"checkoutUiMode": "hosted",
"paymentMethodTypes": [
"card",
"link"
],
"successUrl": "https://merchant.example.com/checkout/success",
"cancelUrl": "https://merchant.example.com/checkout/cancel",
"tracking_parameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
}
}
'import requests
url = "https://api.axnpay.com.br/v1/integrations/create-transaction"
payload = {
"amount": 150,
"currency": "brl",
"productName": "Pedido #1001",
"description": "Plano Premium",
"clientName": "Maria",
"clientEmail": "maria@example.com",
"referenceId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"checkoutUiMode": "hosted",
"paymentMethodTypes": ["card", "link"],
"successUrl": "https://merchant.example.com/checkout/success",
"cancelUrl": "https://merchant.example.com/checkout/cancel",
"tracking_parameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 150,
currency: 'brl',
productName: 'Pedido #1001',
description: 'Plano Premium',
clientName: 'Maria',
clientEmail: 'maria@example.com',
referenceId: '9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6',
checkoutUiMode: 'hosted',
paymentMethodTypes: ['card', 'link'],
successUrl: 'https://merchant.example.com/checkout/success',
cancelUrl: 'https://merchant.example.com/checkout/cancel',
tracking_parameters: {utm_source: 'google', utm_medium: 'cpc', utm_campaign: 'launch'}
})
};
fetch('https://api.axnpay.com.br/v1/integrations/create-transaction', 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.axnpay.com.br/v1/integrations/create-transaction",
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([
'amount' => 150,
'currency' => 'brl',
'productName' => 'Pedido #1001',
'description' => 'Plano Premium',
'clientName' => 'Maria',
'clientEmail' => 'maria@example.com',
'referenceId' => '9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6',
'checkoutUiMode' => 'hosted',
'paymentMethodTypes' => [
'card',
'link'
],
'successUrl' => 'https://merchant.example.com/checkout/success',
'cancelUrl' => 'https://merchant.example.com/checkout/cancel',
'tracking_parameters' => [
'utm_source' => 'google',
'utm_medium' => 'cpc',
'utm_campaign' => 'launch'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.axnpay.com.br/v1/integrations/create-transaction"
payload := strings.NewReader("{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.axnpay.com.br/v1/integrations/create-transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axnpay.com.br/v1/integrations/create-transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"status": "PENDING",
"type": "CASHIN",
"source": "CREDIT_CARD",
"origin": "API",
"amount": 150,
"feeAmount": 0,
"finalAmount": 150,
"description": "Plano Premium",
"productName": "Pedido #1001",
"trackingParameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
},
"pixCode": null,
"pixKeyType": null,
"pixKey": null,
"clientName": "Maria",
"clientEmail": "maria@example.com",
"clientPhone": null,
"clientCpf": null,
"externalId": "checkout_sess_abc123",
"gatewayId": null,
"endToEndId": null,
"receiptUrl": null,
"transactionDate": "2026-05-02T18:46:16.748Z",
"paidAt": null,
"createdAt": "2026-05-02T18:46:16.748Z",
"updatedAt": "2026-05-02T18:46:16.748Z",
"balanceImpact": true,
"settlementMode": "internal",
"checkout": {
"sessionId": "checkout_sess_abc123",
"uiMode": "hosted",
"url": "https://checkout.axnpay.com/session/checkout_sess_abc123",
"clientSecret": null,
"publishableKey": null,
"accountDisplayName": "AXON SERVICOS FINANCEIROS LTDA",
"paymentMethodConfigurationId": null,
"requestedPaymentMethodTypes": [
"card",
"link"
],
"livemode": true,
"paymentStatus": "unpaid",
"status": "open",
"expiresAt": null,
"webhookConfigured": true,
"settlementMode": "internal",
"balanceImpact": true
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}Transacoes
Gerar cobranca
POST
/
v1
/
integrations
/
create-transaction
Gerar cobranca
curl --request POST \
--url https://api.axnpay.com.br/v1/integrations/create-transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150,
"currency": "brl",
"productName": "Pedido #1001",
"description": "Plano Premium",
"clientName": "Maria",
"clientEmail": "maria@example.com",
"referenceId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"checkoutUiMode": "hosted",
"paymentMethodTypes": [
"card",
"link"
],
"successUrl": "https://merchant.example.com/checkout/success",
"cancelUrl": "https://merchant.example.com/checkout/cancel",
"tracking_parameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
}
}
'import requests
url = "https://api.axnpay.com.br/v1/integrations/create-transaction"
payload = {
"amount": 150,
"currency": "brl",
"productName": "Pedido #1001",
"description": "Plano Premium",
"clientName": "Maria",
"clientEmail": "maria@example.com",
"referenceId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"checkoutUiMode": "hosted",
"paymentMethodTypes": ["card", "link"],
"successUrl": "https://merchant.example.com/checkout/success",
"cancelUrl": "https://merchant.example.com/checkout/cancel",
"tracking_parameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 150,
currency: 'brl',
productName: 'Pedido #1001',
description: 'Plano Premium',
clientName: 'Maria',
clientEmail: 'maria@example.com',
referenceId: '9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6',
checkoutUiMode: 'hosted',
paymentMethodTypes: ['card', 'link'],
successUrl: 'https://merchant.example.com/checkout/success',
cancelUrl: 'https://merchant.example.com/checkout/cancel',
tracking_parameters: {utm_source: 'google', utm_medium: 'cpc', utm_campaign: 'launch'}
})
};
fetch('https://api.axnpay.com.br/v1/integrations/create-transaction', 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.axnpay.com.br/v1/integrations/create-transaction",
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([
'amount' => 150,
'currency' => 'brl',
'productName' => 'Pedido #1001',
'description' => 'Plano Premium',
'clientName' => 'Maria',
'clientEmail' => 'maria@example.com',
'referenceId' => '9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6',
'checkoutUiMode' => 'hosted',
'paymentMethodTypes' => [
'card',
'link'
],
'successUrl' => 'https://merchant.example.com/checkout/success',
'cancelUrl' => 'https://merchant.example.com/checkout/cancel',
'tracking_parameters' => [
'utm_source' => 'google',
'utm_medium' => 'cpc',
'utm_campaign' => 'launch'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.axnpay.com.br/v1/integrations/create-transaction"
payload := strings.NewReader("{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.axnpay.com.br/v1/integrations/create-transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axnpay.com.br/v1/integrations/create-transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 150,\n \"currency\": \"brl\",\n \"productName\": \"Pedido #1001\",\n \"description\": \"Plano Premium\",\n \"clientName\": \"Maria\",\n \"clientEmail\": \"maria@example.com\",\n \"referenceId\": \"9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6\",\n \"checkoutUiMode\": \"hosted\",\n \"paymentMethodTypes\": [\n \"card\",\n \"link\"\n ],\n \"successUrl\": \"https://merchant.example.com/checkout/success\",\n \"cancelUrl\": \"https://merchant.example.com/checkout/cancel\",\n \"tracking_parameters\": {\n \"utm_source\": \"google\",\n \"utm_medium\": \"cpc\",\n \"utm_campaign\": \"launch\"\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "9e4a5fb4-61bb-4b38-9bb6-b7029b74bdf6",
"status": "PENDING",
"type": "CASHIN",
"source": "CREDIT_CARD",
"origin": "API",
"amount": 150,
"feeAmount": 0,
"finalAmount": 150,
"description": "Plano Premium",
"productName": "Pedido #1001",
"trackingParameters": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "launch"
},
"pixCode": null,
"pixKeyType": null,
"pixKey": null,
"clientName": "Maria",
"clientEmail": "maria@example.com",
"clientPhone": null,
"clientCpf": null,
"externalId": "checkout_sess_abc123",
"gatewayId": null,
"endToEndId": null,
"receiptUrl": null,
"transactionDate": "2026-05-02T18:46:16.748Z",
"paidAt": null,
"createdAt": "2026-05-02T18:46:16.748Z",
"updatedAt": "2026-05-02T18:46:16.748Z",
"balanceImpact": true,
"settlementMode": "internal",
"checkout": {
"sessionId": "checkout_sess_abc123",
"uiMode": "hosted",
"url": "https://checkout.axnpay.com/session/checkout_sess_abc123",
"clientSecret": null,
"publishableKey": null,
"accountDisplayName": "AXON SERVICOS FINANCEIROS LTDA",
"paymentMethodConfigurationId": null,
"requestedPaymentMethodTypes": [
"card",
"link"
],
"livemode": true,
"paymentStatus": "unpaid",
"status": "open",
"expiresAt": null,
"webhookConfigured": true,
"settlementMode": "internal",
"balanceImpact": true
}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>",
"detail": {}
}Cria uma cobranca de entrada e retorna o
transactionId publico.
Para PIX, a resposta inclui
pixCode.
Para cartao, a resposta inclui checkout.
Se quiser atribuicao de campanha, envie tracking_parameters com seus UTMs.Se voce estiver implementando checkout de cartao, veja tambem a pagina Cartao.
Authorizations
Use sua secret key: Bearer sk_live_prod_...
Body
application/json
Valor bruto da cobranca.
Required range:
0.01 <= x <= 1000000Descricao livre da cobranca.
Nome do produto ou servico.
Nome do pagador.
Email do pagador.
Telefone do pagador.
Documento do pagador.
Show child attributes
Show child attributes
Chave de idempotencia do merchant.
Exemplo: credit_card, visa, master, bolbradesco.
Usado quando o checkout web de cartao ativo suportar selecao de metodos no frontend. Exemplo: ["card"], ["card","link"], ["paypal"].
Token de cartao usado em fluxos Mercado Pago.
Required range:
1 <= x <= 12Moeda ISO-4217. Default: brl. A disponibilidade dos metodos depende do checkout ativo na conta.
Available options:
CPF, CNPJ, EMAIL, PHONE, EVP Available options:
hosted, embedded, custom Response
Cobranca criada
Available options:
PENDING, PROCESSING, COMPLETED, FAILED, REVERSED, CANCELLED, CHARGEBACK Available options:
CASHIN, CASHOUT, INFRACTION Available options:
API, PAINEL, APP Show child attributes
Show child attributes
Available options:
CPF, CNPJ, EMAIL, PHONE, EVP Show child attributes
Show child attributes
⌘I
