API reference

Setup Attempts

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

Base URL
https://api.knoxapi.com

List all SetupAttempts

GET/v1/setup_attempts

Returns a list of SetupAttempts that associate with a provided SetupIntent.

Query parameters

  • setup_intentstringRequired

    Only return SetupAttempts created by the SetupIntent specified by this ID.

  • createdobject | integer

    A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options.

    Show 4 child parameters
    • gtinteger
    • gteinteger
    • ltinteger
    • lteinteger
  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Returns

A list of setup_attempt objects.

GET /v1/setup_attempts
curl -G https://api.knoxapi.com/v1/setup_attempts \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode setup_intent=seti_1Pgag7B7WZ01zgkWSgwGdb8Z
Response
{
  "object": "list",
  "url": "/v1/setup_attempts",
  "has_more": false,
  "data": [
    {
      "application": null,
      "created": 1234567890,
      "customer": null,
      "flow_directions": null,
      "id": "setatt_123456789012345678901234",
      "livemode": false,
      "object": "setup_attempt",
      "on_behalf_of": null,
      "payment_method": "card_1PgaftB7WZ01zgkWm3waTcFp",
      "payment_method_details": {
        "card": {
          "brand": null,
          "checks": {
            "address_line1_check": null,
            "address_postal_code_check": null,
            "cvc_check": null
          },
          "country": null,
          "exp_month": null,
          "exp_year": null,
          "fingerprint": null,
          "funding": null,
          "last4": null,
          "network": null,
          "three_d_secure": {
            "authentication_flow": null,
            "electronic_commerce_indicator": null,
            "result": null,
            "result_reason": null,
            "transaction_id": null,
            "version": null
          },
          "wallet": {
            "type": "apple_pay"
          }
        },
        "type": "card"
      },
      "setup_error": {
        "type": "idempotency_error"
      },
      "setup_intent": "seti_1Pgag7B7WZ01zgkWSgwGdb8Z",
      "status": "succeeded",
      "usage": "off_session",
      "customer_account": null
    }
  ]
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.