VoidhashDocs
DocumentationAPI reference
Dashboard
Essentials
API overview
Authentication
Endpoints
Ad_accounts
Analytics
Api_keys
Session
Component_dev_sessions
Component_registry
Components
Sandbox
Events
Experiments
Feature_flags
Ingest_policy
Push_notifications
Organizations
Payment_providers
Payment_provider_products
Payment_sources
Paywall_locations
Paywalls
Perks
Persons
Products
Projects
Push_notification_configurations
Schema
Sdk
Me
Webhooks
Audit_log
Organization_members
Notices
Connected_apps
Tracking_domains
Ads
Payment_provider_history_imports
Feedback
Analytics
Event capture
Upsert Transaction
Refund Transaction
Upsert Subscription
Cancel Subscription

Upsert Transaction

PreviousActivateNextRefund Transaction
PUT
/api/v1/projects/{projectId}/payment-providers/{paymentProviderId}/transactions/{externalId}

Path Parameters

projectId*string
paymentProviderId*string
externalId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

type*string

Value in

  • "charge"
  • "refund"
distinctId?string|null
customer?|null
productKey?string|null
amount*integer
Range-9007199254740991 <= value <= 9007199254740991
currency*string
fee?|null
tax?|null
occurredAt*string
subscriptionId?string|null
periodStart?string|null
periodEnd?string|null
refundsTransactionId?string|null
environment?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v1/projects/string/payment-providers/string/transactions/string" \  -H "Content-Type: application/json" \  -d '{    "type": "charge",    "amount": -9007199254740991,    "currency": "string",    "occurredAt": "string"  }'
{  "id": "string",  "paymentProviderId": "string",  "type": "charge",  "status": "applied",  "pendingReason": "product_not_mapped",  "purchaseId": "string",  "bookedAmount": -9007199254740991}
{  "error": {    "type": "invalid_request",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "unauthenticated",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "permission_denied",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "not_found",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "conflict",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "internal",    "code": "string",    "message": "string",    "param": "string"  }}