curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "12345678",
"purchaseId": "abc123xyz789",
"appChargePaymentId": "pay_9876543210",
"purchaseDateAndTimeUtc": "2024-07-21T14:17:27.329Z",
"playerId": "player_12345",
"bundleName": "Starter Pack",
"bundleId": "684044555ed01178ed2c0b3b",
"sku": "starterpack",
"products": [
{
"amount": 1000,
"sku": "prod22224448763533",
"name": "Gold Coins"
}
],
"priceInDollar": 999,
"priceInCents": 999,
"subTotal": 850,
"tax": 149,
"taxRate": 17.5,
"taxInDollar": 149,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "purchase",
"actionStatus": "completed",
"originalPriceInDollar": 1499,
"paymentPriceInDollar": 999,
"paymentMethod": "card",
"countryCode2": "US",
"priceTotalInDollar": 1148,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_abc123",
"estimatedPublisherNetAmount": 850.50,
"estimatedAppchargeFee": 148.50,
"pricePointMetadata": 999,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"promoCodeName": "SUMMER2024",
"discount": 100.0,
"discountRatePoints": "10",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType": "Bundle",
"utms": {
"utmSource": "Facebook",
"utmMedium": "email",
"utmCampaign": "spring_sale"
}
}
}'
curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "662345678",
"purchaseId": "6abc123xyz789",
"appChargePaymentId": "pay_6876543210",
"purchaseDateAndTimeUtc": "",
"playerId": "player_12345",
"bundleName": "First Daily Bonus",
"bundleId": "664044555ed01178ed2c0b36",
"sku": "first-daily-bonus",
"products": [
{
"amount": 400,
"sku": "prod62224448763536",
"name": "Gold Coins"
}
],
"priceInDollar": 0,
"priceInCents": 0,
"subTotal": 0,
"tax": 0,
"taxRate": 0,
"taxInDollar": 0,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "bonus",
"actionStatus": "completed",
"originalPriceInDollar": 0,
"paymentPriceInDollar": 0,
"paymentMethod": "",
"playerIp": "192.0.2.1",
"priceTotalInDollar": 0,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_6abc123",
"estimatedPublisherNetAmount": 0,
"estimatedAppchargeFee": 148.50,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"discount": 0,
"discountRatePoints": "0",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType:" "PopUp"
}
}'
{
"publisherPurchaseId": "222673459829966773354378"
}
{
"publisherPurchaseId": "662673459829966773354378"
}
{
"publisherErrorMessage": "Unable to grant the award because the player ID is invalid."
}
{
"publisherErrorMessage": "Unable to grant the award because the inventory service is unavailable."
}
Grant Award Callback
Note: This is a callback API. Appcharge calls this endpoint on your server when specific events occur.
Notifies your system to grant an award to a customer.
Appcharge calls this endpoint after a customer payment is finalized or when a free offer is collected. When your server responds with a valid publisherPurchaseId, Appcharge redirects the customer to the success page confirming their purchase.
Warning: The
playerEmail,createdByIp, andzipCodeproperties are deprecated. They will continue to be included in callback payloads for backward compatibility until November 27, 2026, but we recommend removing any logic that reads or stores these values as soon as possible. After this date, these properties will be removed from the payload and won’t be supported or accessible.
curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "12345678",
"purchaseId": "abc123xyz789",
"appChargePaymentId": "pay_9876543210",
"purchaseDateAndTimeUtc": "2024-07-21T14:17:27.329Z",
"playerId": "player_12345",
"bundleName": "Starter Pack",
"bundleId": "684044555ed01178ed2c0b3b",
"sku": "starterpack",
"products": [
{
"amount": 1000,
"sku": "prod22224448763533",
"name": "Gold Coins"
}
],
"priceInDollar": 999,
"priceInCents": 999,
"subTotal": 850,
"tax": 149,
"taxRate": 17.5,
"taxInDollar": 149,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "purchase",
"actionStatus": "completed",
"originalPriceInDollar": 1499,
"paymentPriceInDollar": 999,
"paymentMethod": "card",
"countryCode2": "US",
"priceTotalInDollar": 1148,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_abc123",
"estimatedPublisherNetAmount": 850.50,
"estimatedAppchargeFee": 148.50,
"pricePointMetadata": 999,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"promoCodeName": "SUMMER2024",
"discount": 100.0,
"discountRatePoints": "10",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType": "Bundle",
"utms": {
"utmSource": "Facebook",
"utmMedium": "email",
"utmCampaign": "spring_sale"
}
}
}'
curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "662345678",
"purchaseId": "6abc123xyz789",
"appChargePaymentId": "pay_6876543210",
"purchaseDateAndTimeUtc": "",
"playerId": "player_12345",
"bundleName": "First Daily Bonus",
"bundleId": "664044555ed01178ed2c0b36",
"sku": "first-daily-bonus",
"products": [
{
"amount": 400,
"sku": "prod62224448763536",
"name": "Gold Coins"
}
],
"priceInDollar": 0,
"priceInCents": 0,
"subTotal": 0,
"tax": 0,
"taxRate": 0,
"taxInDollar": 0,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "bonus",
"actionStatus": "completed",
"originalPriceInDollar": 0,
"paymentPriceInDollar": 0,
"paymentMethod": "",
"playerIp": "192.0.2.1",
"priceTotalInDollar": 0,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_6abc123",
"estimatedPublisherNetAmount": 0,
"estimatedAppchargeFee": 148.50,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"discount": 0,
"discountRatePoints": "0",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType:" "PopUp"
}
}'
{
"publisherPurchaseId": "222673459829966773354378"
}
{
"publisherPurchaseId": "662673459829966773354378"
}
{
"publisherErrorMessage": "Unable to grant the award because the player ID is invalid."
}
{
"publisherErrorMessage": "Unable to grant the award because the inventory service is unavailable."
}
curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "12345678",
"purchaseId": "abc123xyz789",
"appChargePaymentId": "pay_9876543210",
"purchaseDateAndTimeUtc": "2024-07-21T14:17:27.329Z",
"playerId": "player_12345",
"bundleName": "Starter Pack",
"bundleId": "684044555ed01178ed2c0b3b",
"sku": "starterpack",
"products": [
{
"amount": 1000,
"sku": "prod22224448763533",
"name": "Gold Coins"
}
],
"priceInDollar": 999,
"priceInCents": 999,
"subTotal": 850,
"tax": 149,
"taxRate": 17.5,
"taxInDollar": 149,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "purchase",
"actionStatus": "completed",
"originalPriceInDollar": 1499,
"paymentPriceInDollar": 999,
"paymentMethod": "card",
"countryCode2": "US",
"priceTotalInDollar": 1148,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_abc123",
"estimatedPublisherNetAmount": 850.50,
"estimatedAppchargeFee": 148.50,
"pricePointMetadata": 999,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"promoCodeName": "SUMMER2024",
"discount": 100.0,
"discountRatePoints": "10",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType": "Bundle",
"utms": {
"utmSource": "Facebook",
"utmMedium": "email",
"utmCampaign": "spring_sale"
}
}
}'
curl -X POST \
'https://{YOUR_GRANT_AWARD_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"orderId": "662345678",
"purchaseId": "6abc123xyz789",
"appChargePaymentId": "pay_6876543210",
"purchaseDateAndTimeUtc": "",
"playerId": "player_12345",
"bundleName": "First Daily Bonus",
"bundleId": "664044555ed01178ed2c0b36",
"sku": "first-daily-bonus",
"products": [
{
"amount": 400,
"sku": "prod62224448763536",
"name": "Gold Coins"
}
],
"priceInDollar": 0,
"priceInCents": 0,
"subTotal": 0,
"tax": 0,
"taxRate": 0,
"taxInDollar": 0,
"currency": "USD",
"currencyExchangeCost": 0,
"action": "bonus",
"actionStatus": "completed",
"originalPriceInDollar": 0,
"paymentPriceInDollar": 0,
"paymentMethod": "",
"playerIp": "192.0.2.1",
"priceTotalInDollar": 0,
"playerEmail": "john.doe@example.com",
"sessionMetadata": "{
"userId": "12345",
"level":10
}",
"receiptId": "receipt_6abc123",
"estimatedPublisherNetAmount": 0,
"estimatedAppchargeFee": 148.50,
"createdByIp": "192.168.1.1",
"zipCode": "10001",
"awardFlow": "auto",
"discount": 0,
"discountRatePoints": "0",
"storeMetadata": {
"productsSequenceIndex": 1,
"offerType:" "PopUp"
}
}'
{
"publisherPurchaseId": "222673459829966773354378"
}
{
"publisherPurchaseId": "662673459829966773354378"
}
{
"publisherErrorMessage": "Unable to grant the award because the player ID is invalid."
}
{
"publisherErrorMessage": "Unable to grant the award because the inventory service is unavailable."
}
Body
Two-letter country code in ISO-3166 alpha-2 format. Required if playerIp is not provided. Example: US.
"US"
Player IP address in IPv4 format. Required if countryCode2 is not provided. Example: 192.0.2.1.
Deprecated. IP address in IPv4 format from which the order was made.
"192.168.1.1"
Response
Successfully granted award to customer.
Publisher purchase ID for this transaction. Return this value after granting the award so Appcharge can confirm fulfillment and pair it with the Appcharge orderId for reconciliation. Learn more in Before you begin.
"222673459829966773354378"
Was this page helpful?
