List payment links
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/payment-links");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/payment-links"
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.sandbox.{id}.gr4vy.app/payment-links")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/payment-links",
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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/payment-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payment-links \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"type": "payment_link",
"amount": 1299,
"currency": "USD",
"created_at": "2022-01-01T12:00:00+00:00",
"updated_at": "2022-01-01T12:00:00+00:00",
"expires_at": "2022-01-01T12:00:00+00:00",
"status": "active",
"external_identifier": "payment-link-123",
"statement_descriptor": {
"name": "GR4VY",
"description": "Card payment",
"city": "London",
"country": "US",
"phone_number": "+1234567890",
"url": "www.gr4vy.com"
},
"locale": "en",
"merchant_name": "Gr4vy",
"merchant_url": "https://gr4vy.com",
"merchant_banner_url": "https://gr4vy.com/banner.png",
"merchant_color": "#FF0000",
"merchant_message": "Thank you for shopping with us!",
"merchant_terms_and_conditions_url": "https://gr4vy.com/terms",
"merchant_favicon_url": "https://gr4vy.com/favicon.png",
"country": "US",
"intent": "authorize",
"return_url": "https://gr4vy.com/return",
"cart_items": [
{
"name": "GoPro HERO9 Camcorder",
"quantity": 1,
"unit_amount": 37999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "item-789123",
"sku": "sku-789123",
"product_url": "https://example.com/items/gopro",
"image_url": "https://example.com/images/items/gopro.png",
"categories": [
"<string>"
],
"product_type": "physical",
"seller_country": "US"
}
],
"metadata": {
"key": "value"
},
"payment_source": "recurring",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"display_name": "John L.",
"external_identifier": "user-789123",
"account_number": "1234567"
},
"shipping_details": {
"type": "shipping-details",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"buyer_id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
}
}
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}List payment links
GET
/
payment-links
List payment links
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/payment-links");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/payment-links"
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.sandbox.{id}.gr4vy.app/payment-links")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/payment-links",
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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/payment-links"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/payment-links \
--header 'Authorization: Bearer <token>'{
"items": [
{
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"type": "payment_link",
"amount": 1299,
"currency": "USD",
"created_at": "2022-01-01T12:00:00+00:00",
"updated_at": "2022-01-01T12:00:00+00:00",
"expires_at": "2022-01-01T12:00:00+00:00",
"status": "active",
"external_identifier": "payment-link-123",
"statement_descriptor": {
"name": "GR4VY",
"description": "Card payment",
"city": "London",
"country": "US",
"phone_number": "+1234567890",
"url": "www.gr4vy.com"
},
"locale": "en",
"merchant_name": "Gr4vy",
"merchant_url": "https://gr4vy.com",
"merchant_banner_url": "https://gr4vy.com/banner.png",
"merchant_color": "#FF0000",
"merchant_message": "Thank you for shopping with us!",
"merchant_terms_and_conditions_url": "https://gr4vy.com/terms",
"merchant_favicon_url": "https://gr4vy.com/favicon.png",
"country": "US",
"intent": "authorize",
"return_url": "https://gr4vy.com/return",
"cart_items": [
{
"name": "GoPro HERO9 Camcorder",
"quantity": 1,
"unit_amount": 37999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "item-789123",
"sku": "sku-789123",
"product_url": "https://example.com/items/gopro",
"image_url": "https://example.com/images/items/gopro.png",
"categories": [
"<string>"
],
"product_type": "physical",
"seller_country": "US"
}
],
"metadata": {
"key": "value"
},
"payment_source": "recurring",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"display_name": "John L.",
"external_identifier": "user-789123",
"account_number": "1234567"
},
"shipping_details": {
"type": "shipping-details",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"buyer_id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
}
}
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}This endpoint requires the
payment-links.read scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Returns a paginated list of payment links for an account.
A list of payment links.
A list of payment links.
Show child attributes
Show child attributes
The limit applied to request. This represents the number of items that are at maximum returned by this request.
Required range:
1 <= x <= 100Example:
1
The cursor that represents the next page of results. Use the cursor query
parameter to fetch this page of items.
Required string length:
1 - 1000Example:
"ZXhhbXBsZTE"
The cursor that represents the next page of results. Use the cursor query
parameter to fetch this page of items.
Required string length:
1 - 1000Example:
null
⌘I