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

# Charge the customer's card

> Pay an order with the single-use token Accept.js produced in your customer's browser. Card data
never touches your server. A declined card returns `402 card_declined`; the customer can try
another card on the same order. Needs `store:write`.




## OpenAPI

````yaml /partner-api/openapi.yaml post /store/orders/{id}/pay
openapi: 3.1.0
info:
  title: VitaRelay Partner API
  version: 1.0.0
  description: >-
    The Partner API is for rep organizations (a Vita Rep, or a dual Rep + Clinic
    account) that recruit clinics and other reps. Create the invite you would
    otherwise send from the "Refer a Tele Clinic" form, get the signup link
    back, track whether it was accepted, and revoke it.
servers:
  - url: https://vitarelay.com/api/public/partner/v1
security:
  - bearerAuth: []
tags:
  - name: Wholesale
    description: >-
      Order research-use products for your own customers at VitaRelay's
      wholesale price, charged to your card on file. You show your own prices
      and collect from your customer yourself. Rep accounts only.
  - name: Store
    description: >-
      Sell research-use products to your own customers from your own landing
      page, using VitaRelay for fulfillment and payment processing. Customers
      are not patients: no patient, intake or prescription is created. Rep
      accounts only. Needs `store:read` / `store:write`.
  - name: Invites
    description: Clinic and rep invites sent by your organization.
paths:
  /store/orders/{id}/pay:
    post:
      tags:
        - Store
      summary: Charge the customer's card
      description: >
        Pay an order with the single-use token Accept.js produced in your
        customer's browser. Card data

        never touches your server. A declined card returns `402 card_declined`;
        the customer can try

        another card on the same order. Needs `store:write`.
      operationId: payStoreOrder
      parameters:
        - $ref: '#/components/parameters/ResourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - opaque_data
                - billing
              properties:
                opaque_data:
                  type: object
                  required:
                    - dataDescriptor
                    - dataValue
                  properties:
                    dataDescriptor:
                      type: string
                    dataValue:
                      type: string
                billing:
                  type: object
                  required:
                    - first_name
                    - last_name
                    - address
                    - city
                    - state
                    - zip
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    address:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    zip:
                      type: string
                    country:
                      type: string
                    email:
                      type: string
                    phone:
                      type: string
      responses:
        '200':
          description: Payment result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      payment_status:
                        type: string
                      held_for_review:
                        type: boolean
                      transaction_id:
                        type: string
                        nullable: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: '`card_declined`'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: '`order_not_found`'
        '409':
          description: '`order_not_payable`: the order is not awaiting payment.'
components:
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      description: Resource UUID.
      schema:
        type: string
        format: uuid
      examples:
        uuid:
          value: 3f0b1c2a-8f4e-4a9b-9c1d-2e5f7a8b9c0d
  responses:
    Unauthorized:
      description: Missing, invalid or revoked API key (`unauthorized`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        `insufficient_scope` (the key lacks the scope) or `not_available` (your
        organization is not a rep or dual Rep + Clinic account).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        VitaRelay API key (`vr_live_...` or `vr_test_...`) with the `invites:*`
        scopes.

````

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