Orders

Orders represent transactions where customers purchase products. They can have different statuses such as created, completed, canceled, and refunded. Orders can be associated with a specific store, customer, checkout, or subscription.

See the order fields for more details and options.


The Order object

  • Fields

  • Name
    id
    Type
    int64
    Tags
    Description

    id of the order

  • Name
    pretty_id
    Type
    string
    Tags
    Description

    human-readable id of the order

  • Name
    store_id
    Type
    int64
    Tags
    Description

    id of the store the order belongs to

  • Name
    customer
    Type
    Customer
    Tags
    Description

    the customer associated with this order

  • Name
    status
    Type
    enum
    Tags
    Description

    status of the order

    Allowed enum values
    created
    completed
    canceled
    refunded
  • Name
    checkout_id
    Type
    int64
    Tags
    NULLABLE
    Description

    id of the checkout associated with the order

  • Name
    subscription_id
    Type
    int64
    Tags
    NULLABLE
    Description

    id of the subscription associated with the order

  • Name
    is_subscription
    Type
    boolean
    Tags
    Description

    whether the order is a subscription

  • Name
    coupon_id
    Type
    int64
    Tags
    NULLABLE
    Description

    id of the coupon applied to the order

  • Name
    giftcard_id
    Type
    int64
    Tags
    NULLABLE
    Description

    id of the giftcard applied to the order

  • Name
    billing_name
    Type
    string
    Tags
    NULLABLE
    Description

    billing name associated with the order

  • Name
    billing_email
    Type
    string
    Tags
    NULLABLE
    Description

    billing email associated with the order

  • Name
    billing_country
    Type
    string
    Tags
    NULLABLE
    Description

    billing country associated with the order

  • Name
    customer_ip
    Type
    string
    Tags
    NULLABLE
    Description

    the ip address of the customer associated with the order

  • Name
    currency
    Type
    string
    Tags
    Description

    currency of the order

  • Name
    tax_inclusive
    Type
    boolean
    Tags
    Description

    whether the order price is tax-inclusive

  • Name
    discount_amount
    Type
    integer
    Tags
    Description

    discount amount applied to the product in zero-decimal format (where "$10.00" is 1000)

  • Name
    discount_amount_str
    Type
    string
    Tags
    Description

    the discount amount in string format

  • Name
    subtotal_amount
    Type
    integer
    Tags
    Description

    subtotal amount of the line in zero-decimal format (where "$10.00" is 1000)

  • Name
    subtotal_amount_str
    Type
    string
    Tags
    Description

    subtotal amount of the line in string format

  • Name
    tax_amount
    Type
    integer
    Tags
    Description

    tax amount of the line in zero-decimal format (where "$10.00" is 1000)

  • Name
    tax_amount_str
    Type
    string
    Tags
    Description

    tax amount of the line in string format

  • Name
    giftcard_usage_amount
    Type
    int64
    Tags
    Description

    giftcard usage amount applied to the order in zero-decimal format (where "$10.00" is 1000)

  • Name
    giftcard_usage_amount_str
    Type
    string
    Tags
    Description

    giftcard usage amount applied to the order in string format

  • Name
    total_amount
    Type
    integer
    Tags
    Description

    tax amount of the order in zero-decimal format (where "$10.00" is 1000)

  • Name
    total_amount_str
    Type
    string
    Tags
    Description

    tax amount of the line in string format

  • Name
    billing_cycle_sequence
    Type
    int64
    Tags
    NULLABLE
    Description

    number of billing cycle sequence

  • Name
    last_payment_error
    Type
    LastPaymentError
    Tags
    NULLABLE
    Description

    shows the failure reason of the latest associated payment

  • Name
    lines
    Type
    []line
    Tags
    Description

    list of items associated with the order

  • Name
    created_at
    Type
    timestamp
    Tags
    Description

    timestamp of when the order was created

  • Name
    completed_at
    Type
    timestamp
    Tags
    NULLABLE
    Description

    timestamp of when the order was completed

  • Name
    canceled_at
    Type
    timestamp
    Tags
    NULLABLE
    Description

    timestamp of when the order was canceled

