Start a checkout session from a payment link
POST
/v1/public/payment-links/{slug}/checkout-sessions
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/public/payment-links/example/checkout-sessions"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/public/payment-links/example/checkout-sessions';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.feitpay.com/v1/public/payment-links/example/checkout-sessionsCreates a new payment intent and checkout session for each visitor. Rate limited per client IP (burst 10, then one request every 2 s).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Responses
Section titled “Responses”A new payment intent and checkout session for this link.
Media typeapplication/json
object
id
required
string
object
required
string
payment_intent_id
required
string
url
required
string format: uri
status
required
string
livemode
required
boolean
expires_at
required
string format: date-time
created_at
required
string format: date-time
Example
{ "object": "checkout_session", "status": "open"}Resource not found (or not visible to this tenant).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Headers
Section titled “Headers”Retry-After
integer