Payment Button

Create custom amount and open payment buttons

The new payment button experience allows you for new options. To begin, from your Fygaro account Dashboard click on "Payment Buttons":
Screen Shot 2020-08-12 at 1.23.43 PM
Choose " " from the available options to:
Screen Shot 2020-08-12 at 10.39.45 PM

Invoices: get the Payment Button from already issued invoices, or create a new invoice.

Products: get the Payment Button to sell your products, services, and digital goods on Social Media, Chats, Web Sites, and more.

Custom: generate an Open or Fixed Amount payment link / code to get paid anywhere.

 
1). Open Amount:  create a link to a payment page where your customers enter an amount and complete payment. Upon successful completion, an email will be sent to both Merchant and Customer confirming the "payment" (no invoice is generated).
 
2). Fixed Amount:  create a link to a payment page where your customers will pay for a pre-selected amount and complete payment. Upon successful completion, an email will be sent to both Merchant and Customer confirming the "payment" (no invoice is generated).
 
3). Dynamic: Using URL parameters, you can feed and pre-fill a suggested amount and a note to the payment button. Just like option 1, clients will arrive to a screen to confirm the amount, then continue to enter payment information. Upon successful completion, an email will be sent to both Merchant and Customer confirming the "payment" (no invoice is generated).
 
Screen Shot 2020-08-12 at 10.40.02 PM

How to feed information to the Payment Link

To include information via URL parameters to your Payment Link, there are 2 opcions:

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 Ideal plan (Payment Button / 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",
"custom_reference": "001",
"exp": "UnixTimestamp",
"nbf" : "UnixTimestamp"
}

The Signature section must contain your Secret Key:

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

 

You might also be interested in setting up a Hook to have your system updated upon successful payment: Go to tutorial

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.