List all Payment Links

Returns a list of your Payment Links. The payment links are returned sorted by creation date, with the most recently created Payment Links appearing first.
Parameters
  • livemode

    booleanoptional
    • Has the valuetrueif the object exists inlivemode or the valuefalseif the object exists intestmode.
Returns
  • A dictionary with a data property that contains an array of up to 20 Payment Links. Each entry in the array is a separate Payment Link object. The response includes additional attributes which describe the remaining Payment Links available to retrieve, as well as alinkshash which describes the locations for the retrieval of additional resources.
Have any questions?
GET
/v1/payment-links
1
curl https://api.priceblocs.com/v1/payment-links \
2
-H "Authorization: Bearer {{API_KEY_SECRET_TEST}}"
Response
1
{
2
"object": "list",
3
"url": "/v1/payment-links",
4
"has_more": true,
5
"data": {
6
"url": "https://priceblocs.com/test/links/short_id",
7
"brand_url": "https://priceblocs.com/test/links/short_id",
8
"livemode": false,
9
"id": "00000000-0000-0000-0000-000000000000",
10
"object": "payment_link",
11
"short_id": "short_id",
12
"title": "My first payment link",
13
"description": "Each link will start a new checkout session when clicked",
14
"success_url": "https://priceblocs.com/checkout/success",
15
"cancel_url": "https://priceblocs.com/checkout/error",
16
"created": 1628234366,
17
"updated": 1628234366,
18
"payment_method_types": [
19
"card"
20
],
21
"currency": "usd",
22
"customer_email": "someone@gmail.com",
23
"customer": null,
24
"status": "active",
25
"discounts": [
26
{
27
"coupon": "coupon123"
28
}
29
],
30
"billing_address_collection": "auto",
31
"shipping_address_collection": {
32
"allowed_countries": [
33
"US"
34
]
35
},
36
"mode": "subscription",
37
"submit_type": "pay",
38
"allow_promotion_codes": false,
39
"adjustable_quantity": {
40
"enabled": true,
41
"maximum": 99,
42
"minimum": 1
43
},
44
"shipping_worldwide": false,
45
"tax_rates": [
46
"txr_123"
47
],
48
"dynamic_tax_rates": [
49
"txr_456"
50
],
51
"automatic_tax": {
52
"enabled": true
53
},
54
"tax_id_collection": {
55
"enabled": false,
56
"type": "standard"
57
},
58
"consent_collection": {
59
"promotions": "auto"
60
},
61
"after_expiration": {
62
"recovery": {
63
"enabled": true,
64
"allow_promotion_codes": true
65
}
66
},
67
"expires_at": 1628234366,
68
"shipping_rates": [
69
"shr_123"
70
],
71
"payment_intent_data": {
72
"capture_method": "automatic",
73
"transfer_data": {
74
"destination": "act_123"
75
}
76
},
77
"trial_period_days": null,
78
"trial_end": null,
79
"line_items": [
80
{
81
"price": "p_A_1",
82
"product": "p_A",
83
"currency": "usd",
84
"interval": "month",
85
"quantity": 1,
86
"dynamic_tax_rates": null,
87
"tax_rates": null
88
}
89
]
90
},
91
"page": 1,
92
"page_size": 20,
93
"total": 198,
94
"links": {
95
"self": {
96
"page": "1",
97
"rel": "self",
98
"url": "https://api.priceblocs.com/v1/payment-links?page=1"
99
},
100
"first": {
101
"page": "1",
102
"rel": "first",
103
"url": "https://api.priceblocs.com/v1/payment-links?page=1"
104
},
105
"last": {
106
"page": "10",
107
"rel": "last",
108
"url": "https://api.priceblocs.com/v1/payment-links?page=10"
109
},
110
"next": {
111
"page": "2",
112
"rel": "next",
113
"url": "https://api.priceblocs.com/v1/payment-links?page=2"
114
}
115
}
116
}
Show docs menu

