curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/billing/status \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/billing/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/google-ads/billing/status")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/billing/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"has_payment_method": true,
"stripe_unavailable": false,
"payment_method_brand": "visa",
"currency_code": "EUR",
"payment_method_last4": "4242"
}Get Google Ads billing status
Reports whether the workspace can be charged for ad spend, and shows the card on file.
Read this before creating or resuming a campaign, both of which need a usable card.
has_payment_method: false with stripe_unavailable: true, which means “could not check” rather than “no card”. Retry in that case instead of telling someone to add a card.curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/google-ads/billing/status \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/billing/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/billing/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/google-ads/billing/status")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/billing/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"has_payment_method": true,
"stripe_unavailable": false,
"payment_method_brand": "visa",
"currency_code": "EUR",
"payment_method_last4": "4242"
}Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads campaigns to manage.
Response
Successful Response
Whether the workspace can be charged for ad spend.
Whether a usable card is on file. Read it together with stripe_unavailable, which changes what a false means.
true
Whether Base44 could not reach the payment provider. When it is true, has_payment_method reports false because the check fails closed, not because the card is missing. Retry rather than telling someone to add a card.
false
Card brand, for display. Empty when no card is on file.
"visa"
Currency the workspace is billed in, as an ISO 4217 code, or null before a card is on file.
"EUR"
Last four digits of the card, for display, or null when no card is on file.
"4242"
Was this page helpful?