Create a payment link
curl --request POST \
--url https://thirdparty.qonto.com/v2/payment_links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_link": {
"potential_payment_methods": [
"credit_card"
],
"reusable": true,
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
]
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/payment_links"
payload = { "payment_link": {
"potential_payment_methods": ["credit_card"],
"reusable": True,
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_link: {
potential_payment_methods: ['credit_card'],
reusable: true,
items: [
{
title: 'Item 1',
quantity: 1,
unit_price: {value: '10.99', currency: 'EUR'},
vat_rate: '21.0',
type: 'good',
description: 'Item 1 description',
measure_unit: 'unit'
}
]
}
})
};
fetch('https://thirdparty.qonto.com/v2/payment_links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://thirdparty.qonto.com/v2/payment_links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_link' => [
'potential_payment_methods' => [
'credit_card'
],
'reusable' => true,
'items' => [
[
'title' => 'Item 1',
'quantity' => 1,
'unit_price' => [
'value' => '10.99',
'currency' => 'EUR'
],
'vat_rate' => '21.0',
'type' => 'good',
'description' => 'Item 1 description',
'measure_unit' => 'unit'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/payment_links"
payload := strings.NewReader("{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://thirdparty.qonto.com/v2/payment_links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"payment_link": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"expiration_date": "2021-01-01T00:00:00Z",
"potential_payment_methods": [
"credit_card"
],
"amount": {
"value": "13.30",
"currency": "EUR"
},
"resource_type": "Basket",
"reusable": true,
"created_at": "2021-01-01T00:00:00Z",
"url": "https://pay.qonto.com/019788b3-57ab-727c-b26e-86b95c16e93f?resource_id=4c56f862-6117-4b20-a3e3-7fa6fccea029",
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
],
"invoice_id": "550e8400-e29b-41d4-a716-446655440001",
"invoice_number": "INV-12345",
"debitor_name": "John Doe"
}
}Payment Links
Create a payment link
OAuth scope: payment_link.write
Create a payment link for collecting payments from your customers.
This endpoint supports two types of payment links:
Basket payment links (CreateBasketPaymentLink):
- Include an
itemsarray with detailed item information, unit prices, and VAT rates - Use the
reusablefield to control whether the link can be used multiple times - Required fields:
items,reusable,potential_payment_methods
Invoice payment links (CreateInvoicePaymentLink):
- Include
invoice_id,invoice_number,debitor_name, andamountfields - Specifically designed for invoice payments
- Required fields:
invoice_id,invoice_number,debitor_name,amount,potential_payment_methods
POST
/
v2
/
payment_links
Create a payment link
curl --request POST \
--url https://thirdparty.qonto.com/v2/payment_links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_link": {
"potential_payment_methods": [
"credit_card"
],
"reusable": true,
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
]
}
}
'import requests
url = "https://thirdparty.qonto.com/v2/payment_links"
payload = { "payment_link": {
"potential_payment_methods": ["credit_card"],
"reusable": True,
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_link: {
potential_payment_methods: ['credit_card'],
reusable: true,
items: [
{
title: 'Item 1',
quantity: 1,
unit_price: {value: '10.99', currency: 'EUR'},
vat_rate: '21.0',
type: 'good',
description: 'Item 1 description',
measure_unit: 'unit'
}
]
}
})
};
fetch('https://thirdparty.qonto.com/v2/payment_links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://thirdparty.qonto.com/v2/payment_links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_link' => [
'potential_payment_methods' => [
'credit_card'
],
'reusable' => true,
'items' => [
[
'title' => 'Item 1',
'quantity' => 1,
'unit_price' => [
'value' => '10.99',
'currency' => 'EUR'
],
'vat_rate' => '21.0',
'type' => 'good',
'description' => 'Item 1 description',
'measure_unit' => 'unit'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://thirdparty.qonto.com/v2/payment_links"
payload := strings.NewReader("{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://thirdparty.qonto.com/v2/payment_links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_link\": {\n \"potential_payment_methods\": [\n \"credit_card\"\n ],\n \"reusable\": true,\n \"items\": [\n {\n \"title\": \"Item 1\",\n \"quantity\": 1,\n \"unit_price\": {\n \"value\": \"10.99\",\n \"currency\": \"EUR\"\n },\n \"vat_rate\": \"21.0\",\n \"type\": \"good\",\n \"description\": \"Item 1 description\",\n \"measure_unit\": \"unit\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"payment_link": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "open",
"expiration_date": "2021-01-01T00:00:00Z",
"potential_payment_methods": [
"credit_card"
],
"amount": {
"value": "13.30",
"currency": "EUR"
},
"resource_type": "Basket",
"reusable": true,
"created_at": "2021-01-01T00:00:00Z",
"url": "https://pay.qonto.com/019788b3-57ab-727c-b26e-86b95c16e93f?resource_id=4c56f862-6117-4b20-a3e3-7fa6fccea029",
"items": [
{
"title": "Item 1",
"quantity": 1,
"unit_price": {
"value": "10.99",
"currency": "EUR"
},
"vat_rate": "21.0",
"type": "good",
"description": "Item 1 description",
"measure_unit": "unit"
}
],
"invoice_id": "550e8400-e29b-41d4-a716-446655440001",
"invoice_number": "INV-12345",
"debitor_name": "John Doe"
}
}Authorizations
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Body
application/json
- CreateBasketPaymentLink
- CreateInvoicePaymentLink
Show child attributes
Show child attributes
Response
The payment link has been created successfully.
Show child attributes
Show child attributes
Was this page helpful?
⌘I