Skip to main content

Authentication

MuPag keeps a strict line between public keys and server-side credentials.

sk_* for authenticated operations​

Use Authorization: Bearer sk_test_... in QA. sk_prd_... keys and the prd environment are not available yet; do not simulate or configure them. Secret keys belong to your backend, workers and jobs.

Card tokenization outside hosted checkout​

In the direct B2B flow, the merchant obtains the card token from Asaas, outside MuPag, and sends only that token to the authenticated MuPag backend. Tokenization credentials never replace sk_*.

Hosted checkout sessions can offer single-payment cards through the official Asaas invoice when the merchant has an available real integration. The buyer opens the session's hosted_payment_url; card details remain on the Asaas page. Create sessions with a server key or a publishable key limited to the checkout_sessions.create scope, as described in the checkout guide. Never expose a secret key in the browser.

Operational rules​

  • Never send sk_* from the browser.
  • Never place secrets in URLs, query strings or screenshots.
  • Send Idempotency-Key on POST operations.
  • If you rotate credentials, allow a short overlap window and clear old caches.

Did this page unblock the next step?

Feedback stays inside the docs flow and should never include customer or card data.

mupag / support

How can we help?

Quick answers, AI and our team.

Frequently asked questions

How do I start integrating?

Follow the quickstart, configure the QA environment and create your first test charge.

Read documentation
My PIX payment is pending. What now?

Confirmation is asynchronous. Check the charge status and webhook events before fulfilling the order.

Read documentation
How do I receive payment notifications?

Register a webhook endpoint, verify its signature and handle duplicate events safely.

Read documentation
How do subscriptions work?

Read the subscriptions guide to configure recurring billing and follow the charge lifecycle.

Read documentation
Where can I find authentication help?

See how to use environment credentials in the documentation. Never share your key in chat.

Read documentation