Vibrant
Search
K

Payment links

Payment links can be used to take online payments. You can send the links to customers via SMS, email, in a invoice etc. - that is up to you.
Payment link for the customer (can be branded)
In order to create a payment link through the Vibrant API, do this:
curl
curl -X 'POST' \
'https://pos-api.sandbox.vibrant.app/pos/v1/payment_link' \
-H 'accept: application/json' \
-H 'apikey: vibrant_pos.YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"amount": 2000
}'
In return you get a response containing
  • vibrantUrl - to send to the customer
  • paymentIntentId - use this to track when the payment succeeds/fails.
See the full API description here: REST-api documentation.
The vibrant url will redirect the customer to a payment url, when the link is ready and has not been canceled.

Track the payment status

The payment intent will go succeeded or failed when the customer tries to pay using the payment link.
We suggest signing up for payment intent webhooks - but it is also possible to pull the payment intent by id and check the status.

Refund

It is possible to refund a payment after the payment link has been paid and the payment has been captured. Provide the paymentLinkId, paymentIntentId or chargeId - and the payment will be refunded.
Providing no amount, will result in a refund of the total amount.

Partial refunds

Provide the refund call with an amount less than the payments total amount will create a partial refund.
The sum of more partial refunds related to the same payment cannot exceed the total amount.
If the link has not been paid (authorized) yet - it is possible to cancel the link so it cannot be used by customers.

Terminal payments vs online payments

In our merchant dashboard and in the data served from out API it is possible to distinguish payments that are created online (via online store or payment links).
The charge will hold paymentMethodDetails that are either of type card_present or card_not_present.
card_present represent a terminal transaction where the customer need to have the credit card (virtual or physical) present.
card_not_present represents an online payment, where the card details are entered on a web page.
In this way you can compare you online sales (incl payment links) vs your in-store sales.