Create a Payment Link with the API

📘

This guide is about creating a payment link automatically with our API

You can also create payment links from the dashboard. See the guide page here

Before creating a Payment Link, you need to configure the Payment settings on our dashboard.

Depending on your use case:

  • ActivePayments to my bank account if every payment should be sent to the same beneficiary
  • Active Payments to different bank accounts if you want to define a different beneficiary for every payment

For the first use case, complete the beneficiary's details:

  • Beneficiary name
  • Bank name
  • IBAN
  • BIC

Whitelisted domain for callback URLs enables you to redirect the payer after confirming the payment in our funnel.

Note: if your application is in production, you need to be an administrator to edit the payments settings

33603360

Payment settings


Then you can use our API to generate Payment Links. Please read Create a payment link's endpoint document to see the details.

The required fields are:

  • amount and currency
  • expired_date : the maximum duration is 90 days
  • label : description displayed on the bank interface of the customer
  • user : (first_name AND last_name) OR company_name of the user who will use the Payment Link

And you can also defined:

  • end_to_end_id (optional) : id that will be sent to the bank
  • beneficiary (optional): information about the payment beneficiary -> (first_name AND last_name) OR company_name and iban
  • client_reference: a reference you can set to retrieve the payments between your system and ours
  • callback_url (optional) : a url where the payer will be redirected after confirming the payment.

If you don't define a beneficiary in this call, the payment will be sent to the default beneficiary you configured in the dashboard.

Body example:

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": "2021-07-24T22:00:00.000Z",
     "client_reference": "ABCDE_FG-HI_12345",
     "transactions": [
     {
         "amount": 120.98,
         "currency": "EUR",
         "label": "Refund 123456",
         "beneficiary": {
             "first_name": "Test",
             "last_name": "Merchant",
             "iban": "FR2310096000301695931368H67"
         },
         "end_to_end_id": "E2E_ID-1234"
       }
     ]
}'

Response example

{
    "url": "https://pay.bridgeapi.io/link/9dcf522ce3663efc598f573634531eb3fccbbcdde0bc5d674c95c0740feb0ec6",
    "id": "3ae3a3d6-f9d5-445e-b8fe-2db1ab8c39d8"
}

Once you have created payment links, you can see them in your dashboard and you can also list them with API thanks to the List payment links endpoint.

When your customer tries to initiate his payment, a payment request will be created.

We recommend integrating our Webhooks events to be updated on payment links statuses and on relative payment transactions.

📘

For more details about the payment requests, please check the Payments Initiation guide.