---
title: "Create Google Ads payment setup"
method: POST
path: "/api/apps/{app_id}/google-ads/billing/payment-setup"
---

# Create Google Ads payment setup

`POST /api/apps/{app_id}/google-ads/billing/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 flow for saving a card against the workspace's ad spend, and returns the page a person completes.

Google Ads spend is charged to a card on file. When [Get Google Ads workspace debt](/api-reference/get-google-ads-workspace-debt) reports `requires_payment_method` or `requires_payment_refresh`, this is what produces the link to fix it. Nothing is charged here, the session only validates and saves the card.

Send the two URLs Stripe should return the person to. Both must be `https://` on a `base44.com` or `base44.app` host, so the return trip always lands back inside Base44 rather than on a site you name. A URL outside that set is rejected with a 400.

<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>Use [Create embedded Google Ads payment setup](/api-reference/create-embedded-google-ads-payment-setup) instead when you are rendering the card form inside your own page rather than sending someone to Stripe.</Note>

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

## Path parameters

- `app_id` string, required — ID of the app whose Google Ads campaigns to manage.

## Request body

- object
  - `success_url` string, required — Where Stripe sends the person after they save a card. It must be an `https://` URL on a `base44.com` or `base44.app` host, with no credentials in it, so you cannot send them back to your own site.
  - `cancel_url` string, required — Where Stripe sends the person if they abandon the form. Same host rules as `success_url`.

## Response `200`

The page a person completes to save a card.

- PaymentSetupSession — A Stripe Checkout session for saving a card.
  - `checkout_url` string, required — Stripe-hosted page where a person enters their card details. Hand this to a human rather than trying to complete it programmatically. It expires, so fetch it when someone is ready to use it.
  - `session_id` string, required — Stripe's ID for the session. Useful for correlating with your own logs; the API takes it nowhere.

## Other responses

- `400` — `success_url` or `cancel_url` is not an `https://` URL, carries credentials, or is on a host outside `base44.com` and `base44.app`.
- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app, the app does not exist, or you used a workspace API key. A missing app and an app you cannot reach are deliberately the same answer.
- `422` — `success_url` or `cancel_url` is missing from the body. Both are required, and the check runs before the host rules above.

## Changes

- **2026-09-02** `6ad855bf424f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/google-ads/billing/payment-setup/post.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adexad/base44-app-management-api/revisions/6ad855bf424f/schema)
