POST/v2/purchase

Create Transaction

Create a new PIX or Credit Card transaction to receive payments.

Parameters

NameTypeRequiredDescription
namestringRequiredName of the person making the transaction (max 255 characters)
Example:John Doe
emailstringRequiredValid email address of the person making the transaction
Example:johndoe@example.com
cpfstringRequiredCPF (11 digits) or CNPJ (14 digits) of the person
Example:12345678901
phonestringRequiredPhone number (8-12 numeric digits)
Example:9876543210
amountnumberRequiredTransaction amount in cents (1000 = R$ 10.00)
Example:1000
descriptionstringRequiredDescription of the transaction
Example:Payment for services
responsibleDocumentstringRequiredCPF/CNPJ of the person responsible for the transaction
Example:12345678901
responsibleExternalIdstringRequiredExternal ID of the person responsible
Example:1234
paymentMethodstringRequiredPayment method: 'PIX' or 'CREDIT_CARD'
Example:PIX
currencystringOptionalCurrency code: 'BRL' or 'MXN' (default: BRL)
Example:BRL
externalIdstringOptionalOptional external ID for tracking in your system
Example:your-transaction-id
referrerUrlstringOptionalOptional referrer URL
Example:https://referrer.example.com
checkoutUrlstringOptionalOptional checkout URL
Example:https://checkout.example.com
postbackUrlstringOptionalOptional webhook URL to receive transaction updates
Example:https://your-domain.com/webhook
fingerPrintstringOptionalDevice fingerprint (optional for PIX, recommended for CREDIT_CARD)
Example:174859385
creditCardobjectOptionalCredit card details (required when paymentMethod is CREDIT_CARD). Contains: • number (string, required): Credit card number • holder (string, required): Cardholder name • expMonth (string, required): Expiration month (MM) • expYear (string, required): Expiration year (YYYY) • cvv (string, required): CVV security code • installments (number, required): Number of installments (1-12)
Example:{ "number": "4111411141114111", "holder": "John Doe", "expMonth": "04", "expYear": "2024", "cvv": "324", "installments": 1 }
splitobjectOptionalSplit configuration for transaction (optional) - Split payments between multiple recipients. Contains: • businessId (string, required): Business ID of the split recipient • typeSplit (string, required): Type of split - 'percentage' or 'fixed' • amount (number, required): Value of the split (percentage 0-100 or fixed amount in cents)
Example:{ "businessId": "6e408bac-1ef8-4076-9488-b38f11de6979", "typeSplit": "percentage", "amount": 5 }

Request Body

Content-Type:application/json
json
{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "cpf": "12345678901",
  "phone": "9876543210",
  "amount": 1000,
  "description": "Payment for services",
  "responsibleDocument": "12345678901",
  "responsibleExternalId": "1234",
  "externalId": "your-transaction-id",
  "postbackUrl": "https://your-domain.com/webhook",
  "paymentMethod": "PIX",
  "currency": "BRL"
}

// Example with Credit Card:
{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "cpf": "12345678901",
  "phone": "9876543210",
  "amount": 1000,
  "description": "Payment for services",
  "responsibleDocument": "12345678901",
  "responsibleExternalId": "1234",
  "externalId": "your-transaction-id",
  "postbackUrl": "https://your-domain.com/webhook",
  "paymentMethod": "CREDIT_CARD",
  "currency": "BRL",
  "fingerPrint": "174859385",
  "creditCard": {
    "number": "4111411141114111",
    "holder": "John Doe",
    "expMonth": "04",
    "expYear": "2024",
    "cvv": "324",
    "installments": 1
  }
}

// Example with Split:
{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "cpf": "12345678901",
  "phone": "9876543210",
  "amount": 1000,
  "description": "Payment for services",
  "responsibleDocument": "12345678901",
  "responsibleExternalId": "1234",
  "externalId": "your-transaction-id",
  "postbackUrl": "https://your-domain.com/webhook",
  "paymentMethod": "PIX",
  "currency": "BRL",
  "split": {
    "businessId": "6e408bac-1ef8-4076-9488-b38f11de6979",
    "typeSplit": "percentage",
    "amount": 5
  }
}

Responses

Code Examples

curl
curl -X POST "https://api.axisbanking.com.br/v2/purchase" \
  -H "Authorization: Basic {INSERT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "johndoe@example.com",
    "cpf": "12345678901",
    "phone": "9876543210",
    "amount": 1000,
    "description": "Payment for services",
    "responsibleDocument": "12345678901",
    "responsibleExternalId": "1234",
    "externalId": "your-transaction-id",
    "postbackUrl": "https://your-domain.com/webhook",
    "paymentMethod": "PIX",
    "currency": "BRL"
  }'