StafeBank Gateway
  1. Transactions
StafeBank Gateway
  • Overview
  • Webhooks
  • Error codes
  • Ambiente de Testes
  • Transactions
    • Criar uma Transação
      POST
    • Criar uma Transação Com 3DS
      POST
    • Criar uma Transação PIX
      POST
    • Estornar uma transação
      POST
    • Capturando uma Transação
      POST
    • Buscar Transação
      GET
    • Listar Transações
      GET
    • Retornar Histórico de uma Transação
      GET
    • Retornar Parcelas de uma transação
      GET
  • Payment Links
    • Criar Link
      POST
    • Atualizar Link
      PUT
    • Buscar Link
      GET
    • Listar Links
      GET
    • Transações de um link
      GET
  • Customer
    • Criar Cliente
      POST
    • Encontrar Cliente
      POST
    • Cartões do Cliente
      POST
    • Atualizar Cliente
      PUT
    • Buscar Cliente
      GET
    • Listar Clientes
      GET
    • Deletar um cliente
      DELETE
  • Cards
    • Criar Cartão
      POST
    • Obter Bandeira
      POST
    • Buscar Cartão
      GET
    • Listar Cartões
      GET
  • Webhook
    • Criar um webhook
    • Atualizar Webhook
    • Retornar Webhooks Cadastrados
    • Retornar um Webhook
    • Remover um Webhook
  • Simulate
    • Tax
  • Recurrence
    • Plans
      • Create Plan
      • Update Plan
      • Get a Plan
      • List Plans
    • Subscription
      • Create Subscription
      • Cancel Subscription
      • GET Subscription
  1. Transactions

Criar uma Transação Com 3DS

Amb. de prod.
https://onapi.stafebank.com.br
Amb. de prod.
https://onapi.stafebank.com.br
POST
/v1/transactions

3DS 2.0 - Autenticação Segura de Transações#

Nossa plataforma oferece a tecnologia 3DS 2.0 integrada, proporcionando maior segurança nas transações de crédito online. Para utilizar este recurso, inclua o objeto "ThreeDSecure" no corpo da requisição de autorização da transação.
Com o 3DS 2.0, as transações de crédito são autenticadas de forma segura, seguindo o fluxo abaixo:
1.
O portador do cartão insere os dados do cartão.
2.
O estabelecimento solicita a autenticação.
3.
A plataforma solicita a autenticação 3DS 2.0 à bandeira do cartão.
4.
A bandeira realiza a análise de risco.
5.
A bandeira retorna a URL de autenticação para a plataforma.
6.
A plataforma retorna a URL de autenticação para o estabelecimento.
7.
O estabelecimento apresenta a URL de autenticação ao portador.
8.
O portador visualiza a tela de autenticação.
9.
O portador realiza a autenticação (desafio).

Requisição

Parâmetros Bodyapplication/json

Exemplo
{
    "amount": 1500,
    "async": false,
    "capture": false,
    "installments": 1,
    "descriptor": "testpostman",
    "payment_method": "credit_card",
    "card": {
        "card_number": "5502091556851234",
        "card_holder_name": "Luke Skywalker",
        "card_expiration_date": "0333",
        "card_cvv": "111"
    },
    "threeDSecure": {
        "urlSuccess": "https://webhook.site/3b161386-94f6-448d-a770-89141e5f58c4",
        "urlFail": "https://webhook.site/098a2406-c69e-49ce-875a-5d36404e2c21",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
        "ipAddress": "45.6.35.42",
        "device": {
            "colorDepth": "1",
            "deviceType3ds": "browser",
            "javaEnabled": true,
            "language": "br",
            "screenHeight": 900,
            "screenWidth": 600,
            "timeZoneOffset": -3
        }
    },
    "billing": {
        "name": "Tatooine",
        "address": {
            "country": "br",
            "street": "Rua 12 de Outubro",
            "street_number": "220",
            "zipcode": "16520970",
            "state": "SP",
            "city": "Bacuriti",
            "neighborhood": "Centro"
        }
    },
    "customer": {
        "name": "Luke Skywalker",
        "email": "luke@skywalker.com",
        "type": "individual",
        "country": "BR",
        "external_id": "6564",
        "documents": [
            {
                "type": "CPF",
                "number": "01234567890"
            }
        ],
        "phone_numbers": [
            "+5511916621234"
        ]
    },
    "items": [
        {
            "external_id": "5550134",
            "title": "Sabonete de Luxo",
            "unit_price": 10000,
            "quantity": 1,
            "tangible": true
        },
        {
            "external_id": "5550134",
            "title": "Sabonete de Luxo",
            "unit_price": 10000,
            "quantity": 1,
            "tangible": false
        }
    ]
}

