Migration Guide: From integration_key to JWS
This guide helps existing EBANX merchants migrate from the legacy integration_key authentication method to JWS (JSON Web Signature) authentication. This migration applies to all EBANX API products, including Payments, Payouts, and Transfers.
Why migrate
The integration_key authentication method is being deprecated in favor of JWS authentication. JWS provides stronger security guarantees:
- No shared secrets in transit — With
integration_key, the same secret is included in every request body, creating potential exposure risks. With JWS, your private key never leaves your infrastructure. - Request integrity — Each request is cryptographically signed. Any modification to the request body invalidates the signature.
- Non-repudiation — The origin of each API call can be verified.
What changes
The migration involves three changes to your integration:
| Aspect | Before (integration_key) | After (JWS) |
|---|---|---|
| Authentication method | integration_key field in request body | X-JWS-Signature HTTP header |
| Secret handling | Shared secret sent with every request | Private key stays on your server |
| Request body | Includes integration_key field | No authentication fields in body |
| Setup | Receive key from EBANX | Generate RSA key pair, register public key with EBANX |
Migration steps
- Set up JWS authentication
Follow the JWS Integration Guide to generate your RSA key pair and register your public key with EBANX.
After completing the setup, you will have:
- A private key stored securely in your infrastructure
- A public key registered with EBANX
- A unique key identifier (
kid) provided by EBANX
- Update your request structure
Remove the
integration_keyfield from your request bodies. Authentication is now handled entirely through theX-JWS-Signatureheader.Before (with
integration_key):curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_integration_key",
"payment": {
"name": "Jose Silva",
"email": "jose@example.com",
"country": "br",
"payment_type_code": "pix",
"merchant_payment_code": "order-12345",
"currency_code": "BRL",
"amount_total": 100.00
}
}'After (with JWS):
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--header 'X-JWS-Signature: <YOUR_JWS_SIGNATURE>' \
--data '{
"payment": {
"name": "Jose Silva",
"email": "jose@example.com",
"country": "br",
"payment_type_code": "pix",
"merchant_payment_code": "order-12345",
"currency_code": "BRL",
"amount_total": 100.00
}
}'public_integration_key is unchangedThe
public_integration_keyused for client-side tokenization (EBANX.js) is not affected by this migration. Only the server-sideintegration_keyis being replaced by JWS. - Test in sandbox
Test your updated integration in the sandbox environment before deploying to production.
Verify that:
- API requests succeed with the
X-JWS-Signatureheader - The
integration_keyfield is no longer present in request bodies - All your existing functionality continues to work correctly
- API requests succeed with the
- Deploy to production
Once testing is complete, deploy your changes to production. Generate a separate production key pair if you used a different one for sandbox, and register the production public key with EBANX.
Contact integration@ebanx.com if you need assistance during the migration process.
Migration checklist
Before completing your migration, verify the following:
- RSA key pair generated with at least 4096 bits
- Public key registered with EBANX and
kidreceived - Private key stored securely and not exposed
- All API requests include
X-JWS-Signatureheader integration_keyfield removed from all request bodiespublic_integration_keyusage unchanged (client-side tokenization)- Integration tested in sandbox environment
- Production deployment completed
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.