# payment-async-flow

Rules for VTEX payment connector code: Boleto, Pix, bank redirects, callbackUrl handling and signature validation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1000 installs · ★ 46
- Author: vtex
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/vtex/skills/tree/HEAD/skills/payment-async-flow/SKILL.md
- Updated: 2026-10-14
- HTML: https://affpapa.org/en/nevibecode/skills/payment-async-flow

## What it does

The skill kicks in when a connector takes a payment that does not settle right away: Boleto Bancário, Pix, bank transfers, redirect-based auth. Create Payment has to answer `status: "undefined"`, and the final status arrives later through `callbackUrl`. Return `"approved"` too early and the order ships unpaid; return `"denied"` and you cancel a payment the customer might still finish.

Two callbackUrl modes are covered. Without VTEX IO the URL is a notification endpoint — you POST the updated status with `X-VTEX-API-AppKey` and `X-VTEX-API-AppToken` headers. With VTEX IO it is a retry endpoint: a POST with no payload makes the Gateway call `authorize()` again. Keep the `X-VTEX-signature` query parameter in the callbackUrl untouched. The skill also spells out `delayToCancel`: 900 to 3600 seconds for Pix, matching QR code expiry, and the invoice due date for Boleto.

One constraint catches people out: `inboundRequestsUrl` is server-to-server POST only and does not support browser GET redirects. PayPal or 3DS flows need a custom public route. PPP contracts, `paymentId`/`requestId` idempotency, PCI handling and POS terminal payments live in separate skills in the same set.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add vtex/skills --skill payment-async-flow -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/payment-async-flow/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/payment-async-flow/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add vtex/skills --skill payment-async-flow -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/payment-async-flow/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add vtex/skills --skill payment-async-flow -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/payment-async-flow/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install vtex/skills payment-async-flow
```

2. **Manually: put the files in place**
- File: `.github/skills/payment-async-flow/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add vtex/skills --skill payment-async-flow -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/vtex/skills --path skills/payment-async-flow
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/payment-async-flow/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add vtex/skills --skill payment-async-flow -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/vtex/skills/tree/HEAD/skills/payment-async-flow/SKILL.md

## When to use it
- return `undefined` for a payment that confirms later
- receive status updates through `callbackUrl`
- validate `X-VTEX-signature` on requests from the Gateway
- set `delayToCancel` to the Pix QR or Boleto due date
- add a public route for the browser return after 3DS

## Example prompts
- Implement Pix in the connector: Create Payment returns undefined and the status arrives via callbackUrl
- Check that we keep X-VTEX-signature in callbackUrl and compute delayToCancel correctly for Boleto
- We need a browser redirect after 3DS — inboundRequestsUrl won't work, suggest a public route

## Similar
- [pluggy-payments](https://affpapa.org/en/nevibecode/skills/pluggy-payments.md) — skill · 386 installs
- [payment-assistant](https://affpapa.org/en/nevibecode/skills/payment-assistant.md) — skill · 3400 installs
- [payment-testing](https://affpapa.org/en/nevibecode/skills/payment-testing.md) — skill · 978 installs
- [payment-gateway-integration](https://affpapa.org/en/nevibecode/skills/payment-gateway-integration.md) — skill · 524 installs
- [payment-integration](https://affpapa.org/en/nevibecode/skills/payment-integration.md) — skill · 349 installs
- [payment-processing](https://affpapa.org/en/nevibecode/plugins/payment-processing.md) — plugin · ★ 41729

From the same set: [vtex/skills](https://affpapa.org/en/nevibecode/by/vtex/skills.md) — 8 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
