Skip to main content
Version: 5.7.0

SysRecordTransaction

Records a manual transaction. Useful for stores that are not yet directly supported -- or for apps that doing purchases via other means - but still want to record them in brainCloud for reporting purposes.

ServiceOperation
appStoreSYS_RECORD_TRANSACTION

Method Parameters

ParameterDescription
profileIdProfile ID of the user.
storeIdIdentifies the store type. See the appendix for Store Ids. Use "_id" (prefix with an underscore) for custom ids.
itemIdItem ID of the product transaction to be recorded.
dataJsonTransaction details from the store's perspective.
receiptDataReceipt information.
promotionIdOptional ID of any promotion that applies.
processAwardsWhether to deliver rewards/items.
transactionIdUnique id identifying this transaction in the store. Uniqueness enforced across the app.
pricePrice in hundredths of the app's currency (e.g. cents)
sandboxWhether purchase is sandbox.
platformPlatform of the store, platform is only used for sending offboard events to downstream systesm. Can be empty string - or use value from platform ids here

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"userItemRewards": {
"sword001": {
"fac9e483-c958-46b9-a478-06c97a85e74a": {
"itemId": "fac9e483-c958-46b9-a478-06c97a85e74a",
"quantity": 1
}
}
},
"extra": {
"customAttr": "value"
},
"rewards": {
"extra": {
"customAttr": "value"
},
"currency": {
"bar": 10
},
"items": {
"sword001": {
"defId": "sword001",
"quantity": 1
}
}
},
"currencies": {
"currency": {
"bar": {
"consumed": 0,
"balance": 30,
"purchased": 10,
"awarded": 20,
"revoked": 0
},
"coins": {
"consumed": 0,
"balance": 24,
"purchased": 0,
"awarded": 24,
"revoked": 0
}
}
}
},
"status": 200
}