curl --request GET \
--url https://api.withflex.com/v1/payment_links/{id} \
--header 'Authorization: Bearer <token>'{
"payment_link": {
"payment_link_id": "<string>",
"active": true,
"allow_promotion_codes": true,
"shipping_address_collection": true,
"url": "<string>",
"created_at": "<string>",
"after_completion": {
"type": "redirect",
"hosted_confirmation": {
"custom_message": "<string>"
},
"redirect": {
"url": "<string>"
}
},
"test_mode": true,
"label": "<string>",
"line_items": [
{
"quantity": 123,
"price": "<string>",
"price_data": {
"product": "<string>",
"unit_amount": 1,
"description": "<string>",
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"metadata": {}
},
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_rate_data": {
"display_name": "<string>",
"amount": 123,
"metadata": {}
}
},
"tax_rate": {
"amount": 123
}
}
],
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_amount": 123
},
"metadata": {},
"payment_intent_data": {
"capture_method": "automatic",
"metadata": {}
},
"origin": "shopify"
}
}Return a payment link by ID
curl --request GET \
--url https://api.withflex.com/v1/payment_links/{id} \
--header 'Authorization: Bearer <token>'{
"payment_link": {
"payment_link_id": "<string>",
"active": true,
"allow_promotion_codes": true,
"shipping_address_collection": true,
"url": "<string>",
"created_at": "<string>",
"after_completion": {
"type": "redirect",
"hosted_confirmation": {
"custom_message": "<string>"
},
"redirect": {
"url": "<string>"
}
},
"test_mode": true,
"label": "<string>",
"line_items": [
{
"quantity": 123,
"price": "<string>",
"price_data": {
"product": "<string>",
"unit_amount": 1,
"description": "<string>",
"recurring": {
"interval": "daily",
"interval_count": 1,
"trial_period_days": 1
},
"metadata": {}
},
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_rate_data": {
"display_name": "<string>",
"amount": 123,
"metadata": {}
}
},
"tax_rate": {
"amount": 123
}
}
],
"shipping_options": {
"shipping_rate_id": "<string>",
"shipping_amount": 123
},
"metadata": {},
"payment_intent_data": {
"capture_method": "automatic",
"metadata": {}
},
"origin": "shopify"
}
}Use a Bearer token to access this API.
Show child attributes
Unique identifier for the Payment Link
Whether the payment link is currently active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated.
Whether promo codes are enabled
Whether we want to collect shipping details at checkout time
The public URL that can be shared with customers.
Time at which the object was created. ISO 8601 format.
Behavior after the purchase is complete.
Show child attributes
redirect, hosted_confirmation Whether the payment link was created in test mode
Provided or generated label for the payment link.
The line items representing what is being sold.
Show child attributes
The quantity of the line item being purchased.
The ID of the Price object. One of price or price_data is required.
Data used to generate a new Price object inline. One of price or price_data is required.
Show child attributes
The ID of the product that this price will belong to.
A positive integer in cents (or 0 for a free price) representing how much to charge.
x >= 0A brief description of the price.
The recurring components of a price such as interval and trial period days.
Show child attributes
The billing cadence for the price.
daily, weekly, monthly, bimonthly, yearly, every_three_months, every_six_months, day, week, month, year The number of intervals
x >= 0The number of trial period days before the customer is charged for the first time.
x >= 0Metadata to attach to the price.
Shipping rate options for the line item.
Show child attributes
Metadata to attach to the payment session
Origin of the payment link
shopify, prepurchase, postpurchase