Payment Links
Accept payments easily without code.
With Payment Links you can accept payments without building a website or application. Create a Payment Link using our API and share it with your customers through email or Whatsapp.
Create a Payment Link
Using your Secret Key, create a payment link from your backend with the amount
and currency
:
curl --request POST "https://api.fintoc.com/v1/payment_links" \
--header 'Authorization: sk_test_0000000000000000' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 24750,
"currency": "MXN",
"expires_after_seconds": 3600
"customer_email": "[email protected]",
"checkout": {
"description": "Use this field to add a custom description of the product the customer is buying"
},
"metadata": {
"your_order_id": "10000",
},
"recipient_account": {
"holder_id": "771433855",
"number": "1836027172",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
}
}'
Currencies represented as integers
The Fintoc API represents currencies in its smallest possible units with no decimals (as an integer). That means that an amount of MXN 247.50 gets represented by Fintoc as 24750. You can read more about currencies here.
The parameters customer_email
, checkout
and metadata
are optional. Some of the optional parameters you can use to create your payment link are:
Optional parameters | Type | Description |
---|---|---|
customer_email | string | If a customer email is set, Fintoc will send the customer an email in case of a refund. |
checkout | dictionary | Customize the checkout for your customers. For now, you can only add a custom description alongside the buy button. |
metadata | hash | Set of key-value pairs that you can attach to the payment link. This can be useful for storing additional information that you can use to reconcile the payment with your internal systems. |
expire_after_seconds | integer | The number of seconds after which the payment link will expire. By default, a payment link will not expire. |
recipient_account | object | (Optional and only available in Chile) The recipient account object must be included if your organization uses Direct Payments . |
The recipient account object is defined by 4 attributes:
Parameter | Example | Explanation |
---|---|---|
holder_id | 193426816 | Account holder's RUT |
number | 1836027172 | Account number |
type | checking_account | Type of account. Supported types are checking_account and sight_account . |
institution_id | cl_banco_de_chile | Fintoc institution id for the bank receiving the bank transfer. You can see the code for each bank here |
For a complete list of parameters, check the Payment Link API.
Share your Payment Link
Each payment link contains a url
that you can share with your customers through email, Whatsapp, or through other channels.
{
"id": "plink_K2zwNNSxPyx8w3GZ",
"object": "payment_link",
"amount": 120900,
"currency": "MXN",
"status": "active",
"created_at": "2024-08-02T20:28:13Z",
"expires_at": "2024-08-02T21:28:13Z",
"mode": "test",
"url": "https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ",
"customer_email": "[email protected]",
"checkout": {
"description": "Use this field to add a custom description of the product the customer is buying"
},
"metadata": {
"your_order_id": "10000"
},
"recipient_account": {
"holder_id": "771433855",
"number": "1836027172",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
}
}
Track payments
When customers use a payment link to complete a payment, Fintoc sends a payment_intent.succeeded
webhook that you can use for fulfillment and reconciliation. This webhook will contain the metadata
keys you used to create the payment link.
For more information, see our guide on how to complete the payment on your backend. In the case of payment links, we recommend you to only listen for payment_intent.succeeded
events.
You can also see successful payments using our Dashboard.
Cancel a Payment Link
You can cancel a payment link using the cancel endpoint:
curl --request PATCH \
--url https://api.fintoc.com/v1/payment_links/plink_K2zwNNSxPyx8w3GZ/cancel \
--header 'Authorization: sk_test_9c8d8CeyBTx1VcJzuDgpm4H' \
--header 'accept: application/json
After you cancel a payment link, customers canβt finalize purchases using the link anymore and are redirected to an expiration page.
Updated 14 days ago