form-builder-payments
3 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
Create a Stripe Checkout session for a form payment#
POST
/spaces/{spaceId}/forms/{formId}/payments/checkout-sessionÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | – |
formIdPflicht | Pfad | string | – |
originPflicht | Header | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
field_keyPflicht | string | field_key of the `products` field being paid for. |
selectionsPflicht | FormPaymentSelectionDto[] | Selected products and their quantities. |
selections[].product_idPflicht | string | Catalog product id, taken from the products field options. |
selections[].quantityPflicht | number | Requested quantity. Clamped server-side to the product min/max. |
submission_dataPflicht | object | Full answer map keyed by field_key. Validated and saved as a draft submission before charging. |
is_test | boolean | Marks a preview/test payment from the builder — bypasses the published-status gate. |
surface | string | Where the form was filled; carried onto the draft so the paid submission honours its ticket switch. Werte: |
Antworten
- 200OK
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/forms/{formId}/payments/checkout-session" \
-H "Content-Type: application/json" \
-d '{"field_key":"…","selections":[],"submission_data":{}}'Get the non-secret payment config for the fill page#
GET
/spaces/{spaceId}/forms/{formId}/payments/configÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | – |
formIdPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/forms/{formId}/payments/config"Get the status of a form payment checkout session#
GET
/spaces/{spaceId}/forms/{formId}/payments/statusÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceIdPflicht | Pfad | string | – |
formIdPflicht | Pfad | string | – |
session_idPflicht | Query | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/spaces/{spaceId}/forms/{formId}/payments/status"