Articles on: Payment Links
This article is also available in:

Fygaro Links: Integration (API)



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.


The JWT features are only available on the Pro plan (Fygaro Links / Shops) or above**


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"}


Merchants in Panama (Banco General): can report the tax charged using two options:Enter the tax amount (up to 2 decimal places) in the tax_amount field, for example: "7.00".Specify the tax percentage (%) to be calculated using the field available in the Advanced Settings of the Payment Button or Plugin.In both cases, it is assumed that the tax is already included in the value entered in the Amount field.



The Signature section must contain your Secret Key:


HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), Your-Fygaro-Secret)


If your integration requires Manual Capture, Refund, or other capabilities, please contact our support team.


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 ID
    • custom_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

Was this article helpful?

Share your feedback

Cancel

Thank you!