Skip to main content

Your First Charge in 5 Minutes

Quick Reference

WhatMake your first credit card charge on A55 sandbox
WhyValidate your integration setup end-to-end before writing production code
Reading Time5 min
DifficultyBeginner
PrerequisitesSandbox credentials (client_id + client_secret)

Overview

This guide walks you through the complete flow: authenticate, create a wallet, charge a credit card, and check the result. Every command runs against the sandbox — no real money moves.

Test Cards

Card NumberBrandScenarioExpected Status
4111 1111 1111 1111VisaSuccessful paymentconfirmed
4000 0000 0000 0002VisaCard declineddeclined
4000 0000 0000 0069VisaProcessing errorerror

Steps

1

Get your sandbox credentials

Email tech.services@a55.tech to request sandbox access. You will receive:

CredentialDescription
client_idOAuth2 client identifier
client_secretOAuth2 client secret
entity_uuidYour entity identifier
merchant_uuidYour merchant identifier

Store them as environment variables:

export A55_CLIENT_ID="your_client_id"
export A55_CLIENT_SECRET="your_client_secret"
2

Get an access token

A55 uses OAuth2 client_credentials grant. Exchange your credentials for a bearer token.

curl -s -X POST "https://auth.sandbox.a55.tech/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=${A55_CLIENT_ID}" \
-d "client_secret=${A55_CLIENT_SECRET}" \
-d "scope=api/readwrite" | python3 -m json.tool

Save the token:

export A55_ACCESS_TOKEN="eyJhbGciOiJSUzI1NiIs..."
3

Create a wallet

A wallet groups charges under a single entity. You need one before creating charges.

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/" \
-H "Authorization: Bearer ${A55_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "My First Wallet"
}' | python3 -m json.tool

Response:

{
"uuid": "wal_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "My First Wallet",
"status": "active",
"created_at": "2026-03-21T12:00:00Z"
}
4

Create a credit card charge

Send a POST to the charge endpoint with test card 4111 1111 1111 1111.

curl -s -X POST "https://sandbox.api.a55.tech/api/v1/bank/wallet/charge/" \
-H "Authorization: Bearer ${A55_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"amount": "100.00",
"currency": "BRL",
"type_charge": "credit_card",
"card": {
"number": "4111111111111111",
"holder_name": "TEST CARDHOLDER",
"expiration_month": "12",
"expiration_year": "2030",
"cvv": "123"
},
"payer": {
"name": "Test User",
"email": "test@example.com",
"document": "12345678909",
"document_type": "CPF"
},
"description": "Quickstart test charge"
}' | python3 -m json.tool

Response:

{
"uuid": "chg_f1e2d3c4-b5a6-7890-fedc-ba0987654321",
"status": "confirmed",
"amount": "100.00",
"currency": "BRL",
"type_charge": "credit_card",
"created_at": "2026-03-21T12:01:00Z"
}
5

Check charge status

Retrieve the charge to confirm its final status.

CHARGE_UUID="chg_f1e2d3c4-b5a6-7890-fedc-ba0987654321"

curl -s -X GET "https://sandbox.api.a55.tech/api/v1/bank/wallet/charge/?charge_uuid=${CHARGE_UUID}" \
-H "Authorization: Bearer ${A55_ACCESS_TOKEN}" | python3 -m json.tool
What happens when you create a charge
  1. A55 receives your charge request and validates all fields
  2. The request is routed to the best available acquirer based on card BIN, currency, and merchant configuration
  3. The acquirer processes the authorization with the card network (Visa/Mastercard)
  4. A55 returns the authorization result synchronously
  5. If you configured a webhook_url, A55 sends an asynchronous notification with the final status

Next Steps