curl --request POST \
--url https://apiv2.example.com/payment-links/{paymentLinkId}/cancel \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-links/{paymentLinkId}/cancel"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-links/{paymentLinkId}/cancel', 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://apiv2.example.com/payment-links/{paymentLinkId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiv2.example.com/payment-links/{paymentLinkId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.example.com/payment-links/{paymentLinkId}/cancel")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-links/{paymentLinkId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentLinkId": "j47ac10b-58cc-4372-a567-0e02b2c3d479",
"hostedUrl": "https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "ACTIVE",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"orderId": "44567801-a504-4f09-8089-31ea78bc239b",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"paymentProvider": "STRIPE",
"paymentProfileId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"description": "Pay your monthly subscription",
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"completedAt": "2024-01-15T14:30:00Z",
"metadata": {}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Cancel payment link
Cancel an active payment link, preventing further payment attempts through the link.
curl --request POST \
--url https://apiv2.example.com/payment-links/{paymentLinkId}/cancel \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/payment-links/{paymentLinkId}/cancel"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/payment-links/{paymentLinkId}/cancel', 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://apiv2.example.com/payment-links/{paymentLinkId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiv2.example.com/payment-links/{paymentLinkId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.example.com/payment-links/{paymentLinkId}/cancel")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/payment-links/{paymentLinkId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"paymentLinkId": "j47ac10b-58cc-4372-a567-0e02b2c3d479",
"hostedUrl": "https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "ACTIVE",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"orderId": "44567801-a504-4f09-8089-31ea78bc239b",
"customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"paymentProvider": "STRIPE",
"paymentProfileId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"description": "Pay your monthly subscription",
"paymentIntentId": "64870b5c-fb61-4c9a-955a-e148e0826c20",
"completedAt": "2024-01-15T14:30:00Z",
"metadata": {}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Authorizations
An API key that grants access to the Connect API. You can create and manage API keys in the portal.
Headers
A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.
Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.
256Path Parameters
The unique identifier for the payment link.
Response
Payment link details.
A hosted payment link created from a payment intent that can be shared with customers.
Unique identifier for the payment link.
"j47ac10b-58cc-4372-a567-0e02b2c3d479"
The URL where customers can complete their payment.
"https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479"
Current status of a payment link.
ACTIVE, EXPIRED, COMPLETED, CANCELED, FAILED When the payment link was created.
"2024-01-15T10:00:00Z"
When the payment link was last updated.
"2024-01-15T10:00:00Z"
The order this payment link collects payment for.
"44567801-a504-4f09-8089-31ea78bc239b"
The customer this payment link collects payment from.
"a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
Payment service provider that processes the transaction.
STRIPE, BILLOGRAM "STRIPE"
The saved payment method pre-selected for the customer, if any.
"6ba7b810-9dad-11d1-80b4-00c04fd430c8"
Optional description displayed on the payment page.
"Pay your monthly subscription"
The payment intent that collected the payment, available once the link has been paid.
"64870b5c-fb61-4c9a-955a-e148e0826c20"
When the payment was completed, if the link has been paid.
"2024-01-15T14:30:00Z"
A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.
Show child attributes
Show child attributes