PayNow

Customer

Authenticate customer

POSThttps://api.paynow.gg/v1/store/customer/auth

Creates a customer and returns a customer token from a platform account.

Headers
x-paynow-store-idstringRequired
PayNow Store Identifier (Store ID) available in Store Settings
x-paynow-customer-ipstringOptional
The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.
x-paynow-customer-countrycodestringOptional
The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.
Request body
idstringRequired
The account ID on the platform
platformenumRequired
Possible enum values
  • invalid
  • steam

    Steam profile platform - the ID param must be a Steam ID 64.

  • minecraft

    Minecraft profile platform - the ID param must be a Minecraft nick. If your store platform is Geyser, this automatically sets the Minecraft platform based on the prefix configured in store settings.

  • paynow_name

    PayNow name profile platform - the ID param must be a PayNow username.

  • paynow

    PayNow name profile platform - the ID param must be a PayNow username.

  • minecraft_java_name

    Minecraft Java Profile Platform - the ID param must be a Java minecraft nick.

  • minecraft_bedrock_name

    Minecraft Bedrock Profile Platform - the ID param must be a Bedrock minecraft nick.

  • xbox_xuid

    Minecraft Xbox XUID Profile Platform - the ID param must be an xbox xuid

  • minecraft_uuid

    Minecraft profile platform - the ID param must be a Minecraft UUID.

Response
200OKAuthenticateStorefrontCustomerResponseDto
Show fields
customer_tokenstringRequired
The token for the Customer

Failed requests return a PayNowError body. See the error response guide.

curl -X POST "https://api.paynow.gg/v1/store/customer/auth" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "76561198152492642",
  "platform": "invalid"
}'
Response200
{
  "customer_token": "string"
}

Get current customer

GEThttps://api.paynow.gg/v1/store/customer

Retrieves the current customer from the passed Customer token.

Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
Response
200OKCustomerDto
Represents a customer in the PayNow system with their associated profiles and metadata.
Show fields
created_atstringRequired
The date and time when the customer was created in the system.
idFlakeIdRequired
metadataobjectRequired
Additional custom data associated with the customer.
store_idFlakeIdRequired
minecraftCustomerMinecraftProfileDtoOptional
Represents a Minecraft profile for a customer.
avatar_urlstringRequired
The URL to the player's Minecraft skin rendered as an avatar.
idstringRequired
The UUID of the Minecraft player. If the platform is Minecraft Offline, this will be the name itself. If the platform is Minecraft Geyser, and this is a Bedrock account, this ID will be an Xbox XUID.
namestringRequired
The username of the Minecraft player.
minecraft_platformenumOptional
Possible enum values
  • unknown
  • java
  • bedrock
minecraft_uuidstringOptional
The customer's Minecraft UUID, if they have linked their Minecraft account. Not set for offline Minecraft stores. If the platform type is Minecraft - Geyser, and the profile is a bedrock account, this will be a UUID generated from the Xbox XUID.
namestringOptional
The display name for the customer.
profileCustomerGenericProfileDtoOptional
Represents a generic platform profile for a customer.
idstringRequired
The platform-specific identifier for the profile.
namestringRequired
The display name of the user on this platform.
platformstringRequired
The name of the platform this profile belongs to.
avatar_urlstringOptional
The URL to the user's avatar image on this platform.
steamCustomerSteamProfileDtoOptional
Represents a Steam profile for a customer.
avatar_urlstringRequired
The URL to the user's Steam avatar image.
idSteamIdRequired
A 64-bit Steam account identifier. Accepts string or numeric format.
namestringRequired
The display name of the user on Steam.
steam_idSteamIdOptional
A 64-bit Steam account identifier. Accepts string or numeric format.
updated_atstringOptional
The date and time when the customer was last updated, if applicable.
xbox_xuidstringOptional
The customer's Xbox XUID, if available.

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/store/customer" \
  -H "Authorization: Customer TOKEN"
Response200
{
  "created_at": "2024-01-01T00:00:00Z",
  "id": "411486491630370816",
  "metadata": {},
  "store_id": "411486491630370816",
  "profile": {
    "id": "string",
    "name": "string",
    "platform": "steam",
    "avatar_url": "string"
  },
  "steam_id": "76561197960287930",
  "steam": {
    "avatar_url": "string",
    "id": "76561197960287930",
    "name": "string"
  },
  "minecraft_uuid": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
  "minecraft": {
    "avatar_url": "string",
    "id": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
    "name": "notch"
  },
  "xbox_xuid": "string",
  "minecraft_platform": "unknown",
  "name": "m0uka",
  "updated_at": "2024-01-01T00:00:00Z"
}

Lookup a gift card by the code

GEThttps://api.paynow.gg/v1/store/customer/giftcards/lookup/{code}
Headers
AuthorizationCustomer tokenRequired
Authentication token for this request, sent as Authorization: Customer TOKEN.
Path parameters
codestringRequired
Response
200OKStorefrontGiftCardDto
Show fields
balanceintegerRequired
codestringRequired
starting_balanceintegerRequired
expires_atstringOptional

Failed requests return a PayNowError body. See the error response guide.

curl -X GET "https://api.paynow.gg/v1/store/customer/giftcards/lookup/{code}" \
  -H "Authorization: Customer TOKEN"
Response200
{
  "balance": 0,
  "code": "string",
  "starting_balance": 0,
  "expires_at": "2024-01-01T00:00:00Z"
}