Payment Link Sessions

Create a new payment link session


Create payment link session

Create a new payment link session

Body parameters
customerstringoptional

Customer ID to associate with the session (mutually exclusive with account)

accountstringoptional

Account ID to associate with the session (mutually exclusive with customer)

customer_emailstringoptional

Customer email address (mutually exclusive with customer)

client_reference_idstringoptional

Your internal reference ID for this session

success_urlstringoptional

HTTP(S) URL the payer is redirected to after a successful or processing payment, with a signed payload appended. Optional.

cancel_urlstringoptional

HTTP(S) URL the payer is redirected to if they cancel on the hosted checkout page, with a signed payload appended. Optional.

expires_inintegeroptional

Session expiry in seconds (min 900 / 15 minutes, max 86400 / 24 hours). Defaults to 86400.

phone_number_collectionbooleanoptional

Whether to collect phone number during checkout

shipping_address_collectionbooleanoptional

Whether to collect shipping address during checkout

payment_methodstringoptional

Existing payment method ID to pre-fill (requires customer or account)

payment_method_datadictionaryoptional

New payment method data to pre-fill

line_itemsarray

Products to include in the session (at least one required)

Returns

Payment link session created with account

POST/v1/payment_link_sessions
curl --request POST \
  --url https://api.framepayments.com/v1/payment_link_sessions \
  --header 'Authorization: Bearer API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "line_items": [
    {
      "product": null,
      "quantity_minimum": 0,
      "quantity_maximum": 0
    }
  ]
}'
RESPONSE
{
  "id": "60574c6d-2f16-4b03-a852-079fffd087db",
  "customer_email": null,
  "payment_status": "unpaid",
  "phone_number_collection": false,
  "shipping_address_collection": false,
  "status": "open",
  "client_reference_id": null,
  "object": "payment_link.session",
  "expires": 1781202281,
  "created": 1781115881,
  "updated": 1781115881,
  "livemode": false,
  "customer": null,
  "account": "f8b22e7f-c84a-4560-930e-2d505ad9aef5",
  "payment_method": null
}