Get an Orders Report
curl --request POST \
--url https://api-sandbox.appcharge.com/reporting/reports/orders \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '
{
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"recordLimit": 123,
"offset": 123,
"statuses": [],
"isFree": false
}
'import requests
url = "https://api-sandbox.appcharge.com/reporting/reports/orders"
payload = {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"recordLimit": 123,
"offset": 123,
"statuses": [],
"isFree": False
}
headers = {
"x-publisher-token": "<x-publisher-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-publisher-token': '<x-publisher-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
recordLimit: 123,
offset: 123,
statuses: [],
isFree: false
})
};
fetch('https://api-sandbox.appcharge.com/reporting/reports/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.appcharge.com/reporting/reports/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'recordLimit' => 123,
'offset' => 123,
'statuses' => [
],
'isFree' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-publisher-token: <x-publisher-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/reporting/reports/orders"
payload := strings.NewReader("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.appcharge.com/reporting/reports/orders")
.header("x-publisher-token", "<x-publisher-token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/reporting/reports/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}"
response = http.request(request)
puts response.read_body{
"totalCount": 123,
"results": [
{
"acOrderId": "<string>",
"publisherId": "<string>",
"currency": "<string>",
"currencyExchangeCost": 123,
"priceInCents": 123,
"priceInDollar": 123,
"priceNetInDollar": 123,
"subTotal": 123,
"originalPriceInDollar": 123,
"acOfferId": "<string>",
"publisherOfferId": "<string>",
"offerName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"playerId": "<string>",
"state": "<string>",
"offerDetails": {
"products": [
{
"name": "<string>",
"publisherProductId": "<string>",
"amount": 123,
"price": 123,
"currencyCode": "<string>",
"description": "<string>",
"sku": "<string>",
"type": "<string>",
"sessionMetadata": "<string>"
}
],
"playerGeo": {}
},
"tax": 123,
"taxInDollar": 123,
"paymentMethod": "<string>",
"zipCode": "<string>",
"playerEmail": "<string>",
"estimatedPublisherNetAmount": 123,
"estimatedAppchargeFee": 123,
"receiptId": "<string>",
"currencySymbol": "<string>",
"reason": "<string>",
"discount": 123,
"discountRatePoints": 123,
"promoCodeName": "<string>",
"pricePointMetaData": 123
}
]
}{
"statusCode": 123,
"error": "<string>",
"message": [
{
"validationErrorNumber": 123,
"error": "<string>",
"requestUrl": "<string>"
}
]
}Finance and Analytics
Financial Reporting API
POST
/
reporting
/
reports
/
orders
Get an Orders Report
curl --request POST \
--url https://api-sandbox.appcharge.com/reporting/reports/orders \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '
{
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"recordLimit": 123,
"offset": 123,
"statuses": [],
"isFree": false
}
'import requests
url = "https://api-sandbox.appcharge.com/reporting/reports/orders"
payload = {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"recordLimit": 123,
"offset": 123,
"statuses": [],
"isFree": False
}
headers = {
"x-publisher-token": "<x-publisher-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-publisher-token': '<x-publisher-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
recordLimit: 123,
offset: 123,
statuses: [],
isFree: false
})
};
fetch('https://api-sandbox.appcharge.com/reporting/reports/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.appcharge.com/reporting/reports/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'recordLimit' => 123,
'offset' => 123,
'statuses' => [
],
'isFree' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-publisher-token: <x-publisher-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/reporting/reports/orders"
payload := strings.NewReader("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.appcharge.com/reporting/reports/orders")
.header("x-publisher-token", "<x-publisher-token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/reporting/reports/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"recordLimit\": 123,\n \"offset\": 123,\n \"statuses\": [],\n \"isFree\": false\n}"
response = http.request(request)
puts response.read_body{
"totalCount": 123,
"results": [
{
"acOrderId": "<string>",
"publisherId": "<string>",
"currency": "<string>",
"currencyExchangeCost": 123,
"priceInCents": 123,
"priceInDollar": 123,
"priceNetInDollar": 123,
"subTotal": 123,
"originalPriceInDollar": 123,
"acOfferId": "<string>",
"publisherOfferId": "<string>",
"offerName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"playerId": "<string>",
"state": "<string>",
"offerDetails": {
"products": [
{
"name": "<string>",
"publisherProductId": "<string>",
"amount": 123,
"price": 123,
"currencyCode": "<string>",
"description": "<string>",
"sku": "<string>",
"type": "<string>",
"sessionMetadata": "<string>"
}
],
"playerGeo": {}
},
"tax": 123,
"taxInDollar": 123,
"paymentMethod": "<string>",
"zipCode": "<string>",
"playerEmail": "<string>",
"estimatedPublisherNetAmount": 123,
"estimatedAppchargeFee": 123,
"receiptId": "<string>",
"currencySymbol": "<string>",
"reason": "<string>",
"discount": 123,
"discountRatePoints": 123,
"promoCodeName": "<string>",
"pricePointMetaData": 123
}
]
}{
"statusCode": 123,
"error": "<string>",
"message": [
{
"validationErrorNumber": 123,
"error": "<string>",
"requestUrl": "<string>"
}
]
}When a player makes a purchase, Appcharge processes the transaction. After the player is charged, Appcharge sends an update to the publisher with all the transaction details using a predefined webhook.
Statuses Parameter Options
This table lists the possible values for thestatuses parameter, each representing a different stage or outcome of a transaction. The values range from the initial creation of a transaction to the various stages of payment, refund, charge, and dispute processes.
| Status | Description |
|---|---|
| created | The order has been created. |
| payment_pending | The transaction has been initiated, but payment information has not yet been submitted. |
| payment_expired | The checkout session has expired after being open for 1 hour. |
| payment_failed | Failed to initiate a payment, and the award was not granted. |
| payment_refund_pending | Refund has been requested and is awaiting processing. |
| payment_refund_requires_action | Additional action is needed to process the refund. |
| payment_refunded | Refund has been successfully processed. |
| payment_refund_failed | Refund attempt was unsuccessful. |
| payment_refund_canceled | Refund process has been canceled. |
| payment_canceled | Payment has been canceled. |
| charge_pending | The award is being processed but is not yet completed. |
| charge_succeed | Payment was successful, and the award was granted. |
| charge_failed | The award attempt was unsuccessful. |
| payment_dispute_open | A dispute has been opened against the payment. |
| payment_dispute_lost | The dispute has been resolved in favor of the customer. |
| payment_dispute_won | The dispute has been resolved in favor of the merchant. |
| payment_dispute_evidence_submitted | Evidence has been submitted for the dispute. |
| payment_dispute_inquiry_open | An inquiry has been opened regarding a potential dispute. |
| payment_dispute_inquiry_evidence_submitted | Evidence has been submitted for the dispute inquiry. |
| payment_dispute_inquiry_won | The inquiry has been resolved in favor of the merchant. |
Body
application/json
List of order statuses to filter by. Pass an empty list to retrieve reports for all statuses.
Available options:
created, payment_pending, payment_expired, payment_failed, payment_refund_pending, payment_refund_requires_action, payment_refunded, payment_refund_failed, payment_refund_canceled, payment_canceled, charge_pending, charge_succeed, charge_failed, payment_dispute_open, payment_dispute_lost, payment_dispute_won, payment_dispute_evidence_submitted, payment_dispute_inquiry_open, payment_dispute_inquiry_evidence_submitted, payment_dispute_inquiry_won Was this page helpful?