List all Payment Links

Returns a list of your Payment Links. The payment links are returned sorted by creation date, with the most recently created Payment Links appearing first.
Parameters
  • livemode

    booleanoptional
    • Has the valuetrueif the object exists inlivemode or the valuefalseif the object exists intestmode.
Returns
  • A dictionary with a data property that contains an array of up to 20 Payment Links. Each entry in the array is a separate Payment Link object. The response includes additional attributes which describe the remaining Payment Links available to retrieve, as well as alinkshash which describes the locations for the retrieval of additional resources.
Have any questions?
GET
/v1/payment-links
1
curl https://api.priceblocs.com/v1/payment-links \
2
-H "Authorization: Bearer {{API_KEY_SECRET_TEST}}"
Response
1
{
2
"object": "list",
3
"url": "/v1/payment-links",
4
"has_more": true,
5
"data": {
6
"url": "https://priceblocs.com/test/links/short_id",
7
"brand_url": "https://priceblocs.com/test/links/short_id",
8
"livemode": false,
9
"id": "00000000-0000-0000-0000-000000000000",
10
"object": "payment_link",
11
"short_id": "short_id",
12
"title": "My first payment link",
13
"description": "Each link will start a new checkout session when clicked",
14
"success_url": "https://priceblocs.com/checkout/success",
15
"cancel_url": "https://priceblocs.com/checkout/error",
16
"created": 1628234366,
17
"updated": 1628234366,
18
"payment_method_types": [
19
"card"
20
],
21
"currency": "usd",
22
"customer_email": "someone@gmail.com",
23
"customer": null,
24
"status": "active",
25
"discounts": [
26
{
27
"coupon": "coupon123"
28
}
29
],
30
"billing_address_collection": "auto",
31
"shipping_address_collection": {
32
"allowed_countries": [
33
"US"
34
]
35
},
36
"mode": "subscription",
37
"submit_type": "pay",
38
"allow_promotion_codes": false,
39
"adjustable_quantity": {
40
"enabled": true,
41
"maximum": 99,
42
"minimum": 1
43
},
44
"shipping_worldwide": false,
45
"tax_rates": [
46
"txr_123"
47
],
48
"dynamic_tax_rates": [
49
"txr_456"
50
],
51
"automatic_tax": {
52
"enabled": true
53
},
54
"tax_id_collection": {
55
"enabled": false,
56
"type": "standard"
57
},
58
"consent_collection": {
59
"promotions": "auto"
60
},
61
"after_expiration": {
62
"recovery": {
63
"enabled": true,
64
"allow_promotion_codes": true
65
}
66
},
67
"expires_at": 1628234366,
68
"shipping_rates": [
69
"shr_123"
70
],
71
"payment_intent_data": {
72
"capture_method": "automatic",
73
"transfer_data": {
74
"destination": "act_123"
75
}
76
},
77
"trial_period_days": null,
78
"trial_end": null,
79
"line_items": [
80
{
81
"price": "p_A_1",
82
"product": "p_A",
83
"currency": "usd",
84
"interval": "month",
85
"quantity": 1,
86
"dynamic_tax_rates": null,
87
"tax_rates": null
88
}
89
]
90
},
91
"page": 1,
92
"page_size": 20,
93
"total": 198,
94
"links": {
95
"self": {
96
"page": "1",
97
"rel": "self",
98
"url": "https://api.priceblocs.com/v1/payment-links?page=1"
99
},
100
"first": {
101
"page": "1",
102
"rel": "first",
103
"url": "https://api.priceblocs.com/v1/payment-links?page=1"
104
},
105
"last": {
106
"page": "10",
107
"rel": "last",
108
"url": "https://api.priceblocs.com/v1/payment-links?page=10"
109
},
110
"next": {
111
"page": "2",
112
"rel": "next",
113
"url": "https://api.priceblocs.com/v1/payment-links?page=2"
114
}
115
}
116
}