> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shoply.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the signed-in buyer

> Everything the customer panel's first page shows: the buyer's email, what they have spent, their store balance, their 200 newest orders, and the downloads, files and setup instructions their paid orders hand over.

`downloads.files` and `downloads.instructions` are every paid order's together. `downloads.orders` is the same an order at a time, newest first, as the customer panel shows it: each with what it bought, its own files and its own instructions. The store's `buttons` and `general` notes go with every order.

`affiliate` is null unless the store has an affiliate programme the buyer is in or may join, and `subscriptions` says whether they have ever had one. Keys are not listed here: Get an order has them.

Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.

It is counted for the buyer's token: 300 reads in ten minutes.



## OpenAPI

````yaml /api-reference/openapi.json get /stores/{storeId}/customer
openapi: 3.1.0
info:
  title: Shoply API
  version: '1'
  description: >-
    Everything a store's own server can do with a secret API key: its catalogue,
    orders, customers, marketing, finance and the rest of what the dashboard
    does. And the Customer API, which a buyer's own device asks with a token of
    theirs.
servers:
  - url: https://api.shoply.gg/v1
security:
  - apiKey: []
tags:
  - name: API key
  - name: Store
  - name: Domain
  - name: Payment methods
  - name: Analytics
  - name: Storefronts
  - name: Storefront code
  - name: Payment Routing
  - name: Custom payment methods
  - name: Products
  - name: Product pictures
  - name: Stock
  - name: Categories
  - name: Upsells
  - name: Subscriptions
  - name: Orders
  - name: Invoices
  - name: Reviews
  - name: Coupons
  - name: Coupon categories
  - name: Coupon pop-up
  - name: Sales
  - name: Blog
  - name: Search settings
  - name: Redirects
  - name: Sitemap
  - name: Cart Recovery
  - name: Email Marketing
  - name: Email Templates
  - name: Customers
  - name: Affiliates
  - name: Support Tickets
  - name: Blacklist
  - name: Fraud protection
  - name: Disputes
  - name: Finance
  - name: Tax
  - name: Expenses
  - name: Expense setup
  - name: API requests
  - name: Webhook endpoints
  - name: Webhook deliveries
  - name: Customer API
