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 PIX

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

Requisição

Parâmetros Bodyapplication/json

Exemplo
{
    "amount": 2000,
    "payment_method":"pix",
    "billing":{
      "name":"LUCILUCI DOS SANTOS",
      "address":{
         "country":"br",
         "street":"Rua Jesuíno Anastácio Pereira",
         "street_number":"665",
         "state":"SC",
         "city":"CAMBORIÚ",
         "neighborhood":"Santa Regina"
      }
    },
    "customer":{
        "name":"LUCILUCI DOS SANTOS",
        "email":"luci@mail.com",
        "type":"individual",
        "country":"br",
        "documents":[
            {
                "type":"cnpj",
                "number":""
            }
        ],
        "external_id":"1"
    },
    "shipping":{
        "name":"LUCILUCI DOS SANTOS",
        "fee":"0",
        "address":{
            "street":"Rua Jesuíno Anastácio Pereira",
            "street_number":"665",
            "zipcode":"88345572",
            "country":"br",
            "state":"SC",
            "city":"CAMBORIÚ"
        }
    }
}

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": 2000,
    "payment_method":"pix",
    "billing":{
      "name":"LUCILUCI DOS SANTOS",
      "address":{
         "country":"br",
         "street":"Rua Jesuíno Anastácio Pereira",
         "street_number":"665",
         "state":"SC",
         "city":"CAMBORIÚ",
         "neighborhood":"Santa Regina"
      }
    },
    "customer":{
        "name":"LUCILUCI DOS SANTOS",
        "email":"luci@mail.com",
        "type":"individual",
        "country":"br",
        "documents":[
            {
                "type":"cnpj",
                "number":""
            }
        ],
        "external_id":"1"
    },
    "shipping":{
        "name":"LUCILUCI DOS SANTOS",
        "fee":"0",
        "address":{
            "street":"Rua Jesuíno Anastácio Pereira",
            "street_number":"665",
            "zipcode":"88345572",
            "country":"br",
            "state":"SC",
            "city":"CAMBORIÚ"
        }
    }
}'

Respostas

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

Exemplo
{
    "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",
    "pix_qr_code":"00020126890014BR.GOV.BCB.PIX2567api-pix.bancobs2.com.br/spi/v2/74943a5b-0978-41a9-8839-6edc03abb51552040000530398654041.005802BR5911Gateway6014Belo Horizonte61083038040362070503***63048605",
    "pix_expiration_date":"2025-04-02 13:43:00",
    "pix_additional_fields":{
        "pix_id":"abdb5ba36e90498ea4d56067e695d75b"
    },
    "reference_key": null,
    "session": null,
    "local_time": null,
    "payment_method": "pix",
    "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"
        }
    ],
    "metadata": null
}
🟠400Erro integração
Modificado em 2025-06-11 09:50:55
Página anterior
Criar uma Transação Com 3DS
Próxima página
Estornar uma transação
Built with