Skip to main content
Register in-game payment records. Registered payments are automatically attributed to the user’s sponsored creator.

Flow

1. In-game payment complete  →  2. Send payment info via API  →  3. Creator attribution + settlement

Create Payment

Request
curl -X POST "https://sandbox-sdk-api.playcamp.io/v1/server/payments" \
  -H "Authorization: Bearer ak_server_xxx:secret" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_12345",
    "transactionId": "txn_abc123",
    "productId": "gem_pack_100",
    "productName": "100 Gem Pack",
    "amount": 9900,
    "currency": "KRW",
    "platform": "Android",
    "distributionType": "MOBILE_STORE",
    "purchasedAt": "2024-01-15T10:30:00.000Z"
  }'
Response (201 Created)
{
  "data": {
    "id": 1234,
    "transactionId": "txn_abc123",
    "userId": "user_12345",
    "productId": "gem_pack_100",
    "productName": "100 Gem Pack",
    "amount": 9900,
    "currency": "KRW",
    "platform": "Android",
    "campaignId": "campaign_001",
    "creatorKey": "ABC12",
    "status": "COMPLETED",
    "purchasedAt": "2024-01-15T10:30:00.000Z",
    "createdAt": "2024-01-15T10:30:05.000Z"
  }
}

Required Parameters

FieldTypeDescription
userIdstringIn-game user identifier
transactionIdstringPlatform-specific unique transaction ID (for deduplication)
productIdstringProduct ID
amountnumberPayment amount
currencystringCurrency code (ISO 4217: USD, KRW recommended)
platformstringPlatform (iOS, Android, Web, Roblox, Other)
distributionTypestringDistribution type (see below)
purchasedAtstringActual payment timestamp (ISO 8601)

Distribution Type (Required)

distributionType is a required parameter when registering payments. It’s used for settlement calculation.
ValueDescriptionStore Fee
MOBILE_STOREMobile external store (Google Play, App Store)30%
PC_STOREPC external store (Steam, etc.)30%
MOBILE_SELF_STOREMobile self-payment0%
PC_SELF_STOREPC self-published store0%
Settlement Calculation: Net Amount = Payment Amount × (1 - Store Fee), then PlayCamp platform fee and creator fee are applied separately.Important: Specify the value matching the actual distribution channel where the payment occurred for accurate settlement.

Currency Conversion

For non-USD currencies, amount is automatically converted to USD (amountUsd field).
// KRW payment example
{ amount: 9900, currency: "KRW" }
// → amountUsd: 7.62 (auto-calculated)

Refund Payment

curl -X POST "https://sandbox-sdk-api.playcamp.io/v1/server/payments/txn_abc123/refund" \
  -H "Authorization: Bearer ak_server_xxx:secret" \
  -H "Content-Type: application/json" \
  -d '{}'
Refunded amounts are deducted from settlement.

Error Handling

HTTPCodeDescription
400VALIDATION_ERRORMissing required parameter
409CONFLICTDuplicate transactionId