public
GET /v1/public/payment-config
The publishable key and enabled gateways, for a browser.
การยืนยันตัวตน
เอนด์พอยต์นี้เป็นสาธารณะ ไม่ต้องใช้ข้อมูลประจำตัวหรือองค์กรใดๆ เนื่องจากเป็นสิ่งที่เราใช้สำหรับเว็บไซต์การตลาดและระบบตอบคำถามด้วย AI ของเราเอง
ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X GET https://api.zinndigital.com/v1/public/payment-configเข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
Unauthenticated: the guest checkout funnel has no principal, and everything here is public by construction — a Stripe **publishable** key is designed to be embedded in a page, and "which gateways are switched on" is visible at checkout anyway. This exists so the key is **rotatable from admin**. The dashboard used to read it from `VITE_STRIPE_PUBLISHABLE_KEY`, a build-time constant that was set in no build — so every deployed dashboard shipped an empty key and could only tell customers card payments were unavailable. A build-time value also could not be changed by editing a row, which is what the owner asked for.
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
providers | PaymentConfigProvider[] | ใช่ | — |
stripe_publishable_key | string | ใช่ | Empty when Stripe is not configured. Served here rather than baked into the SPA bundle so the merchant account can be rotated from admin (§2.35). |
card_capture_available | boolean | ใช่ | Whether the dashboard can show a card form. Computed here so "can this customer add a card?" has one answer rather than one per client. |
paypal_client_id | string | ใช่ | PayPal's client id, which goes in the JS SDK's script URL — the browser cannot render Buttons or hosted card fields without it. Public by construction (the catalogue marks it `s… |
paypal_available | boolean | ใช่ | Whether PayPal can actually be offered. Its own flag rather than something the SPA infers from `providers`: a PayPal row can be enabled with the client id blank, and a client re… |