Skip to content
Tier 3 Schema

Parse Google Play Receipts

Extract Google Play order receipt emails into typed JSON — order ID, item title, purchase type, tax, totals, currency, and auto-renewal status for every transaction.

Google Play sends an order receipt email for every app purchase, subscription, and in-app transaction, but the format differs between one-time purchases, subscriptions, and in-app items. MailFrame extracts the order ID, item details, tax breakdown, and renewal flag into a consistent typed JSON object every time.

It works on “Your Google Play Order Receipt” emails for apps, subscriptions, and in-app purchases across all Google Play storefronts.

Fields MailFrame extracts

FieldTypeExampleNotes
order_idstringGPA.1234-5678-9012-34567Google Play order ID
account_emailstringcasey@gmail.comGoogle account email on the order
item_titlestringYouTube PremiumName of the purchased app, subscription, or item
item_typeenumsubscriptionOne of app, subscription, in_app
price_centsinteger1399Pre-tax item price in minor units
tax_centsinteger115Tax charged in minor units
total_centsinteger1514Total charged in minor units
currencystringusdISO 4217, lower-cased
datestring2026-05-21Purchase date normalized to ISO 8601
auto_renewingbooleantruetrue if the subscription will auto-renew

Sample input

A typical Google Play order receipt email looks like this:

From: googleplay-noreply@google.com
Subject: Your Google Play Order Receipt
Date: Thu, 21 May 2026 10:30:00 -0700
To: casey@gmail.com

Thank you for your purchase from Google Play!

Order number: GPA.1234-5678-9012-34567
Date: May 21, 2026

  YouTube Premium – Monthly subscription
  Charged to: Mastercard ending in 7890       $13.99

Tax:    $1.15
Total: $15.14 USD

This is an auto-renewing subscription.
Manage your subscriptions at play.google.com/subscriptions.

Structured JSON output

{
  "order_id": "GPA.1234-5678-9012-34567",
  "account_email": "casey@gmail.com",
  "item_title": "YouTube Premium – Monthly subscription",
  "item_type": "subscription",
  "price_cents": 1399,
  "tax_cents": 115,
  "total_cents": 1514,
  "currency": "usd",
  "date": "2026-05-21",
  "auto_renewing": true
}

JSON Schema definition

Every field is validated against the schema before delivery. You can copy this as a starting point and tighten it for your own use case:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "google_play_receipt",
  "type": "object",
  "required": ["order_id", "account_email", "item_title", "item_type", "total_cents", "currency", "date"],
  "properties": {
    "order_id": { "type": "string", "pattern": "^GPA\\.[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]+" },
    "account_email": { "type": "string", "format": "email" },
    "item_title": { "type": "string" },
    "item_type": { "type": "string", "enum": ["app", "subscription", "in_app"] },
    "price_cents": { "type": "integer", "minimum": 0 },
    "tax_cents": { "type": "integer", "minimum": 0 },
    "total_cents": { "type": "integer", "minimum": 0 },
    "currency": { "type": "string", "minLength": 3, "maxLength": 3 },
    "date": { "type": "string", "format": "date" },
    "auto_renewing": { "type": "boolean" }
  }
}

Parse via the API

POST the raw email (MIME or plain text) to /v1/parse with the schema you want to extract against:

curl https://api.mailframe.ai/v1/parse \
  -H "Authorization: Bearer $MAILFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "schema": "google_play_receipt",
    "input": { "type": "email", "raw": "<base64-encoded MIME>" }
  }'

Prefer set-and-forget? Inbox forwarding — sending your Google Play receipts to a unique inbox address MailFrame assigns you — is on the roadmap. Until it ships, POST the raw email to /v1/parse as shown above.

Webhook delivery

When extraction completes, MailFrame POSTs a signed envelope to your endpoint. The signature is an HMAC-SHA256 of the raw body using your webhook secret, sent in the MailFrame-Signature header, with exponential-backoff retries on failure.

{
  "event": "parse.completed",
  "parse_id": "parse_b7c0d4",
  "schema": "google_play_receipt",
  "data": {
    "order_id": "GPA.1234-5678-9012-34567",
    "account_email": "casey@gmail.com",
    "item_title": "YouTube Premium – Monthly subscription",
    "item_type": "subscription",
    "price_cents": 1399,
    "tax_cents": 115,
    "total_cents": 1514,
    "currency": "usd",
    "date": "2026-05-21",
    "auto_renewing": true
  },
  "confidence": { "order_id": 0.99, "total_cents": 0.98, "auto_renewing": 0.94 },
  "received_at": "2026-05-21T17:30:22Z"
}

Other schemas

Ship this schema in production

Define your fields once, then POST raw email to /v1/parse. MailFrame returns typed JSON in the HTTP response. (Unique inbox forwarding and signed webhook delivery are on the roadmap.)

Request early access