Códigos de solicitação

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://onapi.stafebank.com.br/v1/transactions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 1500,
    "async": false,
    "capture": false,
    "installments": 1,
    "descriptor": "testpostman",
    "payment_method": "credit_card",
    "card": {
        "card_number": "5502091556851234",
        "card_holder_name": "Luke Skywalker",
        "card_expiration_date": "0333",
        "card_cvv": "111"
    },
    "threeDSecure": {
        "urlSuccess": "https://webhook.site/3b161386-94f6-448d-a770-89141e5f58c4",
        "urlFail": "https://webhook.site/098a2406-c69e-49ce-875a-5d36404e2c21",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
        "ipAddress": "45.6.35.42",
        "device": {
            "colorDepth": "1",
            "deviceType3ds": "browser",
            "javaEnabled": true,
            "language": "br",
            "screenHeight": 900,
            "screenWidth": 600,
            "timeZoneOffset": -3
        }
    },
    "billing": {
        "name": "Tatooine",
        "address": {
            "country": "br",
            "street": "Rua 12 de Outubro",
            "street_number": "220",
            "zipcode": "16520970",
            "state": "SP",
            "city": "Bacuriti",
            "neighborhood": "Centro"
        }
    },
    "customer": {
        "name": "Luke Skywalker",
        "email": "luke@skywalker.com",
        "type": "individual",
        "country": "BR",
        "external_id": "6564",
        "documents": [
            {
                "type": "CPF",
                "number": "01234567890"
            }
        ],
        "phone_numbers": [
            "+5511916621234"
        ]
    },
    "items": [
        {
            "external_id": "5550134",
            "title": "Sabonete de Luxo",
            "unit_price": 10000,
            "quantity": 1,
            "tangible": true
        },
        {
            "external_id": "5550134",
            "title": "Sabonete de Luxo",
            "unit_price": 10000,
            "quantity": 1,
            "tangible": false
        }
    ]
}'

Respostas

🟢200Criar uma Transação
application/json
Body

Examples
{
    "id": 23,
    "ip_address": "127.0.0.1",
    "tid": null,
    "amount": 15090,
    "capture_amount": 15090,
    "paid_amount": null,
    "ref_id": "5992873329",
    "status": "processing",
    "created_at": "2022-02-02T18:05:37.000000Z",
    "updated_at": "2022-02-02T18:05:37.000000Z",
    "card": {
        "card_id": 409902444,
        "card_holder_name": "Customer Name",
        "created_at": "2022-02-02T17:47:10.000000Z",
        "updated_at": "2022-02-02T18:05:36.000000Z",
        "card_first_digits": "0000",
        "card_last_digits": "0009",
        "brand": "0"
    },
    "installments": 1,
    "reference_key": null,
    "session": null,
    "local_time": null,
    "payment_method": "credit_card",
    "customer": {
        "id": 4642,
        "external_id": "1234f",
        "name": "James Bond",
        "type": "individual",
        "country": "br",
        "email": "james@bond.com",
        "birthday": null,
        "phone_numbers": [
            "+5511987654321"
        ],
        "created_at": "2022-02-02T18:05:37.000000Z",
        "updated_at": "2022-02-02T18:05:37.000000Z",
        "documents": [
            {
                "id": 4563,
                "type": "cpf",
                "number": "47009616000"
            }
        ]
    },
    "billing": {
        "id": 4418,
        "name": "Nome do pagador",
        "created_at": "2022-02-02T18:05:37.000000Z",
        "updated_at": "2022-02-02T18:05:37.000000Z",
        "address": {
            "street": "Alamenda Rio Negro",
            "street_number": "500",
            "zipcode": "06454000",
            "country": "br",
            "state": "sp",
            "city": "barueri",
            "neighborhood": "Alphaville",
            "complementary": null
        }
    },
    "items": [
        {
            "id": 8912,
            "external_id": "123",
            "title": "Nome do Produto 1",
            "unit_price": 1590,
            "quantity": 1,
            "tangible": 1,
            "category": null,
            "venue": null,
            "date": null,
            "created_at": "2022-02-02T18:05:37.000000Z",
            "updated_at": "2022-02-02T18:05:37.000000Z"
        }
    ],
    "threeDSecure": {
        "url": "https://api.sandbox-userede.com.br/erede/redirect/auth?token=ge%2bWZOLO342fawASD8jasdmjwqe%ndnuqwneqiU32cI609RVSc%3d"
    },
    "metadata": null
}
🟠400Erro integração
Modificado em 2025-06-11 09:50:39
Página anterior
Criar uma Transação
Próxima página
Criar uma Transação PIX
Built with