curl --request GET \
--url https://api.staging.payrails.io/merchant/dropInLinks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/merchant/dropInLinks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/merchant/dropInLinks', 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://api.staging.payrails.io/merchant/dropInLinks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.staging.payrails.io/merchant/dropInLinks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/merchant/dropInLinks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/merchant/dropInLinks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"links": {
"self": "https://api.staging.payrails.io/merchant/dropInLinks?page[size]=20",
"next": "https://api.staging.payrails.io/merchant/dropInLinks?page[after]=xk2h55zsy5&page[size]=20"
},
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"workspaceId": "c8f9e0a1-b2c3-4d5e-961f-1234567890ab",
"dropInLinkUrl": "https://merchant.payrails.io/public/redirect/dropInLink/123e4567-e89b-12d3-a456-426614174000/550e8400-e29b-41d4-a716-446655440000",
"status": "enabled",
"amount": {
"value": "500.00",
"currency": "EUR"
},
"paidAmount": {
"value": "0.00",
"currency": "EUR"
},
"allowPartialFulfillment": false,
"workflowCode": "payment-acceptance",
"description": "Checkout for INV-2024-001.",
"merchantReference": "INV-2024-001",
"meta": {
"customer_id": "cus_998877"
},
"expiresAt": "2025-03-01T23:59:59Z",
"createdAt": "2025-02-27T10:30:00Z"
},
{
"id": "661f9511-f30c-52e5-b827-557766551111",
"workspaceId": "c8f9e0a1-b2c3-4d5e-961f-1234567890ab",
"dropInLinkUrl": "https://merchant.payrails.io/public/redirect/dropInLink/123e4567-e89b-12d3-a456-426614174000/661f9511-f30c-52e5-b827-557766551111",
"status": "closed",
"amount": {
"value": "150.00",
"currency": "EUR"
},
"paidAmount": {
"value": "150.00",
"currency": "EUR"
},
"allowPartialFulfillment": false,
"workflowCode": "payment-acceptance",
"merchantReference": "INV-2024-002",
"expiresAt": "2025-04-01T23:59:59Z",
"createdAt": "2025-03-01T09:00:00Z"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}List drop-in links
List drop-in links with pagination, filtering by status, merchant reference, or execution ID, or by a date range on the creation or last-updated time.
curl --request GET \
--url https://api.staging.payrails.io/merchant/dropInLinks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/merchant/dropInLinks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/merchant/dropInLinks', 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://api.staging.payrails.io/merchant/dropInLinks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.staging.payrails.io/merchant/dropInLinks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/merchant/dropInLinks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/merchant/dropInLinks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"links": {
"self": "https://api.staging.payrails.io/merchant/dropInLinks?page[size]=20",
"next": "https://api.staging.payrails.io/merchant/dropInLinks?page[after]=xk2h55zsy5&page[size]=20"
},
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"workspaceId": "c8f9e0a1-b2c3-4d5e-961f-1234567890ab",
"dropInLinkUrl": "https://merchant.payrails.io/public/redirect/dropInLink/123e4567-e89b-12d3-a456-426614174000/550e8400-e29b-41d4-a716-446655440000",
"status": "enabled",
"amount": {
"value": "500.00",
"currency": "EUR"
},
"paidAmount": {
"value": "0.00",
"currency": "EUR"
},
"allowPartialFulfillment": false,
"workflowCode": "payment-acceptance",
"description": "Checkout for INV-2024-001.",
"merchantReference": "INV-2024-001",
"meta": {
"customer_id": "cus_998877"
},
"expiresAt": "2025-03-01T23:59:59Z",
"createdAt": "2025-02-27T10:30:00Z"
},
{
"id": "661f9511-f30c-52e5-b827-557766551111",
"workspaceId": "c8f9e0a1-b2c3-4d5e-961f-1234567890ab",
"dropInLinkUrl": "https://merchant.payrails.io/public/redirect/dropInLink/123e4567-e89b-12d3-a456-426614174000/661f9511-f30c-52e5-b827-557766551111",
"status": "closed",
"amount": {
"value": "150.00",
"currency": "EUR"
},
"paidAmount": {
"value": "150.00",
"currency": "EUR"
},
"allowPartialFulfillment": false,
"workflowCode": "payment-acceptance",
"merchantReference": "INV-2024-002",
"expiresAt": "2025-04-01T23:59:59Z",
"createdAt": "2025-03-01T09:00:00Z"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Query Parameters
Filter by drop-in link status.
enabled, closed, expired, deleted Filter by merchant reference.
Filter by workflow execution ID.
Filter by creation date. Supports range syntax, e.g. [2024-01-01T00:00:00Z,2025-01-01T00:00:00Z).
Filter by last updated date. Supports range syntax, e.g. [2024-01-01T00:00:00Z,2025-01-01T00:00:00Z).
Search collection items after that cursor. Cursor for paging results.
Search collection items before that cursor. Cursor for paging results.
Length of the collection to search.
Response
Success.
Hide child attributes
Hide child attributes
Unique identifier of the drop-in link.
Unique identifier of a workspace in Payrails.
Public URL that can be shared with payers.
Current status of the drop-in link.
enabled, closed, expired, deleted Total amount configured for the payment link (decimal string value, ISO 3-letter currency code).
Total amount paid so far (decimal string value, ISO 3-letter currency code).
Whether the link allows partial payments.
Workflow code used for executions created from this link.
Expiration timestamp in ISO 8601 format with timezone, e.g. 2025-03-01T23:59:59Z.
Creation timestamp of the drop-in link.
Workflow execution ID associated with the drop-in link, when one has been created.
Human-readable description of the payment link.
Merchant reference for reconciliation (commonly, the identifier of the order on the Merchant's system e.g. an invoice number).
Metadata for the context of an execution. Includes Payrails-defined structures for most common fields used in workflows, but can also be extended by merchant or provider-specific fields. For more information, visit our Meta Fields guide. See Meta for every field.
Hide child attributes
Hide child attributes
The order being placed on your system. See Meta.order for every field.
The customer placing the order. See Meta.customer for every field.
Data describing the customer's device or browser. See Meta.clientContext for every field.
Description of a vendor that provides the order. See Meta.vendor for every field.
Configuration of a subscription process. See Meta.subscription for every field.
Additional meta fields to be sent to the payment providers which support metadata / tags. For example, sent to Stripe as metadata. Because these will always be PSP-specific, we do NOT recommend using these fields if they can actually be mapped to a generic field above.
Per-payment-method shopper input, namespaced by payment method code so each method's fields stay isolated. Only the entry matching the payment method being charged is read. See Meta.paymentMethods for every field.