damdafa-com Purchase API
The Purchase API from damdafa-com — 9 operation(s) for purchase.
The Purchase API from damdafa-com — 9 operation(s) for purchase.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/damdafa-com:damdafa-com-purchase-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Damdafa Com Purchase API
version: 1.0.0
description: 'Operations tagged Purchase across 6 of this provider''s published API definitions: foto-damdafa-com-openapi.json, judge-damdafa-com-openapi.json, mockupper-damdafa-com-openapi.json, foto-damdafa-com-openapi.json, judge-damdafa-com-openapi.json, mockupper-damdafa-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: /dreamhome
- url: /judge
- url: /mockupper
tags:
- name: Purchase
paths:
/api/v1/purchase/google/billing-identity:
get:
tags:
- Purchase
summary: Get Google Play Billing Identity
description: Return the authenticated user's opaque Google Play account identifier.
operationId: get_google_play_billing_identity_api_v1_purchase_google_billing_identity_get
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GooglePlayBillingIdentityResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase:
post:
tags:
- Purchase
summary: Handle Purchase
description: 'Process an in-app purchase from Google Play Store or Apple App Store.
Validates the purchase token/receipt and processes the purchase for the authenticated user.
Args:
request: Purchase request with OS, product ID, and token/receipt
auth: Authenticated user context
service: App-specific purchase service (injected)
Returns:
PurchaseResponse with success status and subscription details'
operationId: handle_purchase_api_v1_purchase_post
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Purchase
summary: Get Purchase Info
description: 'Get available in-app purchase products.
Also sets up freemium credits for the user (authenticated or device-based).
Args:
service: App-specific purchase service (injected)
auth: Authentication context (optional)
Returns:
InfoResponse with subscribable_skus and consumable_skus products'
operationId: get_purchase_info_api_v1_purchase_get
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseInfo'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/:
post:
tags:
- Purchase
summary: Handle Purchase
description: 'Process an in-app purchase from Google Play Store or Apple App Store.
Validates the purchase token/receipt and processes the purchase for the authenticated user.
Args:
request: Purchase request with OS, product ID, and token/receipt
auth: Authenticated user context
service: App-specific purchase service (injected)
Returns:
PurchaseResponse with success status and subscription details'
operationId: handle_purchase_api_v1_purchase__post
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/info:
get:
tags:
- Purchase
summary: Get Purchase Info
description: 'Get available in-app purchase products.
Also sets up freemium credits for the user (authenticated or device-based).
Args:
service: App-specific purchase service (injected)
auth: Authentication context (optional)
Returns:
InfoResponse with subscribable_skus and consumable_skus products'
operationId: get_purchase_info_api_v1_purchase_info_get
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseInfo'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/subscription-status:
get:
tags:
- Purchase
summary: Get Subscription Status
description: 'Get the user''s current subscription status.
Args:
auth: Authenticated user context
service: App-specific purchase service (injected)
Returns:
PurchaseResponse with subscription status'
operationId: get_subscription_status_api_v1_purchase_subscription_status_get
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionStatus'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/webhook/apple:
post:
tags:
- Purchase
summary: Handle Apple Webhook
description: Handle Apple App Store Server Notifications (V2).
operationId: handle_apple_webhook_api_v1_purchase_webhook_apple_post
requestBody:
content:
application/json:
schema:
additionalProperties: true
type: object
title: Payload
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/referral/redeem:
post:
tags:
- Purchase
summary: Redeem Referral
description: Validate a referral code and return the appropriate master offer code or token.
operationId: redeem_referral_api_v1_purchase_referral_redeem_post
security:
- HTTPBearer: []
parameters:
- name: ProviderId
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: Providerid
- name: X-Provider-Id
in: header
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AUTH_PROVIDER'
- type: 'null'
title: X-Provider-Id
- name: X-Device-Id
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Device-Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReferralRedeemRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ReferralRedeemResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/webhook/google:
post:
tags:
- Purchase
summary: Handle Google Webhook
description: Handle Google Play Real-Time Developer Notifications.
operationId: handle_google_webhook_api_v1_purchase_webhook_google_post
requestBody:
content:
application/json:
schema:
additionalProperties: true
type: object
title: Payload
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /dreamhome
/api/v1/purchase/config:
get:
tags:
- Purchase
summary: Get Subscription Config
description: Get generic subscription config until HomeDecor products are added.
operationId: get_subscription_config_api_v1_purchase_config_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaywallConfigResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseSchema'
example:
error: Authentication failed
error_code: unauthorized
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseSchema'
example:
error: Internal server error
error_code: internal_error
servers:
- url: /dreamhome
components:
schemas:
PaywallConfigResponse:
properties:
subscriptions:
additionalProperties: true
type: object
title: Subscriptions
default: {}
products:
additionalProperties: true
type: object
title: Products
default: {}
type: object
title: PaywallConfigResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ErrorResponseSchema:
properties:
error:
type: string
title: Error
description: Human-readable error message
error_code:
type: string
enum:
- internal_error
- unauthorized
- forbidden
- authentication_failed
- access_denied
- not_found
- conflict
- job_in_progress
- rate_limit_exceeded
- validation_error
- quota_exceeded
- premium_required
- insufficient_balance
- timeout
- service_unavailable
- external_service_error
- auth_required
- invalid_token
- auth_failed
- auth_or_device_required
- verification_failed
- signature_content_mismatch
- cancelled
- email_not_verified
title: Error Code
description: Machine-readable error code
details:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Details
description: Additional error details
type: object
required:
- error
- error_code
title: ErrorResponseSchema
description: Standard error response schema for OpenAPI documentation
GooglePlayBillingIdentityResponse:
properties:
obfuscatedAccountId:
type: string
maxLength: 64
minLength: 1
title: Obfuscatedaccountid
type: object
required:
- obfuscatedAccountId
title: GooglePlayBillingIdentityResponse
description: Opaque account identifier supplied to Google Play Billing.
ReferralRedeemResponse:
properties:
type:
type: string
title: Type
code:
anyOf:
- type: string
- type: 'null'
title: Code
codes:
anyOf:
- additionalProperties:
type: string
type: object
- additionalProperties: true
type: object
- type: 'null'
title: Codes
offerToken:
anyOf:
- type: string
- type: 'null'
title: Offertoken
type: object
required:
- type
title: ReferralRedeemResponse
description: Response schema for redeeming a referral code.
AUTH_PROVIDER:
type: string
enum:
- firebase
- google
- apple
title: AUTH_PROVIDER
PurchaseInfo:
properties:
subscribable_skus:
items:
type: string
type: array
title: Subscribable Skus
consumable_skus:
items:
type: string
type: array
title: Consumable Skus
non_consumable_skus:
items:
type: string
type: array
title: Non Consumable Skus
type: object
required:
- subscribable_skus
- consumable_skus
title: PurchaseInfo
description: Purchase information with SKUs.
PurchaseResponse:
properties:
success:
type: boolean
title: Success
message:
type: string
title: Message
subscription_active:
anyOf:
- type: boolean
- type: 'null'
title: Subscription Active
expiry_date:
anyOf:
- type: string
- type: 'null'
title: Expiry Date
type: object
required:
- success
- message
title: PurchaseResponse
description: Response schema for purchase processing.
ReferralRedeemRequest:
properties:
referral_code:
type: string
title: Referral Code
os:
type: string
title: Os
type: object
required:
- referral_code
- os
title: ReferralRedeemRequest
description: Request schema for redeeming a referral code.
SubscriptionStatus:
properties:
hasActiveSubscription:
type: boolean
title: Hasactivesubscription
subscriptions:
items:
$ref: '#/components/schemas/SubscriptionDetails'
type: array
title: Subscriptions
type: object
required:
- hasActiveSubscription
- subscriptions
title: SubscriptionStatus
description: User's subscription status.
PurchaseRequest:
properties:
os:
type: string
title: Os
description: 'Operating system: ''ios'' or ''android'''
productId:
type: string
title: Productid
description: Product/subscription ID
purchaseToken:
anyOf:
- type: string
- type: 'null'
title: Purchasetoken
description: Google Play purchase token
transactionId:
anyOf:
- type: string
- type: 'null'
title: Transactionid
description: Transaction ID
originalTransactionId:
anyOf:
- type: string
- type: 'null'
title: Originaltransactionid
description: Original transaction ID
promoCode:
anyOf:
- type: string
- type: 'null'
title: Promocode
description: Optional promo code for bonuses
type: object
required:
- os
- productId
title: PurchaseRequest
description: Request schema for processing a purchase.
SubscriptionDetails:
properties:
productId:
type: string
title: Productid
isActive:
type: boolean
title: Isactive
platform:
type: string
title: Platform
default: unknown
expiresAt:
anyOf:
- type: integer
- type: 'null'
title: Expiresat
isRefunded:
anyOf:
- type: boolean
- type: 'null'
title: Isrefunded
default: false
type: object
required:
- productId
- isActive
title: SubscriptionDetails
description: Individual subscription details.
ExtraFeatureConfig:
properties:
amount:
$ref: '#/components/schemas/Amount'
feature:
type: string
title: Feature
additionalProperties: false
type: object
required:
- amount
- feature
title: ExtraFeatureConfig
description: Configuration for extra/bonus features included with a product.
SubscriptionPeriod:
type: string
enum:
- monthly
- yearly
title: SubscriptionPeriod
PaywallConfigResponse_2:
properties:
subscriptions:
additionalProperties:
$ref: '#/components/schemas/ConfigSubscriptionSchema'
type: object
title: Subscriptions
products:
additionalProperties:
$ref: '#/components/schemas/ProductConfig'
type: object
title: Products
type: object
required:
- subscriptions
- products
title: PaywallConfigResponse
FeatureKey:
type: string
enum:
- projectsLimit
- everythingStandard
- deviceFrames
- projectsCount
title: FeatureKey
description: Feature identifiers used in subscription benefits tracking.
Amount:
anyOf:
- type: integer
- type: number
- type: string
ConfigSubscriptionSchema:
properties:
period:
$ref: '#/components/schemas/SubscriptionPeriod'
tier:
$ref: '#/components/schemas/SubscriptionTier'
benefits:
items:
$ref: '#/components/schemas/ConfigBenefitSchema'
type: array
title: Benefits
discountPercentage:
anyOf:
- type: number
- type: 'null'
title: Discountpercentage
bestValue:
anyOf:
- type: boolean
- type: 'null'
title: Bestvalue
mostPopular:
anyOf:
- type: boolean
- type: 'null'
title: Mostpopular
type: object
required:
- period
- tier
- benefits
title: ConfigSubscriptionSchema
SubscriptionTier:
type: string
enum:
- standard
- pro
title: SubscriptionTier
CreditKey:
type: string
enum:
- generationCredits
title: CreditKey
description: "Feature identifiers used in quota/usage tracking.\n\nUses Python 3.11+ StrEnum for automatic string conversion in f-strings.\n\nThis Enum provides both:\n- Type hints showing exact allowed values\n- Automatic string value in f-strings (no need for )\n- Direct string comparisons and operations\n\nUsage:\n # In function signatures (shows \"recordVisitCount\" | \"chatUsage\" on hover)\n def track_usage(feature: CreditKey) -> None: ...\n\n # When calling functions (Enum member auto-converts to string)\n track_usage(CreditKey.CHAT) # Uses \"chatUsage\"\n\n # In f-strings (automatic conversion)\n # Prints \"Feature: chatUsage\"\n logger.info(f\"Feature: {CreditKey.CHAT}\")"
ProductConfig:
properties:
amount:
$ref: '#/components/schemas/Amount'
feature:
type: string
title: Feature
extra:
anyOf:
- $ref: '#/components/schemas/ExtraFeatureConfig'
- type: 'null'
additionalProperties: false
type: object
required:
- amount
- feature
title: ProductConfig
description: Configuration for a purchasable product.
BENEFIT_TYPE:
type: string
enum:
- unlimited
title: BENEFIT_TYPE
description: Subscription benefit types.
ConfigBenefitSchema:
properties:
amount:
anyOf:
- type: number
- $ref: '#/components/schemas/BENEFIT_TYPE'
- type: 'null'
title: Amount
feature:
anyOf:
- $ref: '#/components/schemas/CreditKey'
- $ref: '#/components/schemas/FeatureKey'
title: Feature
extra:
anyOf:
- $ref: '#/components/schemas/ExtraFeatureConfig'
- type: 'null'
additionalProperties: false
type: object
required:
- feature
title: ConfigBenefitSchema
PaywallConfigResponse_3:
properties:
subscriptions:
additionalProperties:
$ref: '#/components/schemas/ConfigSubscriptionSchema'
type: object
title: Subscriptions
products:
additionalProperties:
$ref: '#/components/schemas/ProductConfig'
type: object
title: Products
type: object
required:
- subscriptions
- products
title: PaywallConfigResponse
securitySchemes:
HTTPBearer:
type: http
scheme: bearer
x-refined-from:
- foto-damdafa-com-openapi.json
- judge-damdafa-com-openapi.json
- mockupper-damdafa-com-openapi.json
- foto-damdafa-com-openapi.json
- judge-damdafa-com-openapi.json
- mockupper-damdafa-com-openapi.json