Skip to main content
Version: 2.4.0

Instant Payments API (PIX sample)

A sample API for creating and reconciling instant payments on PIX, Brazil's instant-payments system. The endpoints, payloads, and error codes follow the public PIX standard for payment service providers (PSPs) from Banco Central do Brasil. Customer identifiers, ISPBs, and webhook URLs are invented.

This API is anonymized and synthetic. I wrote it for this portfolio, based on the conventions I used on real PIX integrations: contract-first OpenAPI, one reference page per operation, and errors as RFC 7807 problem details.

Try it in the browser​

Every operation page has a Send API Request panel. The hosts in this spec don't exist, so the site answers those requests in your browser with a simulated server built from this spec. Use any value as the bearer token. Charges and webhooks keep state: create a charge with PUT /cob/{txid}, then read it with GET and change it with PATCH.

Authentication​

Security Scheme Type:

oauth2

OAuth Flow (clientCredentials):

Scopes:

  • cob.write: Create and update charges

  • cob.read: Read charges

  • pix.read: Read received payments

  • webhook.write: Register and remove webhooks

  • webhook.read: Read webhook registrations

License

MIT