POST
/v2/purchaseCreate Transaction
Create a new PIX or Credit Card transaction to receive payments.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Name of the person making the transaction (max 255 characters) Example: John Doe |
email | string | Required | Valid email address of the person making the transaction Example: johndoe@example.com |
cpf | string | Required | CPF (11 digits) or CNPJ (14 digits) of the person Example: 12345678901 |
phone | string | Required | Phone number (8-12 numeric digits) Example: 9876543210 |
amount | number | Required | Transaction amount in cents (1000 = R$ 10.00) Example: 1000 |
description | string | Required | Description of the transaction Example: Payment for services |
responsibleDocument | string | Required | CPF/CNPJ of the person responsible for the transaction Example: 12345678901 |
responsibleExternalId | string | Required | External ID of the person responsible Example: 1234 |
paymentMethod | string | Required | Payment method: 'PIX' or 'CREDIT_CARD' Example: PIX |
currency | string | Optional | Currency code: 'BRL' or 'MXN' (default: BRL) Example: BRL |
externalId | string | Optional | Optional external ID for tracking in your system Example: your-transaction-id |
referrerUrl | string | Optional | Optional referrer URL Example: https://referrer.example.com |
checkoutUrl | string | Optional | Optional checkout URL Example: https://checkout.example.com |
postbackUrl | string | Optional | Optional webhook URL to receive transaction updates Example: https://your-domain.com/webhook |
fingerPrint | string | Optional | Device fingerprint (optional for PIX, recommended for CREDIT_CARD) Example: 174859385 |
creditCard | object | Optional | Credit 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
} |
split | object | Optional | Split 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/jsonjson
{
"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"
}'