Order Line object structure

  • Fields

  • Name
    id
    Type
    flake
    Tags
    Description

    id of the order line

  • Name
    checkout_line_id
    Type
    flake
    Tags
    Description

    id of the checkout line this line belongs to

  • Name
    product_id
    Type
    flake
    Tags
    Description

    id of the associated product

  • Name
    product_version_id
    Type
    flake
    Tags
    Description

    version id of the associated product

  • Name
    product_name
    Type
    string
    Tags
    Description

    name of the product

  • Name
    product_image_url
    Type
    string
    Tags
    NULLABLE
    Description

    url of product image

  • Name
    subscription_interval_value
    Type
    integer
    Tags
    Description

    the interval value at which this product will renew when subscribed

  • Name
    subscription_interval_scale
    Type
    enum
    Tags
    Description

    the interval scale at which this product will renew when subscribed.

    Allowed enum values
    day
    week
    month
    year
  • Name
    gift
    Type
    boolean
    Tags
    Description

    whether the line is a gift

  • Name
    gift_to_customer
    Type
    Customer
    Tags
    NULLABLE
    Description

    the customer that is receiving this gift

  • Name
    selected_gameserver_id
    Type
    flake
    Tags
    NULLABLE
    Description

    the unique identifier of the selected game server, if applicable.

  • Name
    price
    Type
    integer
    Tags
    Description

    the price of this line in zero-decimal format (where "$10.00" is 1000)

  • Name
    price_str
    Type
    string
    Tags
    Description

    the price of this line in string format

  • Name
    quantity
    Type
    integer
    Tags
    Description

    the quantity (count) of products in this line

  • Name
    discount_amount
    Type
    integer
    Tags
    Description

    discount amount applied to the product in zero-decimal format (where "$10.00" is 1000)

  • Name
    discount_amount_str
    Type
    string
    Tags
    Description

    the discount amount in string format

  • Name
    subtotal_amount
    Type
    integer
    Tags
    Description

    subtotal amount of the line in zero-decimal format (where "$10.00" is 1000)

  • Name
    subtotal_amount_str
    Type
    string
    Tags
    Description

    subtotal amount of the line in string format

  • Name
    total_amount
    Type
    integer
    Tags
    Description

    tax amount of the order in zero-decimal format (where "$10.00" is 1000)

  • Name
    total_amount_str
    Type
    string
    Tags
    Description

    tax amount of the line in string format

Last Payment Error object

  • Fields

  • Name
    decline_code
    Type
    enum
    Tags
    Description

    the decline reason code

    Allowed enum values
    unknown
    An unknown error occurred during payment processing.
    generic_decline
    The payment was declined for an unspecified reason.
    call_issuer
    The payment provider requires the customer to contact them.
    authentication_required
    Additional authentication is needed to complete the transaction.
    currency_not_supported
    The chosen currency is not supported by this payment method.
    duplicate_transaction
    An identical transaction was recently processed.
    expired_card
    The payment method has passed its expiration date.
    fraudulent
    The payment was flagged as potentially fraudulent.
    incorrect_number
    The provided payment number is invalid.
    incorrect_cvc
    The security code for the payment method is incorrect.
    incorrect_pin
    The entered PIN is not valid.
    incorrect_zip
    The provided billing postal code is incorrect.
    insufficient_funds
    The payment method lacks sufficient funds for the transaction.
    invalid_account
    The payment method or associated account is not valid.
    invalid_amount
    The transaction amount is not allowed or is invalid.
    invalid_expiry_month
    The expiration month for the payment method is invalid.
    invalid_expiry_year
    The expiration year for the payment method is invalid.
    issuer_not_available
    The payment provider's systems are currently unavailable.
    lost_card
    The payment method has been reported as lost.
    merchant_blacklist
    The transaction was blocked by PayNow's security measures.
    new_account_information_available
    Updated information is available for the payment method.
    no_action_taken
    The payment provider took no action on this transaction.
    pickup_card
    The payment method has been flagged and cannot be used.
    pin_try_exceeded
    Too many incorrect PIN attempts have been made.
    restricted_card
    The payment method has restrictions preventing its use.
    stolen_card
    The payment method has been reported as stolen.
    testmode_decline
    A test payment method was used in a live environment.
    try_again_later
    A temporary issue prevented the transaction from completing.
    security_violation
    A security issue occurred during the transaction.
    card_velocity_exceeded
    The payment method has exceeded its usage limits.
    do_not_honor
    The payment provider has chosen not to process this transaction.
    processing_error
    An error occurred while processing the payment.
    card_not_supported
    This payment method doesn't support this type of transaction.
    transaction_not_allowed
    This specific transaction is not permitted for this payment method.
  • Name
    message
    Type
    string
    Tags
    Description

    human-readable decline reason message

