Store
A store in PayNow is the most important entity as it encapsulates almost all other entities. All products, customers, orders, payouts, etc. are isolated to each individual store. Stores are owned by a single user.
To access the store's information using a customer token, use the Storefront Store API.
It's all about the store.
The Store object
Fields
- Name
id
- Type
- flake
- Tags
- Description
id of the store
- Name
owner
- Type
- user
- Tags
- Description
the user that owns the store
- Name
slug
- Type
- string
- Tags
- Description
the unique url-safe identifier for the store. Is used for custom domain integration and hosted webstores.
- Name
name
- Type
- string
- Tags
- Description
the name of the store
- Name
game
- Type
- enum
- Tags
- Description
the game of the store
Allowed enum valuesrust
- Name
currency
- Type
- enum
- Tags
- Description
the currency of the store. Cannot be changed.
Allowed enum valuesusd
EUR
GBP
- Name
created_at
- Type
- timestamp
- Tags
- Description
timestamp of when the store was created
- Name
logo_url
- Type
- string
- Tags
- NULLABLE
- Description
a url to the main brand logo image for the store
- Name
logo_square_url
- Type
- string
- Tags
- NULLABLE
- Description
a url to the square logo image for the store
- Name
updated_by
- Type
- user
- Tags
- Description
the user that most recently updated the store
- Name
updated_at
- Type
- timestamp
- Tags
- NULLABLE
- Description
timestamp of when the store was last updated
- Name
members
- Type
- []store member
- Tags
- NULLABLE
- Description
an array of members who are part of this store. Will only be returned for the get store route.
Store Member Structure
Members are identified by the underlying user's ID.
Fields
- Name
user
- Type
- user
- Tags
- Description
the user that this member represents
- Name
role_id
- Type
- flake
- Tags
- NULLABLE
- Description
the role ID of this member
- Name
role
- Type
- role
- Tags
- NULLABLE
- Description
the role that this member has.
null
if no role is assigned. Only returned by the get store member route.
- Name
added_at
- Type
- timestamp
- Tags
- Description
timestamp of when the this member was added
The Store object
{
"id": "94688451781206016",
"owner": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"slug": "best-store-ever",
"name": "Best Store Ever",
"game": "rust",
"currency": "usd",
"created_at": "2023-04-11T05:20:28.13166Z",
"logo_url": "https://example.paynow.gg/image.webp",
"logo_square_url": "https://example.paynow.gg/square-image.webp",
"updated_by": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"updated_at": "2023-04-12T20:35:18.060399Z",
"members": [
{
"user": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"role_id": "136217825097293824",
"added_at": "2023-04-11T05:20:28.13166Z"
},
{...},
{...}
]
}
Update Store
Updates a store.
Parameters
- Name
slug
- Type
- string?
- Tags
- OPTIONAL
- Description
the unique url-safe slug used to identify this store (3 - 36 characters). Spaces will be converted to dashes, and all disallowed characters will be stripped.
- Name
name
- Type
- string?
- Tags
- OPTIONAL
- Description
the name of the store (1 - 50 characters)
Returns
Returns the updated store.
Request
Response
{
"id": "150439783699582976",
"owner": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"slug": "docs-example",
"name": "Docs Example",
"game": "rust",
"currency": "usd",
"created_at": "2023-04-14T01:36:21.47124312Z",
"logo_url": "https://example.paynow.gg/image.webp",
"logo_square_url": "https://example.paynow.gg/square-image.webp",
"updated_by": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"updated_at": "2023-04-14T01:40:21.34024311Z",
"members": null
}
Get Store
Request
Response
{
"id": "150439783699582976",
"owner": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"slug": "docs-example",
"name": "Docs Example",
"game": "rust",
"currency": "usd",
"created_at": "2023-04-14T01:36:21.47124312Z",
"logo_url": "https://example.paynow.gg/image.webp",
"logo_square_url": "https://example.paynow.gg/square-image.webp",
"updated_by": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"updated_at": "2023-04-14T01:40:21.34024311Z",
"members": null
}
Get Store Members
Request
Response
[
{
"user": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"role_id": "136217825097293824",
"added_at": "2023-04-14T01:36:21.47124312Z",
},
{...},
{...}
]
Get Store Member
Returns a member from the store.
Returns
Returns a store member.
the member's role
field is populated for this route.
Request
Response
{
"user": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"role_id": "136217825097293824",
"added_at": "2023-04-14T01:36:21.47124312Z",
"role": {
"id": "136217825097293824",
"store_id": "94688451781206016",
"name": "Admin",
"description": "Can do basically anything. Rules don't apply to them.",
"created_by": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"created_at": "2023-04-15T19:43:21.063196Z",
"updated_by": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"updated_at": "2023-04-15T19:50:22.968652Z"
}
}
Set Store Member Role
Updates a member's role.
Parameters
- Name
role_id
- Type
- flake
- Tags
- REQUIRED
- Description
the new role ID for the member
Returns
Returns the updated store member.
Request
Response
{
"user": {
"id": "11084680073842688",
"first_name": "Example",
"last_name": "Exampleson"
},
"role_id": "136217825097293824",
"added_at": "2023-04-14T01:36:21.47124312Z"
}