BigCommerce Payments API

The Payments API from BigCommerce — 2 operation(s) for payments.

Documentation

📖
Documentation
https://developer.bigcommerce.com/
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/abandoned-carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/brands
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/categories
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/category-trees
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variant-options
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variants
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/products
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/store-content
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/currencies
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/email-templates
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/geography
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/pages
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/tokens
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/methods-deprecated
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/processing
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/settings
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/shipping-v2
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels/site
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/store-information
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/subscriptions
📖
APIReference
https://developer.bigcommerce.com/docs/integrations/webhooks
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/widgets

Specifications

Other Resources

OpenAPI Specification

bigcommerce-payments-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: BigCommerce Abandoned Cart Emails Payments API
  version: 3.0.0
  termsOfService: https://www.bigcommerce.com/terms
  description: Abandoned Cart Emails V3 API managing Handlebars-based emails.
  contact:
    name: BigCommerce
    url: https://www.bigcommerce.com
    email: support@bigcommerce.com
servers:
- url: https://api.bigcommerce.com/stores/{store_hash}/v3
  variables:
    store_hash:
      default: store_hash
      description: Permanent ID of the BigCommerce store.
  description: BigCommerce API Gateway
security:
- X-Auth-Token: []
tags:
- name: Payments
paths:
  /payments/methods:
    parameters:
    - $ref: '#/components/parameters/Accept'
    get:
      description: 'Returns a list of accepted payment methods based on the `order_id` or `checkout_id`.


        **Notes**

        * Use the [Create an Order](/docs/rest-management/orders#create-an-order) endpoint to generate the `order_id`.

        * Orders created will be set to incomplete order status.

        * The cart ID and checkout ID are the same.


        **Required Fields**

        * `order_id` or `checkout_id`'
      summary: BigCommerce Get Accepted Payment Methods
      tags:
      - Payments
      operationId: getPaymentMethods
      deprecated: false
      parameters:
      - name: order_id
        in: query
        description: Identifier for the order
        schema:
          type: integer
          format: int32
          exclusiveMinimum: false
          exclusiveMaximum: false
      - name: checkout_id
        in: query
        description: Identifier for the checkout (same as the cart ID)
        schema:
          type: string
          exclusiveMinimum: false
          exclusiveMaximum: false
      responses:
        '200':
          $ref: '#/components/responses/paymentsMethods_Resp'
        '400':
          description: Request has been rejected
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '401':
          description: Valid authentication required
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '404':
          description: Request has been rejected due to resource not being found
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '422':
          description: Request has been rejected due to missing or invalid data
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        default:
          description: Internal server error
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
  /payments/access_tokens:
    parameters:
    - $ref: '#/components/parameters/Accept'
    post:
      description: 'Use this endpoint to create a payment access token. A payment access token is required to process payments with the BigCommerce API.


        You can also generate a payment access token during checkout by using the `completeCheckout` mutation in the [GraphQL Storefront API](/docs/storefront/cart-checkout/guide/graphql-storefront#handling-payments).


        After the token is created, use the token to [Process a payment](/docs/rest-payments/processing#process-payment).


        **Required Fields**

        * order_id'
      summary: BigCommerce Create Payment Access Token
      tags:
      - Payments
      operationId: createPaymentAccessToken
      deprecated: false
      parameters:
      - $ref: '#/components/parameters/ContentType'
      requestBody:
        content:
          application/json:
            schema:
              title: Payment Access Token Request
              type: object
              properties:
                order:
                  $ref: '#/components/schemas/Order'
              required:
              - order
            examples:
              example-1:
                value:
                  order:
                    id: 1
                    is_recurring: false
        required: true
        x-examples:
          application/json:
            order:
              id: 44796008
              is_recurring: true
          Example:
            order:
              id: 182
      responses:
        '201':
          description: Payment access token has been successfully created.
          headers: {}
          content:
            application/json:
              schema:
                title: Payments Access Tokens Response
                type: object
                properties:
                  data:
                    title: Payment Access Token
                    type: object
                    properties:
                      id:
                        description: Payment access token. This token is required in the subsequent request to the [Process a payment](/docs/rest-payments/processing#process-payment) endpoint.
                        type: string
                        minLength: 1
                    required:
                    - id
                  meta:
                    type: object
                    properties: {}
                    additionalProperties: true
                    description: Response metadata.
              examples:
                example-1:
                  value:
                    data:
                      id: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTUyNTA3NTksIm5iZiI6MTYxNTI0Nz E1OSwiaXNzIjoicGF5bWVudHMuYmlnY29tbWVyY2UuY29tIiwic3ViIjoieHNsM3 JoZGYzNiIsImp0aSI6IjNhOGE3NTJjLTBmNWQtNDNmNS05MzdjLTRhMTYzODBlMW YwZCIsImlhdCI6MTYxNTI0NzE1OSwiZGF0YSI6eyJzdG9yZV9pZCI6IjEwMDEzMz YzMjQiLCJvcmRlcl9pZCI6IjE2NiIsImFtb3VudCI6NDU3OTAsImN1cnJlbmN5Ij oiVVNEIn19.dpCDgOfbNrz095VARY20yYBRTOuq-W1F0ETTgf1Zhbs
                    meta: {}
        '400':
          description: Request has been rejected
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '401':
          description: Valid authentication required
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '404':
          description: Request has been rejected due to resource not being found
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '409':
          description: Request has been rejected due to conflict with the current state of the target resource
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        '422':
          description: Request has been rejected due to missing or invalid data
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
        default:
          description: Internal server error
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  status:
                    description: HTTP status code
                    type: integer
                    format: int32
                  title:
                    description: Short summary describing the particular error
                    type: string
                  detail:
                    description: Detailed summary describing the particular error
                    type: string
                  type:
                    description: Reference that identifies the particular error
                    type: string
                  code:
                    description: Code representing the particular error
                    type: integer
                    format: int32
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                required:
                - status
                - title
                - type
components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: true
      description: The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.
      schema:
        type: string
        default: application/json
    ContentType:
      name: Content-Type
      in: header
      required: true
      description: The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.
      schema:
        type: string
        default: application/json
  schemas:
    paymentMethod_Full:
      title: paymentMethod_Full
      type: object
      properties:
        id:
          description: Identifier for this payment method
          type: string
          minLength: 1
        name:
          description: Name of this payment method
          type: string
          minLength: 1
        stored_instruments:
          type: array
          items:
            $ref: '#/components/schemas/paymentMethodStoredInstrument'
        supported_instruments:
          type: array
          items:
            title: Supported Card Instrument
            type: object
            properties:
              instrument_type:
                title: InstrumentType
                description: Type of this instrument
                example: VISA
                type: string
                enum:
                - VISA
                - MASTERCARD
                - DISCOVER
                - AMEX
                - DINERS_CLUB
                - JCB
                - DANKORT
                - MAESTRO
                - STORED_CARD
              verification_value_required:
                description: Whether verification value is required for payment
                type: boolean
            required:
            - instrument_type
        test_mode:
          description: Whether this payment method is on test mode
          example: false
          type: boolean
          default: false
        type:
          description: Type to classify this payment method
          example: card
          type: string
          default: card
      required:
      - id
      - name
      - supported_instruments
      - test_mode
      - type
      x-examples:
        example-1:
          id: string
          name: string
          stored_instruments:
          - brand: string
            expiry_month: 1
            expiry_year: 0
            issuer_identification_number: string
            last_4: stri
            token: stringstringstringstringstringstringstringstringstringstringstri
            is_default: false
            type: stored_card
          supported_instruments:
          - instrument_type: VISA
            verification_value_required: true
          test_mode: false
          type: card
      x-internal: false
    paymentMethodStoredInstrument:
      title: paymentMethodStoredInstrument
      type: object
      properties:
        brand:
          description: Brand of this card such as VISA or Mastercard
          type: string
          minLength: 1
        expiry_month:
          description: Expiry month of this card
          type: integer
          minimum: 1
          maximum: 12
          format: int32
        expiry_year:
          description: Expiry year of this card
          type: integer
          format: int32
        issuer_identification_number:
          description: Issuer identification number of this card. This is extracted from the card when the order is paid for.
          type: string
          minLength: 6
          maxLength: 6
        last_4:
          description: Last four numbers of this card
          type: string
          minLength: 4
          maxLength: 4
        token:
          description: A BigCommerce-generated identifier that represents the stored card.
          type: string
          minLength: 64
          maxLength: 64
        is_default:
          description: Whether this instrument is a default instrument
          example: false
          type: boolean
          default: false
        type:
          description: Type to classify this stored card
          example: stored_card
          type: string
          default: stored_card
      required:
      - brand
      - expiry_month
      - expiry_year
      - issuer_identification_number
      - last_4
      - token
      - is_default
      - type
      x-examples:
        example-1:
          brand: string
          expiry_month: 1
          expiry_year: 0
          issuer_identification_number: string
          last_4: stri
          token: stringstringstringstringstringstringstringstringstringstringstri
          is_default: false
          type: stored_card
      x-internal: false
    Order:
      title: Order
      type: object
      properties:
        id:
          description: Identifier for the order
          type: integer
          minimum: 1
          format: int32
        is_recurring:
          description: Whether this is a recurring order. If the order is recurring this field should be set to true in order to let the payment gateway know.
          example: false
          type: boolean
          default: false
      required:
      - id
      x-examples:
        example-1:
          id: 1
          is_recurring: false
      x-internal: false
  responses:
    paymentsMethods_Resp:
      description: ''
      content:
        application/json:
          schema:
            title: Payments Methods Response
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/paymentMethod_Full'
              meta:
                type: object
                properties: {}
                additionalProperties: true
                description: Response metadata.
          examples:
            response:
              value:
                data:
                - id: bigcommerce.gift_certificate
                  name: Gift Certificate
                  test_mode: false
                  type: gift_certificate
                  supported_instruments: []
                  stored_instruments: []
                - id: bigcommerce.store_credit
                  name: Store Credit
                  test_mode: false
                  type: store_credit
                  supported_instruments: []
                  stored_instruments: []
                - id: stripe.card
                  name: Stripe
                  test_mode: true
                  type: card
                  supported_instruments:
                  - instrument_type: VISA
                    verification_value_required: true
                  - instrument_type: MASTERCARD
                    verification_value_required: true
                  - instrument_type: AMEX
                    verification_value_required: true
                  - instrument_type: DISCOVER
                    verification_value_required: true
                  - instrument_type: JCB
                    verification_value_required: true
                  - instrument_type: DINERS_CLUB
                    verification_value_required: true
                  - instrument_type: STORED_CARD
                    verification_value_required: true
                  stored_instruments:
                  - type: stored_card
                    brand: VISA
                    expiry_month: 9
                    expiry_year: 2020
                    issuer_identification_number: '424242'
                    last_4: '4242'
                    token: 050a1e5c982e5905288ec5ec33f292772762033a0704f46fccb16bf1940b51ef
                    is_default: true
                meta: {}
  securitySchemes:
    X-Auth-Token:
      name: X-Auth-Token
      description: '### OAuth scopes


        | UI Name | Permission | Parameter |

        |:--|:--|:-|

        | Information & Settings  | read-only  | `store_v2_information_read_only`|

        | Information & Settings  | modify     | `store_v2_information`          |


        ### Authentication header


        | Header | Argument | Description |

        |:-|:|:|

        | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). |


        ### Further reading


        For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests).


        For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes).


        For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes).'
      type: apiKey
      in: header