The Order object

{
    "id": "272138292865024000",
    "pretty_id": "pn-22fkz1u9c0sg",
    "store_id": "235075606381871104",
    "customer": {
        "id": "235075788733423616",
        "store_id": "235075606381871104",
        "steam_id": "76561198152492642",
        "steam": {
            "id": "76561198152492642",
            "name": "m0uka",
            "avatar_url": "https://avatars.steamstatic.com/10ce9e8c27d973ec572e3401e531c07d717c4648_full.jpg"
        },
        "name": null,
        "metadata": null,
        "created_at": "2023-12-03T14:49:37.534869Z",
        "updated_at": null
    },
    "status": "completed",
    "checkout_id": "272138250204753920",
    "subscription_id": null,
    "is_subscription": false,
    "coupon_id": null,
    "giftcard_id": "239791093430890496",
    "billing_name": "John Doe",
    "billing_email": "[email protected]",
    "billing_country": "US",
    "customer_ip": "123.123.123.123/32",
    "currency": "eur",
    "tax_inclusive": false,
    "discount_amount": 0,
    "discount_amount_str": "€0.00",
    "subtotal_amount": 200,
    "subtotal_amount_str": "€2.00",
    "tax_amount": 0,
    "tax_amount_str": "€0.00",
    "giftcard_usage_amount": 200,
    "giftcard_usage_amount_str": "€2.00",
    "total_amount": 0,
    "total_amount_str": "€0.00",
    "billing_cycle_sequence": null,
    "lines": [
        {
            "id": "272138292865024001",
            "checkout_line_id": "272138250204753921",
            "product_id": "235075696194502656",
            "product_version_id": "272137490456920064",
            "product_name": "Testing Product",
            "product_image_url": null,
            "subscription_interval_value": null,
            "subscription_interval_scale": null,
            "gift": false,
            "gift_to_customer": null,
            "selected_gameserver_id": null,
            "price": 200,
            "price_str": "€2.00",
            "quantity": 1,
            "discount_amount": 0,
            "discount_amount_str": "€0.00",
            "subtotal_amount": 200,
            "subtotal_amount_str": "€2.00",
            "tax_amount": 0,
            "tax_amount_str": "€0.00",
            "total_amount": 200,
            "total_amount_str": "€2.00"
        }
    ],
    "created_at": "2024-03-14T21:22:47.118899Z",
    "completed_at": "2024-03-14T21:22:47.167958Z",
    "canceled_at": null
}

Get Store Orders

Retrieves a list of orders for a specific store.

  • Query Parameters

  • Name
    order_id
    Type
    int64?
    Tags
    OPTIONAL
    Description

    filter by id of a specific order to retrieve

  • Name
    subscription_id
    Type
    int64?
    Tags
    OPTIONAL
    Description

    filter by id of the subscription associated with the orders

  • Name
    is_subscription
    Type
    boolean?
    Tags
    OPTIONAL
    Description

    filter by whether the order is a subscription

  • Name
    limit
    Type
    integer?
    Tags
    OPTIONAL
    Description

    limit the number of orders returned

  • Name
    after
    Type
    flake?
    Tags
    OPTIONAL
    Description

    return orders created after this ID flake

  • Name
    before
    Type
    flake?
    Tags
    OPTIONAL
    Description

    return orders created before this ID flake

Returns

Returns a list of orders.

Request

order_read

Response

[
	{
		"id": "150580776499843072",
		"pretty_id": "pn-1234abc",
		"store_id": "94688451781206016",
		"customer": {
			"id": "11084680073842688",
			"first_name": "Example",
			"last_name": "Customer"
		},
		"status": "completed",
		"created_at": "2023-04-11T16:42:58.197319Z",
		"completed_at": "2023-04-11T17:42:58.197319Z"
	}
]

Get Store Order

Retrieves a specific order by ID for a specific store.

Returns

Returns the requested order.

Request

order_read

Response

{
	"id": "150580776499843072",
	"pretty_id": "pn-1234abc",
	"store_id": "94688451781206016",
	"customer": {
		"id": "11084680073842688",
		"first_name": "Example",
		"last_name": "Customer"
	},
	"status": "completed",
	"created_at": "2023-04-11T16:42:58.197319Z",
	"completed_at": "2023-04-11T17:42:58.197319Z"
}