Transactions
Transactions - Read
Consulta uma transação pelo ID (`tra_*`) para status, valores, splits e histórico de eventos.
Consulta uma transação pelo ID (tra_*) para status, valores, splits e histórico de eventos.
Authorization
SelectKeyAuth selectkey<token>
API key for all authenticated requests. Send your key in the selectkey header (e.g. sandbox sl_test_…, production sl_live_…).
In: header
Path Parameters
transactionId*string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/transactions/tra_01hqzvabc"{
"id": "tra_01hqzvabc",
"customId": "PEDIDO-1042",
"amount": 5000,
"originalAmount": 5500,
"status": "approved",
"method": "credit",
"currency": "BRL",
"payment": {
"provider": "selectwin",
"version": "1.1",
"refused": null,
"reusable": false,
"billetUrl": null,
"billetBarcode": null,
"billetSequence": null,
"billetDocumentNumber": null,
"billetReferenceNumber": null,
"pixQrCodeEmv": null,
"pixQrCodeUrl": null,
"pixQrCodeImage": null,
"acquirerTransactionNumber": "A1B2C3D4E5",
"cardFirstDigits": "411111",
"cardLastDigits": "1111",
"cardBrand": "visa",
"cardRegistered": false,
"installments": 1,
"expirationDate": null,
"paidAt": "2026-04-12T17:56:33.000Z",
"allowRenewPayment": false,
"invoiceLink": "https://selectwin.io/invoices/tra_01hqzvabc"
},
"discount": {
"value": 500,
"type": "flat",
"percentageOfAmount": null
},
"customer": {
"id": "cus_01hqzvabc",
"firstName": "João",
"lastName": "Silva",
"email": "[email protected]",
"birthdate": "1990-01-15",
"gender": "male",
"document": {
"type": "cpf",
"number": "12345678901"
},
"telephone": {
"countryCode": "55",
"areaCode": "11",
"number": "999999999",
"line": "5511999999999"
},
"available": true,
"delinquent": false,
"externalReference": "CRM-USER-001",
"additionalEmails": null,
"metadata": {},
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-10T09:15:25.000Z"
},
"billing": {
"address": {
"id": "addr_01hqzvabc",
"ownerId": "cus_01hqzvabc",
"ownerType": "customer",
"street": "Av. Paulista",
"number": "1000",
"complement": "Apt 42",
"district": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"postcode": "01310-100",
"country": "BR",
"latitude": -23.5613,
"longitude": -46.6558,
"line": "Av. Paulista, 1000 - Apt 42 - Bela Vista, São Paulo - SP, 01310-100",
"line1": "Av. Paulista, 1000",
"line2": "Apt 42",
"line3": "Bela Vista",
"updatedAt": "2026-04-10T09:15:25.000Z",
"createdAt": "2026-04-10T09:15:25.000Z"
}
},
"shipping": null,
"externalReference": "order-9981",
"shippable": false,
"spplited": true,
"items": [
{
"id": "item_01hqzvabc",
"name": "Premium Plan",
"unitPrice": 5000,
"quantity": 1,
"currency": "BRL",
"description": "Assinatura mensal",
"images": [
"https://cdn.example.com/product.png"
],
"isUpsell": false,
"isOrderbump": false,
"metadata": {
"sku": "SKU-1"
},
"variantId": "var_01hqzvabc",
"externalReference": "line-1",
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:32.000Z"
}
],
"receivables": [
{
"id": "rec_01hqzvabc",
"recipient": "bus_1234567890",
"split": null,
"status": "paid",
"amount": 4805,
"grossAmount": 5000,
"anticipationFee": 0,
"installmentNumber": 1,
"description": null,
"currency": "BRL",
"authorizationCode": "654321",
"paidAt": "2026-04-12T17:56:33.000Z",
"refundedAt": null,
"canceledAt": null,
"expectedOn": "2026-05-12",
"liable": true,
"chargeProcessingFee": true,
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:33.000Z"
}
],
"splits": [
{
"id": "split_01hqzvabc",
"recipient": "bus_9876543210",
"receivable": "rec_02hqzvabc",
"amount": 500,
"grossAmount": 500,
"percentage": 10,
"description": "Affiliate commission",
"chargeProcessingFee": false,
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:33.000Z"
}
],
"refunds": null,
"disputes": null,
"timeline": [
{
"id": "tml_02hqzvabc",
"message": "Transaction approved",
"details": null,
"type": "status",
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:33.000Z"
},
{
"id": "tml_01hqzvabc",
"message": "Transaction created",
"details": null,
"type": "status",
"updatedAt": "2026-04-12T17:56:32.000Z",
"createdAt": "2026-04-12T17:56:32.000Z"
}
],
"callback": {
"webhookUrl": "https://api.example.com/webhooks/transaction",
"active": true
},
"metadata": {
"orderId": "9981"
},
"updatedAt": "2026-04-12T17:56:33.000Z",
"createdAt": "2026-04-12T17:56:32.000Z",
"merchant": {
"name": "Seller Name",
"merchantId": "bus_1234567890",
"isSubAccount": false
},
"_links": {
"self": {
"href": "https://api.selectwin.io/v1/transactions/tra_01hqzvabc",
"method": "GET",
"description": "Read a transaction."
},
"create": {
"href": "https://api.selectwin.io/v1/transactions",
"method": "POST",
"description": "Create a new transaction."
},
"dispute": {
"href": "https://api.selectwin.io/v1/transactions/tra_01hqzvabc",
"method": "PUT",
"description": "Dispute the transaction."
},
"refund": {
"href": "https://api.selectwin.io/v1/transactions/tra_01hqzvabc/refund",
"method": "POST",
"description": "Refund the transaction."
},
"list": {
"href": "https://api.selectwin.io/v1/transactions",
"method": "GET",
"description": "List all transactions."
}
}
}{
"error": {
"status": "Bad Request",
"statusCode": 400,
"category": "validation",
"message": "Validation errors occurred",
"details": "One or more parameters are invalid or out of range. Please check the parameters and try again.",
"params": [
{
"payment[currency]": "currency must be one of [BRL]"
},
{
"amount": "amount is required"
}
],
"code": "invalidParameters",
"resource": "client"
}
}{
"error": {
"status": "Unauthorized",
"statusCode": 401,
"category": "authentication",
"message": "Unauthorized",
"details": "Authentication failed. The provided API key is invalid or does not have permission to operate.",
"code": "unauthorized"
}
}{
"error": {
"status": "Forbidden",
"statusCode": 403,
"category": "authorization",
"message": "Forbidden",
"details": "Access denied. This may be due to IP blocks, domain restrictions, or insufficient permissions.",
"code": "forbidden"
}
}{
"error": {
"status": "Not Found",
"statusCode": 404,
"category": "client",
"message": "Not Found",
"details": "The requested resource was not found on the server.",
"code": "notFound"
}
}{
"error": {
"status": "Unprocessable Entity",
"statusCode": 422,
"category": "validation",
"message": "Unprocessable Entity",
"details": "The request was understood, but contains invalid data that could not be processed.",
"code": "unprocessableEntity"
}
}{
"error": {
"status": "Too Many Requests",
"statusCode": 429,
"category": "rate_limit",
"message": "Too Many Requests",
"details": "The number of requests exceeded the limit allowed for the IP or user.",
"retryAfterMinutes": 60,
"code": "tooManyRequests"
}
}{
"error": {
"status": "Internal Server Error",
"statusCode": 500,
"category": "server",
"message": "Server error.",
"details": "An internal server error occurred. Please try again later.",
"code": "serverError",
"resource": "server"
}
}