Start a checkout session from a payment link
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). Refused like getPublicPaymentLink (payments_not_enabled, test_mode_disabled); a deactivated link answers link_inactive. A live link whose amount is under the live minimum (links created before the minimum existed) answers 422 amount_below_minimum.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”A new payment intent and checkout session for this link.
object
Example
{ "object": "checkout_session", "status": "open"}Feature not available for this account or deployment (feature_unavailable_error), e.g. payments_not_enabled (live payments have not started on the platform), live_mode_disabled, live_keys_disabled, test_mode_disabled, payment_method_unavailable.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Resource not found (or not visible to this tenant).
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}State conflict.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
object
object
Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.
Human-readable explanation in English.
Example
{ "error": { "type": "invalid_request_error" }}