VoidhashDocs
DevelopersHelp centerGuidesAPI reference
Dashboard
Get started
Introduction
Quickstart
How Voidhash works
Glossary
Versions and releases
Concepts
Teams, projects and environments
API keys
Products and perks
Offers
Subscription lifecycle
People and identity
Events
Features
Paywalls in your app
Feature flags and A/B tests
Paywall components
Push notifications
Ad attribution in your app
Client SDKs
React Native
Swift
Kotlin
Web
Your backend
Node.js
PHP
Go
Rust
Other languages
Payment sources
Forward store notifications
Developer tools
CLI
MCP server
Query analytics with VoidQL
Payment sources
Transaction fields
Report subscriptions
Build a provider endpoint

Transaction fields

The fields of a payment source's transaction reports and responses, and the errors they return.

A payment source reports each payment and refund with PUT on its Transactions endpoint, under an ID that's unique within the source. See Report a payment.

Request

FieldMeaning
typecharge for a payment, refund to return money.
distinctIdThe person's distinct ID.
customer.externalIdYour source's ID for the customer, when you have no distinct ID.
productKeyThe mapped product key. Charges only.
amountWhat the customer paid, tax included, in minor units (4900 is 49.00).
currencyISO 4217 code, such as EUR. Analytics converts it to USD at the day's rate.
feeOptional. The source's commission, so proceeds are what you receive.
taxOptional. The tax included in amount.
occurredAtWhen the customer paid. Revenue is dated by it.
subscriptionId, periodStart, periodEndFor a subscription payment: the subscription and the period it pays for.
refundsTransactionIdFor a refund: the ID of the charge it returns money from.
environmentOptional. production or test; must match the key, or the request is rejected.

A charge without subscriptionId completes a one-time purchase.

Response

The response is the recorded transaction:

FieldMeaning
id, paymentProviderId, typeYour ID, the source, and charge or refund.
statusapplied once recorded, or pending while it waits.
pendingReasonproduct_not_mapped (map the product key) or charge_not_recorded (report the charge a refund or subscription refers to). null when applied.
purchaseIdThe Voidhash purchase it belongs to, once applied.
bookedAmountWhat it recorded. A refund books less than its amount when less was left of the charge.

Errors

A rejected request records nothing and doesn't use up its ID.

CodeTypeMeaning
transaction_conflictconflictThe ID is recorded with other content. Retrying can't help.
invalid_transactioninvalid_requestThe payment breaks a rule, such as a refund in another currency.
invalid_subscriptioninvalid_requestThe subscription state can't be recorded as sent.
payment_source_requiredinvalid_requestThe payment provider ID names a store, not a payment source.
payment_provider_not_foundnot_foundThe project has no payment provider with that ID.
payment_source_disabledconflictThe source is disabled in Studio.

See Errors for the error format and every type, and Retries and corrections for when to resend.

Next steps

  • Payment sources: set up a source and report payments.
  • Report subscriptions: subscription payments and state.
  • Build a provider endpoint: import products and history.

Something wrong or missing on this page? Tell us by email or on Discord.

PreviousPayment sourcesNextReport subscriptions

On this page

RequestResponseErrorsNext steps