Fygaro Links: Integration (API)
How to feed information to the a Fygaro Link
If you would like to integrate Fygaro´s payment capabilities into your platform, we offer 2 options on how to pass information over to the Fygaro Links checkout.
Option 1: Pre-fill the fields (to allow customer to update them):
Structure [button url] + ?amount=“10.00”After amount= you can enter the URL encode amount with up to 2 decimals.
After client_note= you can enter a URL encoded text to be registered with the payment.
After client_reference= you can enter a URL encoded text to be registered with the payment.
Option 2: Use Json Web Tokens (JWT) to construct a payment button that cannot be modified by your customer.
The fields in bold can be customized by you or your program.Structure: [button url] + ?jwt=[jwt_code]
The Header section must contain:
{"alg": "HS256","typ": "JWT","kid": "Your-Key"}
The Payload section can contain any of the following (optional):
{"amount": "100.01","currency": "USD","custom_reference": "001","exp": "UnixTimestamp","nbf" : "UnixTimestamp"}
The Signature section must contain your Secret Key:
HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), Your-Fygaro-Secret)
Payment Confirmation Options
Once a payment is successfully completed, you can enable the following features:
- Return URL: Redirect customers back to your website after payment. You can also pass URL parameters, including:
reference
– the Fygaro Payment IDcustom_reference
– your optional custom value provided through the JWT integration
Example: domain.com`?reference=123&customReference=abc`
- Webhook (Hook): Automatically update your system upon successful payment by setting up a webhook integration. 👉** View the tutorial
API Credentials
If you need help creating your JWT, please visit https://jwt.io/ for more information
API Credentials: to obtain your API Key and Secret, you must enter "Settings"> "API Credentials"> "Generate New".
Secret access keys are, as their name implies, secret, just like your password. For your own security, Fygaro does not reveal your password if you forgot it (you would have to set a new password). Similarly, Fygaro does not allow the recovery of a secret access key after its initial creation.
Therefore, it is important that you download the file generated with your Public and Secret Key for future reference and use.
To revoke a lost key, just go to "Settings"> "API Credentials" and click on the red "X" next to your public key.
Updated on: 07/25/2025
Thank you!