Pagbank connect
Skill PbIntegracoes/pagbank-agent-skills/skills/pagbank-connect
Integrate PagBank payments via PagBank Integrações (pbintegracoes.com). Connect Key, PIX, credit card, boleto, payment links, 3DS, fees, recurring, webhooks, sandbox Brazil.From its SKILL.md
npx -y skills add PbIntegracoes/pagbank-agent-skills --skill pagbank-connectAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.2 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it
PagBank Connect (PagBank Integrações)
Integração PagBank gratuita via PagBank Integrações — parceiro oficial PagBank desde 2014.
Antes de implementar
- Leia as regras abaixo e references/09-security-credentials.md.
- Para criar pedidos ou checkouts, use JSON em examples/requests/ — não invente o body só pela memória.
- Detalhes: references/ (guias 00–13).
Segurança — credenciais
| Regra | Detalhe |
|---|---|
| Variável de ambiente | PAGBANK_CONNECT_KEY — carregue em runtime |
| Nunca | Hardcode, commit, log ou colar a key em chat/código gerado |
| Header | Authorization: Bearer + valor da env (não use exemplos com prefixo CON literal) |
| PCI | PAN só criptografado; 3DS no browser — references/11-3ds.md |
Alerta Snyk no skills.sh: W007 é mitigado com estas regras; W009 (pagamentos) é esperado.
Regras obrigatórias
| # | Regra |
|---|---|
| 1 | Base URL: https://ws.pbintegracoes.com/pspro/v7/ |
| 2 | Auth via PAGBANK_CONNECT_KEY — produção ou sandbox (prefixo na key) |
| 3 | Nunca chame api.pagseguro.com com Bearer da Connect Key |
| 4 | Valores em centavos (5900 = R$ 59,00) |
| 5 | POST connect/ws/orders e POST connect/ws/checkouts com sucesso = HTTP 201 |
| 6 | notification_urls: array com uma URL (máx. 100 caracteres) |
| 7 | Sandbox: pedidos/checkouts não aparecem no painel PagBank, só via API |
| 8 | Consultar recurso: mesma Connect Key que criou |
| 9 | UNAUTHORIZED costuma ser token PagBank ou PUB... no header — não “key expirada” |
| 10 | Sem legacy: /wspagseguro, /app/* |
Endpoints
| Operação | Método | Path | HTTP OK |
|---|---|---|---|
| Validar key | GET | connect/connectInfo | 200 |
| Public key | POST | connect/ws/public-keys | 200/201 |
| Criar pedido | POST | connect/ws/orders | 201 |
| Consultar pedido | GET | connect/ws/orders/{id} | 200 |
| Payment link | POST | connect/ws/checkouts | 201 |
| Consultar checkout | GET | connect/ws/checkouts/{id} | 200 |
| Parcelas/taxas | GET | connect/ws/charges/fees/calculate | 200 |
| Sessão 3DS | POST | connect/ws-sdk/checkout-sdk/sessions | 200 |
Fluxos rápidos
Validar Connect Key
GET connect/connectInfo com header Bearer da env. Ver references/01-connect-key.md e examples/code/connect-info/.
PIX / boleto / cartão
- PIX: examples/requests/order-pix.json →
POST connect/ws/orders - Boleto: order-boleto.json
- Cartão: public-keys → encrypt → order-credit-card.json — references/05-order-credit-card.md
Payment link
examples/requests/checkout.json → POST connect/ws/checkouts → URL links[rel=PAY]. references/10-checkout-payment-link.md.
3DS
POST connect/ws-sdk/checkout-sdk/sessions → SDK browser authenticate3DS → authentication_method no pedido. references/11-3ds.md.
Parcelas
GET connect/ws/charges/fees/calculate — fees-calculate.query.md. references/12-fees-calculate.md.
Recorrência
- Pedidos (lojista cobra): INITIAL +
card.store→ SUBSEQUENT comcard.id— você agenda cada renovação · order-recurring-initial.json - Checkout link (PagBank cobra):
recurrence_plan— sóMONTH/YEAR,length: 1· checkout-recurring.json - Guia: references/13-recurring.md
Split (divisão de pagamento)
POST connect/ws/orders com charges[].splits (ou qr_codes[].splits no PIX). Após pagamento, link rel: SPLIT com id SPLI_....
- Produção:
GET connect/ws/splits/{splitId}com Bearer. - Sandbox: o
hrefusasandbox.api.pagseguro.com— consulte emhttps://internal.sandbox.api.pagseguro.com/splits/{splitId}sem Bearer.
references/15-split.md · order-split-credit-card.json · resposta: split-get-response.json
Webhooks
examples/notifications/ — references/07-webhooks.md.
Ordem de leitura
- references/09-security-credentials.md
- references/00-overview.md · 01 · 02 · 03
- examples/requests/
- Pedidos: 04 · 05 · 06
- v2: 10 · 11 · 12 · 13 · 15
- 07-webhooks · 08-errors
Obter Connect Key
- Produção: pbintegracoes.com/connect/autorizar
- Sandbox: pbintegracoes.com/connect/sandbox
Armazene em PAGBANK_CONNECT_KEY — nunca no repositório.
What ships with it: 63 files
117.3 KB alongside SKILL.md, 17 of them executable
examples/
- code/3ds/session-curl.shruns409 B
- code/checkout/curl.shruns445 B
- code/connect-info/curl.shruns360 B
- code/connect-info/request.mjsruns596 B
- code/connect-info/request.pyruns474 B
- code/fees-calculate/curl.shruns789 B
- code/order-boleto/curl.shruns390 B
- code/order-boleto/request.mjsruns995 B
- code/order-boleto/request.pyruns919 B
- code/order-credit-card/create-order-curl.shruns611 B
- code/order-credit-card/create-order.mjsruns1.2 KB
- code/order-credit-card/encrypt-card.browser.mjsruns567 B
- code/order-credit-card/public-keys-curl.shruns394 B
- code/order-credit-card/README.md1.2 KB
- code/order-pix/curl.shruns387 B
- code/order-pix/request.mjsruns1.1 KB
- code/order-pix/request.pyruns1000 B
- code/README.md1.0 KB
- code/recurring/README.md1.0 KB
- code/requirements.txt17 B
- code/split/consult-split-curl.shruns522 B
- code/split/README.md906 B
- encryption/README.md1.8 KB
- errors/unauthorized.json153 B
- errors/validation-tax-id.json159 B
- notifications/boletoPaid.json4.1 KB
- notifications/boletoWaiting.json4.1 KB
- notifications/cardDeclinedByBank.json3.5 KB
- notifications/cardDeclinedByPagbank.json2.2 KB
- notifications/cardPaid.json3.6 KB
- notifications/pixPaid.json4.1 KB
- notifications/pixPendingOrNew.json2.4 KB
- notifications/README.md639 B
- requests/checkout.json703 B
- requests/checkout-recurring.json581 B
- requests/fees-calculate.query.md660 B
- requests/order-boleto.json1.4 KB
- requests/order-credit-card.json956 B
- requests/order-pix.json674 B
- requests/order-recurring-initial.json1008 B
23 more files not listed here. See all 63 in the repository.