Skip to main content
POST
/
v1
/
server
/
payments
Create Payment
curl --request POST \
  --url https://sdk-api.playcamp.io/v1/server/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "<string>",
  "transactionId": "<string>",
  "productId": "<string>",
  "amount": 1.01,
  "currency": "<string>",
  "platform": "iOS",
  "distributionType": "MOBILE_STORE",
  "purchasedAt": "2023-11-07T05:31:56Z",
  "productName": "<string>",
  "isTest": false
}
'
{
  "data": {
    "id": 123,
    "transactionId": "<string>",
    "userId": "<string>",
    "productId": "<string>",
    "productName": "<string>",
    "amount": 123,
    "currency": "<string>",
    "amountUsd": 123,
    "platform": "iOS",
    "distributionType": "MOBILE_STORE",
    "status": "COMPLETED",
    "campaignId": "<string>",
    "creatorKey": "<string>",
    "purchasedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Server API Key (format: {keyId}:{secret})

Body

application/json
userId
string
required

User ID

transactionId
string
required

Unique transaction ID (provided by platform)

productId
string
required

Product ID

amount
number
required

Payment amount

Required range: x >= 0.01
currency
string
required

Currency code (ISO 4217, required)

  • USD, KRW recommended
  • e.g., USD, KRW, JPY, EUR
platform
enum<string>
required

Payment platform

Available options:
iOS,
Android,
Web,
Roblox,
Other
distributionType
enum<string>
required

Distribution type (required, determines store fee):

  • MOBILE_STORE: Mobile external store (Google Play, App Store) - 30%
  • PC_STORE: PC external store (Steam, etc.) - 30%
  • MOBILE_SELF_STORE: Mobile self-payment - 0%
  • PC_SELF_STORE: PC self-store - 0%
Available options:
MOBILE_STORE,
MOBILE_SELF_STORE,
PC_STORE,
PC_SELF_STORE
purchasedAt
string<date-time>
required

Actual payment time (ISO 8601 UTC format)

  • Format: YYYY-MM-DDTHH:mm:ss.sssZ
  • Example: 2024-01-15T10:30:00.000Z
productName
string

Product name (optional)

isTest
boolean
default:false

Test mode (does not create actual data)

Response

Success

data
object
required