v1

latestOpenAPI 3.1.02026-07-247328324.6 KB
Sales
snbx

🧪 Update a sale transaction

patch/sellers/{seller_id}/sale-transactions/{id}

Path parameters

seller_idstring required

An object id with prefix

Example:user_0123456789ABCDEFGHIJKLMNOPq

An object id with prefix

idstring required

An object id with prefix

Example:user_0123456789ABCDEFGHIJKLMNOPq

An object id with prefix

Headers

if-matchstring date-time required

ETag value for Optimistic Concurrency Control (OCC). Should contain the last known updated_at timestamp in ISO 8601 format.

Example:2024-01-15T10:30:00Z

ETag value for Optimistic Concurrency Control (OCC). Should contain the last known updated_at timestamp in ISO 8601 format.

Request body

amountinteger

Gross sale amount charged to buyer

createdstring date-time

Date of sale transaction

currencystring

Currency of sale transaction (ISO-4217)

feeinteger

Fee amount charged by payment processor

netinteger

Net amount received by seller after processor fees

reporting_categorystring

Reporting category used for financial purposes

available_onstring date-time nullable

Date of payout from payment processor

buyer_idstring nullable

Identifier for the buyer

subscription_idstring nullable

Identifier for the subscription

sourcestring nullable

External identifier indicating the source of the sale transaction

descriptionstring nullable

Description of the sale transaction

exchange_ratenumber nullable

Exchange rate used for the sale transaction

metadataobject nullable

Additional metadata associated with the sale transaction

Example request

{
  "amount": 10000,
  "created": "2024-01-15T10:30:00Z",
  "currency": "USD",
  "fee": 10000,
  "net": 10000,
  "available_on": "2024-01-15T10:30:00Z",
  "buyer_id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "subscription_id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "exchange_rate": -50.25,
  "fee_details": [
    {
      "amount": 10000,
      "currency": "USD"
    }
  ],
  "metadata": {
    "key": "value"
  }
}

Response

Successful operation

amountinteger required

Gross sale amount charged to buyer

createdstring date-time required

Date of sale transaction

currencystring required

Currency of sale transaction (ISO-4217)

feeinteger required

Fee amount charged by payment processor

netinteger required

Net amount received by seller after processor fees

reporting_categorystring required

Reporting category used for financial purposes

available_onstring date-time

Date of payout from payment processor

buyer_idstring

Identifier for the buyer

subscription_idstring

Identifier for the subscription

sourcestring

External identifier indicating the source of the sale transaction

descriptionstring

Description of the sale transaction

exchange_ratenumber

Exchange rate used for the sale transaction

metadataobject

Additional metadata associated with the sale transaction

payout_idstring

ID of the ledger entry for the associated payout

idstring required

An object id with prefix

created_atstring date-time required

Creation date and time

created_bystring required

ID of the user that created this object

updated_atstring date-time required

Last update date and time

updated_bystring required

ID of the user that last updated this object

Example response

{
  "amount": 10000,
  "created": "2024-01-15T10:30:00Z",
  "currency": "USD",
  "fee": 10000,
  "net": 10000,
  "available_on": "2024-01-15T10:30:00Z",
  "buyer_id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "subscription_id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "exchange_rate": -50.25,
  "fee_details": [
    {
      "amount": 10000,
      "currency": "USD"
    }
  ],
  "metadata": {
    "key": "value"
  },
  "payout_id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "id": "user_0123456789ABCDEFGHIJKLMNOPq",
  "created_at": "2024-01-15T10:30:00Z",
  "created_by": "user_0123456789ABCDEFGHIJKLMNOPq",
  "updated_at": "2024-01-15T10:30:00Z",
  "updated_by": "user_0123456789ABCDEFGHIJKLMNOPq"
}