Create your first payment link from the API
With our API, you can create payment links to get paid on your online store or to collect bills.
Payment link creation
When you create a payment link with POST /payment-links, the required fields are:
amount
currency
label
: description displayed on the bank interface of the customeruser
: (first_name
ANDlast_name
) ORcompany_name
of the user who will use the payment linkend_to_end_id
: id that will be sent to the bankclient_reference
: a reference you can set to retrieve the payments between your system and ours
Depending on your usecase, you can also define two more values that impact the user experience: expired_date
and callback_url
.
Checkout experience
- Add a
callback_url
to your request. This way, when your customer completes his payment, he will be redirected to your website. - Don't send any
expired_date
: the payment link will be active during 15 minutes and the front experience will be optimized for this use case.

Checkout experience
As you provide a callback_url
, after payment confirmation your user will be redirect to this url with the parameters below:
payment_link_id
payment_request_id
status
with the valuesuccess
If your user clicks on the exit cross, you will receive the callback with the parameters below
payment_link_id
status
with the valueabort
step
which could bebanks_list
,parent_bank_page
orbank_page
client_reference
Collect bills
- Don't send any
callback_url
to your request. This way, when your customer completes his payment, he will stay on our website to check the result of his payment. - Add an
expired_date
. You can choose the duration of the link (max 90 days). The front experience will inform the customer about the expiration date and the beneficiary details. - You can also enable delayed payment. Add an
execution_date
on the transaction object. For banks that do not support the deferred payment, the user will be notified and the payment will be initiated normally.

Collect bills with the beneficiary name displayed

Collect bills with the beneficiary name displayed (details)
As you don't provide any callback_url
, your user will see the status of his payment directly on our interface.

Payment link status page
You can find below two body examples for these two use cases:
curl 'https://api.bridgeapi.io/v2/payment-links' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-d $'{
"user": {
"first_name": "Thomas",
"last_name": "Pichet",
"external_reference": "REF-USER-1234_AZ"
},
"callback_url": "https://myshop.com",
"client_reference": "ABCDE_FG-HI_12345",
"transactions": [
{
"amount": 120.98,
"currency": "EUR",
"label": "Refund 123456",
"end_to_end_id": "E2E_ID-1234"
}
]
}'
curl 'https://api.bridgeapi.io/v2/payment-links' \
-X POST \
-H 'Bridge-Version: 2021-06-01' \
-H 'Content-Type: application/json' \
-H 'Client-Id: MY_CLIENT_ID' \
-H 'Client-Secret: MY_CLIENT_SECRET' \
-d $'{
"user": {
"first_name": "Thomas",
"last_name": "Pichet",
"external_reference": "REF-USER-1234_AZ"
},
"expired_date": "2023-01-24T22:00:00.000Z",
"client_reference": "ABCDE_FG-HI_12345",
"transactions": [
{
"amount": 120.98,
"currency": "EUR",
"label": "Refund 123456",
"end_to_end_id": "E2E_ID-1234"
}
]
}'
{
"url": "https://pay.bridgeapi.io/link/9dcf522ce3663efc598f573634531eb3fccbbcdde0bc5d674c95c0740feb0ec6",
"id": "3ae3a3d6-f9d5-445e-b8fe-2db1ab8c39d8"
}
Payment lifecycle
Once you have created payment links, you can see them in your dashboard and you can also list them with our API, thanks to the List payment links endpoint.
Ensure that your integration is robust and your payment tracking is reliable by:
- Manage Payments statuses to know when your payment is rejected or executed
- Integrate our Payments webhooks to be updated on
payment transactions
- Test your payment flow with our Demo Bank
Updated 5 months ago