Skip to main content
Register in-game payment records. Registered payments are automatically attributed to the user’s boosted 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)

Optional Parameters

FieldTypeDescription
productNamestringProduct name
callbackIdstringWebhook tracking ID (included in webhook events)
isTestbooleanTest mode (does not create actual data)

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

Bulk Payment

Register up to 1,000 payments at once. Request
curl -X POST "https://sandbox-sdk-api.playcamp.io/v1/server/payments/bulk" \
  -H "Authorization: Bearer ak_server_xxx:secret" \
  -H "Content-Type: application/json" \
  -d '{
    "payments": [
      {
        "userId": "user_1",
        "transactionId": "txn_001",
        "productId": "gem_pack_100",
        "amount": 9900,
        "currency": "KRW",
        "platform": "iOS",
        "distributionType": "MOBILE_STORE",
        "purchasedAt": "2026-03-17T00:00:00Z"
      },
      {
        "userId": "user_2",
        "transactionId": "txn_002",
        "productId": "gem_pack_200",
        "amount": 19900,
        "currency": "KRW",
        "platform": "Android",
        "distributionType": "MOBILE_STORE",
        "purchasedAt": "2026-03-17T00:00:00Z"
      }
    ],
    "callbackId": "bulk-001"
  }'
Response (200 OK)
{
  "data": {
    "totalRequested": 2,
    "successful": 2,
    "failed": 0,
    "skipped": 0,
    "results": [
      {
        "transactionId": "txn_001",
        "status": "SUCCESS",
        "data": { "id": 1234, "transactionId": "txn_001", "userId": "user_1" }
      },
      {
        "transactionId": "txn_002",
        "status": "SUCCESS",
        "data": { "id": 1235, "transactionId": "txn_002", "userId": "user_2" }
      }
    ]
  }
}

Bulk Payment Parameters

FieldTypeDescription
paymentsarrayPayment items array (max 1,000). Each item has the same required parameters as single payment
callbackIdstringWebhook tracking ID (optional)
isTestbooleanTest mode (optional)

Result Status

StatusDescription
SUCCESSPayment registered successfully
SKIPPEDAlready existing transactionId (duplicate)
FAILEDRegistration failed (validation error, etc.)
Bulk payments support partial success. Even if some items fail, the remaining items are processed normally. A payment.bulk_created webhook event is triggered when the bulk payment completes.