{"_id":"564a83ec4721851900a67614","category":{"_id":"55df7dcd437b3f0d004ba204","pages":["55df7ef3a50de10d00062f70","55e0f40126f51b0d009b171c","55e0f57c7d91840d00824934","55e0f605c13a5a0d00880e6b","55e100eed052580d0038c993","55e1013d26f51b0d009b1759","55e101637d91840d0082493c","55e5f5af9416190d00dc3a59","55e6203dd101191900f30d11","55ea2468ba33bc3500b28cd9","55f85c32a3271b0d00498d51","55f8b70fc449610d002daf9f","56092bafa7cc2f0d00d975b2","56092bd58aedf50d0004cff1","563923d13539050d000820f0","563e732531f7580d00511edf","564a83ec4721851900a67614","564ab6274cd0521700523f17","564ab687c58bef0d0062070a","564ab6ee9f35450d00fc767a","564ab75f33fb500d00567ddd","564ab7c34cd0521700523f19","564ab82233fb500d00567ddf","564b5f0755cfbe0d00de3ba5","564b5f7e55cfbe0d00de3ba7","565cf59677f0090d00581807","565e4266f76b8d0d00554185","565f4119de5dc50d00acfe30","5665c0b8d7490819006a4fd6"],"project":"55dd0853d2d97337001800e2","version":"55de36ec9067202b00de0015","__v":29,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-08-27T21:14:53.972Z","from_sync":false,"order":2,"slug":"customers","title":"Customers"},"parentDoc":null,"project":"55dd0853d2d97337001800e2","__v":77,"version":{"_id":"55de36ec9067202b00de0015","__v":33,"project":"55dd0853d2d97337001800e2","createdAt":"2015-08-26T22:00:12.384Z","releaseDate":"2015-08-26T22:00:12.383Z","categories":["55de36ed9067202b00de0016","55de36ed9067202b00de0017","55de36ed9067202b00de0018","55df7dcd437b3f0d004ba204","55e4e014177b6e0d00333141","55e4e01fe252ac0d00303a99","55e4e05240cda60d003bad67","55e4e070177b6e0d00333142","55e4e0753325e60d007fbee6","55e4e0803325e60d007fbee7","55e4e086177b6e0d00333143","55e4e0a1177b6e0d00333144","55e4e0aa3325e60d007fbee8","55e4e0b140cda60d003bad6b","55e4e0bae252ac0d00303a9d","55e4e0c5177b6e0d00333145","55e4e0ee3325e60d007fbeea","55e4e0fae252ac0d00303a9e","55e4e100177b6e0d00333147","55f85c8ba3271b0d00498d55","56092e1ac5cff70d007d0131","564b64a3ee12850d0095866e","564b64b5791099170071e9ea","565cd0bfd18ae50d007183d8","565f5f5d6bafd40d0030a063","565f790d6bafd40d0030a09f","56611c464851190d003f9f5d","56637d5b7988ab0d00d0522e","56637d687988ab0d00d0522f","567835df6928b40d009dd650","56e59c043c29b117008dae5b","5704013559c5190e000ab646","572be252de40590e00026934","58af1bf6ebd7370f0078ba09","5cdad81d912ece0039e9a939"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"githubsync":"","user":"55dd080d0efd5821000d53b3","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-17T01:33:32.806Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Customers creating customers who get paid by customers?!\",\n  \"body\": \"At PayStand, whether you are a platform, a merchant, or a payer, you are ultimately a customer. At the API level, the only distinction between each type of customer is the particular feature they are currently attempting to use as well as what features are enabled on a customer's plan. This can be confusing when trying to communicate at times so we will generally draw a distinction in the documentation whenever there is ambiguity by using the terms platform, merchant, and payer.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"\",\n  \"body\": \"**Payers** are those customers who only have access to pay other customers.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"\",\n  \"body\": \"**Merchants** are those customers who have access to accept payments from other customers. If a merchant also has access to send payments we will usually refer to them as a **Merchant Payer** when they are acting as a payer.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"\",\n  \"body\": \"**Platforms** are those customers who have access to create new merchant/payer customers. If a platform also has access to accept or send payments we will usually refer to them as a **Platform Merchant** or a **Platform Payer** when they are acting as a merchant or payer respectively.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"\",\n  \"body\": \"The Customers resource is almost exclusively for use by **Platforms**. Merchants and payers do not have a need to directly create other Customers.\"\n}\n[/block]\n## Request\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"The set of **plan names** available for a Platform to use when creating customers will be made available upon being given Platform access.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"The **defaultSettings** parameter allows a Platform to apply settings to each Customer they create automatically. To use, a Platform will want to update their own customer resource with the desired default settings. When creating a new customer, if the \\\"settings\\\" parameter on the new customer is not set, the Platform's default settings will be applied to the new customer settings instead.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The **defaultBank** parameter immediately attaches a default bank to the customer, which after verification may be used for withdrawing available balance or paying subscription fees. Please note that more banks can be added to the customer at a later time. Also these banks can be made the default bank by using the [isDefault](doc:the-bank-resource) flag.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Specification\",\n    \"0-0\": \"name\",\n    \"1-0\": \"email\",\n    \"4-0\": \"[settings](doc:customer-settings)\",\n    \"2-0\": \"planKey\",\n    \"5-0\": \"[defaultSettings](doc:customer-settings)\",\n    \"3-0\": \"description\",\n    \"6-0\": \"[address](doc:address)\",\n    \"7-0\": \"[contact](doc:contact)\",\n    \"9-0\": \"[legalEntity](doc:customer-legal-entity)\",\n    \"10-0\": \"[merchant](doc:customer-merchant)\",\n    \"13-0\": \"[meta](doc:meta)\",\n    \"0-1\": \"**Type**: String\\n**Length**: 1-256\\n**Example**: Elliana Weaper\\n**Description**: The full name of the customer\",\n    \"1-1\": \"**Type**: String\\n**Format**: Valid Email user:::at:::domain\\n**User Length**: 1-64 characters\\n**Total Length**: 1-128 characters\\n**Example**: eweaper@paystand.com\\n**Description**: The email address for the customer\",\n    \"2-1\": \"**Type**: String\\n**Length**: 1-256\\n**Example**: PayStand Lite\\n**Description**: The name of the plan for the Customer. planName is deprecated but still supported until further notice.\",\n    \"3-1\": \"**Type**: String\\n**Length**: 1-512\\n**Example**: Elliana Weaper\\n**Description**: An optional description for this customer.\",\n    \"4-1\": \"**Type**: JSON Object\\n**Format**: [Settings](doc:customer-settings) \\n**Description**: The settings for the Customer\",\n    \"5-1\": \"**Type**: JSON Object\\n**Format**: [Settings](doc:customer-settings) \\n**Description**: These default settings will apply to any child customer created by this customer.\",\n    \"6-1\": \"**Type**: JSON Object\\n**Format**: [Address](doc:address) \\n**Description**: The address of the customer.\",\n    \"7-1\": \"**Type**: JSON Object\\n**Format**: [Contact](doc:contact) \\n**Description**: The contact information for the customer.\",\n    \"9-1\": \"**Type**: JSON Object\\n**Format**: [legalEntity](doc:customer-legal-entity)\\n**Description**: Detailed information about the legal entity\",\n    \"10-1\": \"**Type**: JSON Object\\n**Format**: [Merchant](doc:customer-merchant)\\n**Description**: Detailed information about the particular merchant.\",\n    \"13-1\": \"**Type**: JSON Object\\n**Format**: [Meta](doc:meta)\",\n    \"8-0\": \"[defaultBank](doc:the-bank-resource)\",\n    \"8-1\": \"**Type**: JSON Object\\n**Format**: [Bank](doc:the-bank-resource)\\n**Description**: The default bank to which the customer can withdraw funds and (optional) against which subscriptions fees may get charged.\",\n    \"11-0\": \"username\",\n    \"12-0\": \"password\",\n    \"11-1\": \"**Type**: String\\n**Length**: 1-128 characters\\n**Description**: The username of a new user to be created with access to the newly created customer.\",\n    \"12-1\": \"**Type**: String\\n**Length**: 1-128 characters\\n**Description**: The password of said new user to be created with access to the newly created customer.\"\n  },\n  \"cols\": 2,\n  \"rows\": 14\n}\n[/block]\n## Response\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"\",\n  \"body\": \"The **publishable and secret** API keys will only be made available in the Customer creation response. All subsequent responses will exclude these values. Make sure you save these keys.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"\",\n  \"body\": \"The \\\"id\\\" parameter in the Customer response is the value you will be using for authenticated calls. Use the value of Customer id as the value for the **X-CUSTOMER-ID** header when making authenticated API requests.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"Pay close attention to the **planStatus** object as it will guide you as to what the remaining steps are to get your Customer to have full access to the plan features.\"\n}\n[/block]\nAll of the parameters from the request will appear in the response. In addition, the following parameters will also be included in the response:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"object\",\n    \"3-1\": \"Embedded [planStatus](doc:customer-plan-status) object.\",\n    \"3-0\": \"[planStatus](doc:customer-plan-status)\",\n    \"6-0\": \"created\",\n    \"7-0\": \"lastUpdated\",\n    \"2-0\": \"status\",\n    \"6-1\": \"The date the customer was created.\",\n    \"7-1\": \"The date the customer was lastUpdated\",\n    \"0-1\": \"The unique identifier for the customer.\",\n    \"1-1\": \"Will have value \\\"customer\\\" indicating this object is a customer response.\",\n    \"2-1\": \"The current status of the customer. One of: \\\"created\\\", \\\"active\\\", \\\"disabled\\\", \\\"locked\\\"\",\n    \"4-0\": \"keys.publishable\",\n    \"4-1\": \"The publishable key associated with the customer. Note: this is only given once during customer creation.\",\n    \"5-0\": \"keys.secret\",\n    \"5-1\": \"The secret key associated with the customer. Note: this is only given once during customer creation.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"Elliana Weaper\\\",\\n  \\\"email\\\": \\\"eWeaper@paystand.com\\\",\\n  \\\"planName\\\": \\\"PayStand Lite\\\",\\n  \\\"description\\\": \\\"Customer description\\\",\\n  \\\"meta\\\": {..},\\n  \\\"address\\\": {..},\\n  \\\"contact\\\": {..},\\n  \\\"legalEntity\\\": {..},\\n  \\\"merchant\\\": {..},\\n  \\\"settings\\\": {..},\\n  \\\"defaultSettings\\\": {..}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"b41f8286b3d1421db07ef01d\\\",\\n  \\\"object\\\": \\\"customer\\\",\\n  \\\"name\\\": \\\"Elliana Weaper\\\",\\n  \\\"email\\\": \\\"eWeaper@paystand.com\\\",\\n  \\\"description\\\": \\\"Customer description\\\",\\n  \\\"planName\\\": \\\"PayStand Lite\\\",\\n  \\\"meta\\\": {..},\\n  \\\"address\\\": {..},\\n  \\\"contact\\\": {..},\\n  \\\"legalEntity\\\": {..},\\n  \\\"merchant\\\": {..},\\n  \\\"settings\\\": {..},\\n  \\\"defaultSettings\\\": {..},\\n  \\\"keys\\\": {..},\\n  \\\"planStatus\\\": {..},\\n  \\\"status\\\": \\\"active\\\",\\n  \\\"created\\\": \\\"2015-08-08T06:29:47.000Z\\\",\\n  \\\"lastUpdated\\\": \\\"2015-11-08T06:30:00.000Z\\\",\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"the-customer-resource","type":"basic","title":"Customer resource"}
[block:callout] { "type": "success", "title": "Customers creating customers who get paid by customers?!", "body": "At PayStand, whether you are a platform, a merchant, or a payer, you are ultimately a customer. At the API level, the only distinction between each type of customer is the particular feature they are currently attempting to use as well as what features are enabled on a customer's plan. This can be confusing when trying to communicate at times so we will generally draw a distinction in the documentation whenever there is ambiguity by using the terms platform, merchant, and payer." } [/block] [block:callout] { "type": "warning", "title": "", "body": "**Payers** are those customers who only have access to pay other customers." } [/block] [block:callout] { "type": "warning", "title": "", "body": "**Merchants** are those customers who have access to accept payments from other customers. If a merchant also has access to send payments we will usually refer to them as a **Merchant Payer** when they are acting as a payer." } [/block] [block:callout] { "type": "warning", "title": "", "body": "**Platforms** are those customers who have access to create new merchant/payer customers. If a platform also has access to accept or send payments we will usually refer to them as a **Platform Merchant** or a **Platform Payer** when they are acting as a merchant or payer respectively." } [/block] [block:callout] { "type": "danger", "title": "", "body": "The Customers resource is almost exclusively for use by **Platforms**. Merchants and payers do not have a need to directly create other Customers." } [/block] ## Request [block:callout] { "type": "info", "title": "", "body": "The set of **plan names** available for a Platform to use when creating customers will be made available upon being given Platform access." } [/block] [block:callout] { "type": "info", "title": "", "body": "The **defaultSettings** parameter allows a Platform to apply settings to each Customer they create automatically. To use, a Platform will want to update their own customer resource with the desired default settings. When creating a new customer, if the \"settings\" parameter on the new customer is not set, the Platform's default settings will be applied to the new customer settings instead." } [/block] [block:callout] { "type": "info", "body": "The **defaultBank** parameter immediately attaches a default bank to the customer, which after verification may be used for withdrawing available balance or paying subscription fees. Please note that more banks can be added to the customer at a later time. Also these banks can be made the default bank by using the [isDefault](doc:the-bank-resource) flag." } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Specification", "0-0": "name", "1-0": "email", "4-0": "[settings](doc:customer-settings)", "2-0": "planKey", "5-0": "[defaultSettings](doc:customer-settings)", "3-0": "description", "6-0": "[address](doc:address)", "7-0": "[contact](doc:contact)", "9-0": "[legalEntity](doc:customer-legal-entity)", "10-0": "[merchant](doc:customer-merchant)", "13-0": "[meta](doc:meta)", "0-1": "**Type**: String\n**Length**: 1-256\n**Example**: Elliana Weaper\n**Description**: The full name of the customer", "1-1": "**Type**: String\n**Format**: Valid Email user@domain\n**User Length**: 1-64 characters\n**Total Length**: 1-128 characters\n**Example**: eweaper@paystand.com\n**Description**: The email address for the customer", "2-1": "**Type**: String\n**Length**: 1-256\n**Example**: PayStand Lite\n**Description**: The name of the plan for the Customer. planName is deprecated but still supported until further notice.", "3-1": "**Type**: String\n**Length**: 1-512\n**Example**: Elliana Weaper\n**Description**: An optional description for this customer.", "4-1": "**Type**: JSON Object\n**Format**: [Settings](doc:customer-settings) \n**Description**: The settings for the Customer", "5-1": "**Type**: JSON Object\n**Format**: [Settings](doc:customer-settings) \n**Description**: These default settings will apply to any child customer created by this customer.", "6-1": "**Type**: JSON Object\n**Format**: [Address](doc:address) \n**Description**: The address of the customer.", "7-1": "**Type**: JSON Object\n**Format**: [Contact](doc:contact) \n**Description**: The contact information for the customer.", "9-1": "**Type**: JSON Object\n**Format**: [legalEntity](doc:customer-legal-entity)\n**Description**: Detailed information about the legal entity", "10-1": "**Type**: JSON Object\n**Format**: [Merchant](doc:customer-merchant)\n**Description**: Detailed information about the particular merchant.", "13-1": "**Type**: JSON Object\n**Format**: [Meta](doc:meta)", "8-0": "[defaultBank](doc:the-bank-resource)", "8-1": "**Type**: JSON Object\n**Format**: [Bank](doc:the-bank-resource)\n**Description**: The default bank to which the customer can withdraw funds and (optional) against which subscriptions fees may get charged.", "11-0": "username", "12-0": "password", "11-1": "**Type**: String\n**Length**: 1-128 characters\n**Description**: The username of a new user to be created with access to the newly created customer.", "12-1": "**Type**: String\n**Length**: 1-128 characters\n**Description**: The password of said new user to be created with access to the newly created customer." }, "cols": 2, "rows": 14 } [/block] ## Response [block:callout] { "type": "warning", "title": "", "body": "The **publishable and secret** API keys will only be made available in the Customer creation response. All subsequent responses will exclude these values. Make sure you save these keys." } [/block] [block:callout] { "type": "success", "title": "", "body": "The \"id\" parameter in the Customer response is the value you will be using for authenticated calls. Use the value of Customer id as the value for the **X-CUSTOMER-ID** header when making authenticated API requests." } [/block] [block:callout] { "type": "info", "title": "", "body": "Pay close attention to the **planStatus** object as it will guide you as to what the remaining steps are to get your Customer to have full access to the plan features." } [/block] All of the parameters from the request will appear in the response. In addition, the following parameters will also be included in the response: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "id", "1-0": "object", "3-1": "Embedded [planStatus](doc:customer-plan-status) object.", "3-0": "[planStatus](doc:customer-plan-status)", "6-0": "created", "7-0": "lastUpdated", "2-0": "status", "6-1": "The date the customer was created.", "7-1": "The date the customer was lastUpdated", "0-1": "The unique identifier for the customer.", "1-1": "Will have value \"customer\" indicating this object is a customer response.", "2-1": "The current status of the customer. One of: \"created\", \"active\", \"disabled\", \"locked\"", "4-0": "keys.publishable", "4-1": "The publishable key associated with the customer. Note: this is only given once during customer creation.", "5-0": "keys.secret", "5-1": "The secret key associated with the customer. Note: this is only given once during customer creation." }, "cols": 2, "rows": 8 } [/block] [block:code] { "codes": [ { "code": "{\n \"name\": \"Elliana Weaper\",\n \"email\": \"eWeaper@paystand.com\",\n \"planName\": \"PayStand Lite\",\n \"description\": \"Customer description\",\n \"meta\": {..},\n \"address\": {..},\n \"contact\": {..},\n \"legalEntity\": {..},\n \"merchant\": {..},\n \"settings\": {..},\n \"defaultSettings\": {..}\n}", "language": "json", "name": "Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"id\": \"b41f8286b3d1421db07ef01d\",\n \"object\": \"customer\",\n \"name\": \"Elliana Weaper\",\n \"email\": \"eWeaper@paystand.com\",\n \"description\": \"Customer description\",\n \"planName\": \"PayStand Lite\",\n \"meta\": {..},\n \"address\": {..},\n \"contact\": {..},\n \"legalEntity\": {..},\n \"merchant\": {..},\n \"settings\": {..},\n \"defaultSettings\": {..},\n \"keys\": {..},\n \"planStatus\": {..},\n \"status\": \"active\",\n \"created\": \"2015-08-08T06:29:47.000Z\",\n \"lastUpdated\": \"2015-11-08T06:30:00.000Z\",\n}", "language": "json", "name": "Response" } ], "sidebar": true } [/block]