Creates a new payment link
Use a Bearer token to access this API.
{
"line_items": [
{
"price": "string",
"quantity": 0,
"shipping_options": {},
"tax_rate": {}
}
],
"label": "Example",
"shipping_address_collection": false,
"shipping_options": {
"shipping_rate_id": "obj_01EXAMPLE00000000000000000",
"shipping_rate_data": {
"display_name": "Example",
"amount": 0,
"metadata": {}
}
},
"metadata": {},
"payment_intent_data": {
"capture_method": "automatic",
"metadata": {}
},
"after_completion": {
"type": "redirect",
"hosted_confirmation": { "custom_message": "string" },
"redirect": { "url": "https://example.com" }
},
"allow_promotion_codes": false,
"origin": "shopify",
"tax_rate": { "amount": 0 },
"discounts": [{ "coupon_id": "string" }],
"mode": "payment"
}
Success
{
"payment_link_id": "obj_01EXAMPLE00000000000000000",
"label": "Example",
"active": false,
"line_items": [
{
"price": "string",
"quantity": 0,
"shipping_options": {},
"tax_rate": {}
}
],
"allow_promotion_codes": false,
"shipping_address_collection": false,
"shipping_options": {
"shipping_rate_id": "obj_01EXAMPLE00000000000000000",
"shipping_amount": 0,
"display_name": "Example"
},
"metadata": {},
"url": "https://example.com",
"created_at": "2024-01-01T00:00:00Z",
"payment_intent_data": {
"capture_method": "automatic",
"metadata": {}
},
"after_completion": {
"type": "redirect",
"hosted_confirmation": { "custom_message": "string" },
"redirect": { "url": "https://example.com" }
},
"origin": "shopify",
"tax_rate": { "amount": 0 },
"discounts": ["string"],
"test_mode": false
}