# Create Testing Shopper Account

> Create a Bolt shopper account for testing purposes. Available for sandbox use only and the created account will be recycled after a certain time.

Source: https://help.boltapp.com/api-reference/embeddable-checkout-v1/testing/createtestingshopperaccount

`POST /v1/testing/shopper/create`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "version": "1.0.1",
    "title": "Embedded API Reference",
    "description": "Postman Collection:\n\n[![](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/9136127-55d2bde1-a248-473f-95b5-64cfd02fb445?action=collection%2Ffork&collection-url=entityId%3D9136127-55d2bde1-a248-473f-95b5-64cfd02fb445%26entityType%3Dcollection%26workspaceId%3D78beee89-4238-4c5f-bd1f-7e98978744b4#?env%5BBolt%20Sandbox%20Environment%5D=W3sia2V5IjoiYXBpX2Jhc2VfdXJsIiwidmFsdWUiOiJodHRwczovL2FwaS1zYW5kYm94LmJvbHQuY29tIiwidHlwZSI6ImRlZmF1bHQiLCJlbmFibGVkIjp0cnVlfSx7ImtleSI6InRrX2Jhc2UiLCJ2YWx1ZSI6Imh0dHBzOi8vc2FuZGJveC5ib2x0dGsuY29tIiwidHlwZSI6ImRlZmF1bHQiLCJlbmFibGVkIjp0cnVlfSx7ImtleSI6ImFwaV9rZXkiLCJ2YWx1ZSI6IjxyZXBsYWNlIHdpdGggeW91ciBCb2x0IFNhbmRib3ggQVBJIGtleT4iLCJ0eXBlIjoic2VjcmV0IiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJwdWJsaXNoYWJsZV9rZXkiLCJ2YWx1ZSI6IjxyZXBsYWNlIHdpdGggeW91ciBCb2x0IFNhbmRib3ggcHVibGlzaGFibGUga2V5PiIsInR5cGUiOiJkZWZhdWx0IiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJkaXZpc2lvbl9pZCIsInZhbHVlIjoiPHJlcGxhY2Ugd2l0aCB5b3VyIEJvbHQgU2FuZGJveCBwdWJsaWMgZGl2aXNpb24gSUQ+IiwidHlwZSI6ImRlZmF1bHQiLCJlbmFibGVkIjp0cnVlfV0=)\n\n## About\nThe Embedded API reference is a consolidation of critical APIs that a developer will use when integrating with Bolt's Embedded Accounts product suite.\n"
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "OAuth": [
        "bolt.account.manage",
        "bolt.account.view"
      ]
    }
  ],
  "paths": {
    "/v1/testing/shopper/create": {
      "post": {
        "description": "Create a Bolt shopper account for testing purposes. Available for sandbox use only and the created account will be recycled after a certain time.",
        "operationId": "createTestingShopperAccount",
        "parameters": [
          {
            "$ref": "#/components/parameters/x-publishable-key"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/testing_account_request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/testing_account_details"
                }
              }
            },
            "description": "Testing Account Created"
          }
        },
        "security": [
          {
            "X-API-Key": []
          }
        ],
        "summary": "Create Testing Shopper Account",
        "tags": [
          "Testing"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "x-publishable-key": {
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard [RECOMMENDED].",
        "in": "header",
        "name": "X-Publishable-Key",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "testing_account_request": {
        "properties": {
          "deactivate_in_days": {
            "description": "Number of days after which the test account is deactivated. Default: 30 days. Maximum: 180 days.",
            "type": "integer"
          },
          "email": {
            "description": "Deprecated. Please leave this field absent and let the API automatically generate a random email.",
            "type": "string"
          },
          "email_state": {
            "$ref": "#/components/schemas/account_identifier_status"
          },
          "phone": {
            "description": "Deprecated. Please leave this field absent and let the API automatically generate a random phone number.",
            "type": "string"
          },
          "phone_state": {
            "$ref": "#/components/schemas/account_identifier_status"
          },
          "migrated": {
            "description": "Set this account as migrated by the merchant in the request",
            "type": "boolean"
          },
          "has_address": {
            "description": "Add a random U.S. address to the created account if set to `true`",
            "type": "boolean"
          }
        },
        "type": "object",
        "examples": [
          {
            "deactivate_in_days": 30,
            "email_state": "verified",
            "phone_state": "verified"
          }
        ]
      },
      "account_identifier_status": {
        "description": "The status of the shopper account identifier (email or phone). If the account does not have this identifier, the status is \"missing\"; If the identifier has been used to receive an OTP code, the status is \"verified\"; If the identifier has not been used to receive an OTP code, the status is \"unverified\".",
        "enum": [
          "missing",
          "verified",
          "unverified"
        ],
        "type": "string",
        "examples": [
          "verified"
        ]
      },
      "testing_account_details": {
        "properties": {
          "email": {
            "description": "The email of the testing account",
            "$ref": "#/components/schemas/email"
          },
          "email_state": {
            "$ref": "#/components/schemas/account_identifier_status",
            "examples": [
              "verified"
            ]
          },
          "phone": {
            "description": "The phone number of the testing account",
            "$ref": "#/components/schemas/phone"
          },
          "phone_state": {
            "$ref": "#/components/schemas/account_identifier_status",
            "examples": [
              "unverified"
            ]
          },
          "otp_code": {
            "description": "Fixed OTP code that can be used to login to the created account",
            "type": "string",
            "examples": [
              123456
            ]
          },
          "migrated_merchant_owner_id": {
            "description": "The merchant's public id if the account is migrated",
            "type": "string",
            "examples": [
              "addvfRR_bp_7"
            ]
          },
          "will_deactivate_at": {
            "description": "The created testing account will be deactivated after this date",
            "type": "string",
            "examples": [
              "2023-06-01T23:16:07Z"
            ]
          },
          "oauth_code": {
            "description": "OAuth code that is associated with this account and can be used to exchange for an access token",
            "type": "string",
            "examples": [
              "7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms.-DUXvwr1Yg-bfvqXUlMaz49fPn7OdiPa3TwVBlUI-wc"
            ]
          }
        },
        "type": "object"
      },
      "email": {
        "description": "An email address.",
        "format": "email",
        "type": "string",
        "maxLength": 255,
        "examples": [
          "alan.watts@example.com"
        ]
      },
      "phone": {
        "description": "A phone number following E164 standards, in its globalized format, i.e. prepended with a plus sign.",
        "maxLength": 16,
        "type": "string",
        "examples": [
          "+12125550199"
        ]
      }
    },
    "securitySchemes": {
      "OAuth": {
        "description": "Bolt utilizes the OAuth flow that developers can use to attain access to Bolt Account data via APIs.\nFor all APIs that require authorization, please provide your `access_token` returned from `/v1/oauth/token` via the basic auth bearer header `Authorization: bearer ${TOKEN}`.\n[Read more about the OAuth token endpoint.](/api-bolt/#tag/OAuth)\n",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.boltapp.com/v1/oauth/authorize",
            "refreshUrl": "https://api.boltapp.com/v1/oauth/token",
            "scopes": {
              "bolt.account.manage": "This scope grants permissions to perform read/edit/delete actions on Bolt Account data",
              "bolt.account.view": "This scope grants permissions to perform read only actions on Bolt Account data",
              "openid": "This scope grants permissions that enable Bolt SSO by granting an id token JWT that stores account data. Not used in v1/account endpoints"
            },
            "tokenUrl": "https://api.boltapp.com/v1/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "X-API-Key": {
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard.",
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  }
}
```
