Create embedded Google Ads payment setup

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Starts the card-saving flow for rendering inside your own page, rather than sending a person to a Stripe-hosted page.

This is the embedded counterpart to Create Google Ads payment setup. It takes no body, because there is no return trip to configure: you mount Stripe's embedded checkout with the client_secret and poll Get Google Ads billing status to see when the card lands. Nothing is charged here.

Prefer the hosted flow unless you are actually building the form. It hands you one URL to give a person, where this hands you a token you still have to render Stripe's component around.

<Note>Base44 never accepts card details through this API, and neither should you. This endpoint only produces the page a person fills in.</Note>

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

post/api/apps/{app_id}/google-ads/billing/payment-setup-embedded

Path parameters

app_idstring required

ID of the app whose Google Ads campaigns to manage.

ID of the app whose Google Ads campaigns to manage.

Response

The token for mounting Stripe's embedded checkout.

client_secretstring required

Token that mounts Stripe's embedded checkout in a browser. It is meant for client-side use and is scoped to this one session, so it is not a secret key, but it does let whoever holds it complete this card setup.

session_idstring required

Stripe's ID for the session.

publishable_keystring required

Base44's Stripe publishable key, which the embedded checkout needs. It is public by design.

Example response

{
  "client_secret": "cs_live_a1B2c3D4e5_secret_f6G7h8I9j0",
  "session_id": "cs_live_a1B2c3D4e5",
  "publishable_key": "pk_live_51H8xY2eZvKYlo2C"
}

Changes

Changed in 1 of the 2 revisions of this API.1