paths:
  /stores/{storeId}/customer:
    get:
      tags:
        - Customer API
      summary: Get the signed-in buyer
      description: >-
        Everything the customer panel's first page shows: the buyer's email,
        what they have spent, their store balance, their 200 newest orders, and
        the downloads, files and setup instructions their paid orders hand over.


        `downloads.files` and `downloads.instructions` are every paid order's
        together. `downloads.orders` is the same an order at a time, newest
        first, as the customer panel shows it: each with what it bought, its own
        files and its own instructions. The store's `buttons` and `general`
        notes go with every order.


        `affiliate` is null unless the store has an affiliate programme the
        buyer is in or may join, and `subscriptions` says whether they have ever
        had one. Keys are not listed here: Get an order has them.


        Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from
        Sign in with the code.


        It is counted for the buyer's token: 300 reads in ten minutes.
      operationId: customer.show
      parameters:
        - name: storeId
          in: path
          required: true
          description: >-
            The store's ID, from Settings, General in its dashboard. It is not a
            secret: a page may show it.
          schema:
            type: string
      responses:
        '200':
          description: It worked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    nullable: true
                  code:
                    nullable: true
                  data:
                    type: object
                    properties:
                      email:
                        type: string
                      customerSince:
                        type: string
                      balance:
                        nullable: true
                      affiliate:
                        type: object
                        properties:
                          member:
                            type: boolean
                          canJoin:
                            type: boolean
                      totals:
                        type: object
                        properties:
                          spent:
                            type: array
                            items:
                              type: object
                              properties:
                                currencyCode:
                                  type: string
                                amount:
                                  type: number
                          orders:
                            type: integer
                          keys:
                            type: integer
                      orders:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            status:
                              type: string
                            dateCreated:
                              type: string
                            currencyCode:
                              type: string
                            total:
                              type: number
                            productName:
                              type: string
                            variantName:
                              type: string
                            quantity:
                              type: integer
                            moreItems:
                              type: integer
                            imageUrl:
                              nullable: true
                      subscriptions:
                        type: boolean
                      support:
                        type: boolean
                      downloads:
                        type: object
                        properties:
                          buttons:
                            type:
                              - array
                              - object
                          guideUrl:
                            type: string
                          files:
                            type:
                              - array
                              - object
                          instructions:
                            type: array
                            items:
                              type: object
                              properties:
                                productName:
                                  type: string
                                variantName:
                                  type: string
                                text:
                                  type: string
                          general:
                            type: string
                          orders:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                dateCreated:
                                  type: string
                                products:
                                  type: array
                                  items:
                                    type: string
                                imageUrl:
                                  nullable: true
                                files:
                                  type:
                                    - array
                                    - object
                                instructions:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      productName: {}
                                      variantName: {}
                                      text: {}
                      supportUrl:
                        type: string
              example:
                success: true
                message: null
                code: null
                data:
                  email: grace@example.com
                  customerSince: '2026-10-22T16:20:19Z'
                  balance: null
                  affiliate:
                    member: false
                    canJoin: true
                  totals:
                    spent:
                      - currencyCode: USD
                        amount: 9.99
                    orders: 2
                    keys: 1
                  orders:
                    - id: bc44febe-0f25-4076-92eb-03a5045a57e7
                      status: completed
                      dateCreated: '2026-10-22T16:20:19Z'
                      currencyCode: USD
                      total: 9.99
                      productName: Northwind Pro
                      variantName: 1 month
                      quantity: 1
                      moreItems: 0
                      imageUrl: null
                    - id: e9ae5h0p1ye-cd7fded3be6-1006662
                      status: pending
                      dateCreated: '2026-10-22T16:20:19Z'
                      currencyCode: USD
                      total: 9.99
                      productName: Northwind Pro
                      variantName: 1 month
                      quantity: 1
                      moreItems: 0
                      imageUrl: null
                  subscriptions: true
                  support: false
                  downloads:
                    buttons: []
                    guideUrl: ''
                    files: []
                    instructions:
                      - productName: Northwind Pro
                        variantName: 1 month
                        text: Paste the key under Help, Activate.
                    general: ''
                    orders:
                      - id: bc44febe-0f25-4076-92eb-03a5045a57e7
                        dateCreated: '2026-10-22T16:20:19Z'
                        products:
                          - Northwind Pro
                        imageUrl: null
                        files: []
                        instructions:
                          - productName: Northwind Pro
                            variantName: 1 month
                            text: Paste the key under Help, Activate.
                  supportUrl: https://example.com/support
        '401':
          $ref: '#/components/responses/NoToken'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/CustomerTooMany'
      security:
        - customerToken: []
      x-codeSamples:
        - lang: javascript
          label: Node.js
          source: >
            import { ShoplyCustomer } from "@shoplygg/node";


            const buyer = new ShoplyCustomer({ storeId: "YOUR_STORE_ID", token
            });


            const result = await buyer.show();
        - lang: php
          label: PHP
          source: >
            <?php


            require 'vendor/autoload.php';


            $buyer = new Shoply\Customer(['storeId' => 'YOUR_STORE_ID', 'token'
            => $token]);


            $result = $buyer->show();
        - lang: python
          label: Python
          source: |
            import shoply

            buyer = shoply.Customer("YOUR_STORE_ID", token=token)

            result = buyer.show()
components:
  responses:
    NoToken:
      description: >-
        No buyer's token was sent, or it was an API key
        (`customer_token_required`), or the token has ended or is another
        store's (`invalid_customer_token`). Sign the buyer in again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    NotFound:
      description: >-
        There is no such thing in this store: `not_found`. A store that is not
        the key's own is answered the same way.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
    CustomerTooMany:
      description: >-
        Too many requests for now: `rate_limited`, or the route's own
        (`code_cooldown`, `code_paused`, `store_busy`). `Retry-After` says how
        many seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refusal'
  schemas:
    Refusal:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          description: What is wrong, in words for a person.
        code:
          type: string
          description: What is wrong, as a word that does not change.
        data:
          nullable: true
        errors:
          type: object
          description: >-
            For `validation_failed`: what is wrong with each field, by the
            field's name.
          additionalProperties:
            type: string
      required:
        - success
        - message
        - code
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A secret API key, made under Developers in the dashboard:
        `Authorization: Bearer shoply_sk_...`
    customerToken:
      type: http
      scheme: bearer
      description: >-
        A buyer's token, from Sign in with the code: `Authorization: Bearer
        shoply_ct_...`. It reaches that buyer's own orders at one store, and no
        route that takes a key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.