Create your first payment link from the API

Our API allows you to effortlessly create payment links for your online store or bill collection. Here's how it works:

Payment link creation

When you create a payment link with POST /payment-links, you need to specify the payment amount, identify the user and the beneficiary.

Depending on your usecase, you can also define two more values that impact the user experience: expired_date and callback_url.

In the following sections, let's dig into these use cases.

Checkout

  • To redirect customers to your website after payment, add a callback_url to your request
  • For checkout experience, no need to set the expired_date. Payment links are active for 15 minutes by defalut ensuring a hassle-free process.
3360

Checkout experience

When setting a callback_url, after payment confirmation your user will be redirected to this url with the parameters below:

  • payment_link_id
  • payment_request_id
  • status
    • success for a successful Open Banking transfer
    • manual_transfer for a manual transfer confirmation

If your user clicks on the exit cross, you will receive the callback with the parameters below

  • payment_link_id
  • status with the value abort
  • step which could be banks_list, parent_bank_page, bank_page or manual_transfer_page

Pay by Link

  • Don't send any callback URL: Customers remain on our website to view their payment results.
  • Add an expired date: You can choose how long the link remains active (up to 90 days), and users will be informed of the expiration date.
  • 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.
3360

Collect bills with the beneficiary name displayed

3360

Collect bills with the beneficiary name displayed (details)

Whencallback_url is not provided, your user will see the payment's status directly on our interface.

3360

Payment link status page


You can find below two body examples for these 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",
         "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",
         "end_to_end_id": "E2E_ID-1234"
       }
     ]
}'
{
    "url": "https://pay.bridgeapi.io/link/9dcf522ce3663efc598f573634531eb3fccbbcdde0bc5d674c95c0740feb0ec6",
    "id": "3ae3a3d6-f9d5-445e-b8fe-2db1ab8c39d8"
}

Test Payments with Postman

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: