{"_id":"565ccf96f8bc860d006842f4","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"},"category":{"_id":"55e4e070177b6e0d00333142","pages":["55e5ea619416190d00dc3a33","55e5eb23f11ba80d00323a03","55e621446015ce1900eadcb7","55e621afd101191900f30d1b","56093ab6a7cc2f0d00d975c5","56093ace6d8c440d000c7a6b","565c9f43c23e2f0d00383d06","565ccf96f8bc860d006842f4"],"version":"55de36ec9067202b00de0015","project":"55dd0853d2d97337001800e2","__v":8,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-08-31T23:17:04.510Z","from_sync":false,"order":6,"slug":"cards","title":"Cards"},"parentDoc":null,"githubsync":"","__v":55,"user":"55dd080d0efd5821000d53b3","project":"55dd0853d2d97337001800e2","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-30T22:37:10.559Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"Creating card resources implies that client system has card data. As a result PayStand will only sanctify creating cards from PCI DSS Compliant systems.\",\n  \"title\": \"Creating Card Resources and PCI Compliance\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Managing cards\",\n  \"body\": \"The Card resource allows you to create, update, and retrieve card details. You might create a Card to be used with a subscriptions.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Use the [Create a payment (authenticated)](doc:create-a-payment-secure) endpoint to create a payment with a card on file by providing a cardId. This feature is available depending on your plan.\",\n  \"title\": \"Payment with a card on file\"\n}\n[/block]\n## Request \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Specification\",\n    \"0-0\": \"nameOnCard\",\n    \"1-0\": \"cardNumber\",\n    \"2-0\": \"expirationMonth\",\n    \"3-0\": \"expirationYear\",\n    \"4-0\": \"securityCode\",\n    \"5-0\": \"description\",\n    \"6-0\": \"billingAddress\",\n    \"9-0\": \"\",\n    \"7-0\": \"meta\",\n    \"0-1\": \"**Type**: String\\n**Length**: 0-64 characters\\n**Example**: \\\"Christina Chan\\\"\\n**Description**: The name on the card.\",\n    \"1-1\": \"**Type**: String\\n**Format**: Valid Credit Card Number\\n**Example**: \\\"4242424242424242\\\"\\n**Description**: The credit card number.\",\n    \"2-1\": \"**Type**: String\\n**Format**: Integer String between 01-12\\n**Example**: \\\"04\\\"\\n**Description**: The expiration month of the card.\",\n    \"3-1\": \"**Type**: String\\n**Format**: Integer String between 2015-2050\\n**Example**: \\\"2019\\\"\\n**Description**: The expiration year of the card.\",\n    \"4-1\": \"**Type**: String\\n**Format**: Valid CVV Code\\n**Length**: 3-4\\n**Example**: \\\"123\\\"\\n**Description**: The security code for the card.\",\n    \"5-1\": \"**Type**: String\\n**Length**: 0-512 characters\\n**Example**: \\\"My rewards card\\\"\\n**Description**: An optional short description that describes the reason for the refund.\",\n    \"6-1\": \"**Type**: JSON Object\\n**Format**: [Address](doc:address) \\n**Description**: The billing address for the card.\",\n    \"7-1\": \"**Type**: JSON Object\\n**Format**: [Meta](doc:meta) \\n**Description**: An optional object to store custom data for the Card.\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n## Response\n\nWith the exception of cardNumber, all Request parameters will be returned in the Response object. The card number is never returned in responses. The last four digits of the card number are returned instead. The following parameters may also be returned in card responses.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"0-0\": \"id\",\n    \"1-0\": \"object\",\n    \"2-0\": \"brand\",\n    \"3-0\": \"last4\",\n    \"4-0\": \"fingerprint\",\n    \"6-0\": \"created\",\n    \"7-0\": \"lastUpdated\",\n    \"5-0\": \"status\",\n    \"0-1\": \"The unique identifier for the card.\",\n    \"1-1\": \"Will have value \\\"card\\\" indicating that the object is a card response.\",\n    \"2-1\": \"The brand of the card (ie visa, mastercard, amex, discover, etc).\",\n    \"3-1\": \"The last four digits of the card.\",\n    \"4-1\": \"A unique hash given to the card that uniquely identifies the card characteristics.\",\n    \"6-1\": \"The date the card was created.\",\n    \"7-1\": \"The date the card was last updated.\",\n    \"5-1\": \"The current status of the card. One of: \\\"created\\\", \\\"active\\\", \\\"disabled\\\"\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"nameOnCard\\\": \\\"Christina Chan\\\",\\n  \\\"cardNumber\\\": \\\"4000000000000077\\\",\\n  \\\"expirationMonth\\\": \\\"01\\\",\\n  \\\"expirationYear\\\": \\\"2019\\\",\\n  \\\"securityCode\\\": \\\"123\\\",\\n  \\\"description\\\": \\\"My rewards card\\\",\\n\\t\\\"billingAddress\\\": {..},\\n  \\\"meta\\\": {}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Card Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"object\\\":\\\"card\\\",\\n  \\\"id\\\":\\\"5ebz8zwt19hytc61py01bjhl\\\",\\n  \\\"nameOnCard\\\":\\\"Christina Chan\\\",\\n  \\\"brand\\\":\\\"visa\\\",\\n  \\\"last4\\\":\\\"0077\\\",\\n  \\\"expirationMonth\\\":\\\"09\\\",\\n  \\\"expirationYear\\\":\\\"2019\\\",\\n  \\\"fingerprint\\\":\\\"z0h4439popoyeqy9he6yxhn\\\",\\n  \\\"billingAddress\\\":{\\n    \\\"street1\\\":\\\"123 test st\\\",\\n    \\\"street2\\\":\\\"3g\\\",\\n    \\\"city\\\":\\\"santa cruz\\\",\\n    \\\"state\\\":\\\"CA\\\",\\n    \\\"postalCode\\\":\\\"95060\\\",\\n    \\\"country\\\":\\\"USA\\\"\\n  },\\n  \\\"meta\\\":{\\n    \\\"clientCustomerId\\\": \\\"14f3c86236714b508c58f9956831fb6b\\\"\\n  },\\n  \\\"created\\\":\\\"2015-10-28T22:55:01.000Z\\\",\\n  \\\"lastUpdated\\\":\\\"2015-10-28T22:55:02.000Z\\\",\\n  \\\"status\\\":\\\"active\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Card Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"the-card-resource","type":"basic","title":"Card resource"}
[block:callout] { "type": "danger", "body": "Creating card resources implies that client system has card data. As a result PayStand will only sanctify creating cards from PCI DSS Compliant systems.", "title": "Creating Card Resources and PCI Compliance" } [/block] [block:callout] { "type": "success", "title": "Managing cards", "body": "The Card resource allows you to create, update, and retrieve card details. You might create a Card to be used with a subscriptions." } [/block] [block:callout] { "type": "info", "body": "Use the [Create a payment (authenticated)](doc:create-a-payment-secure) endpoint to create a payment with a card on file by providing a cardId. This feature is available depending on your plan.", "title": "Payment with a card on file" } [/block] ## Request [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Specification", "0-0": "nameOnCard", "1-0": "cardNumber", "2-0": "expirationMonth", "3-0": "expirationYear", "4-0": "securityCode", "5-0": "description", "6-0": "billingAddress", "9-0": "", "7-0": "meta", "0-1": "**Type**: String\n**Length**: 0-64 characters\n**Example**: \"Christina Chan\"\n**Description**: The name on the card.", "1-1": "**Type**: String\n**Format**: Valid Credit Card Number\n**Example**: \"4242424242424242\"\n**Description**: The credit card number.", "2-1": "**Type**: String\n**Format**: Integer String between 01-12\n**Example**: \"04\"\n**Description**: The expiration month of the card.", "3-1": "**Type**: String\n**Format**: Integer String between 2015-2050\n**Example**: \"2019\"\n**Description**: The expiration year of the card.", "4-1": "**Type**: String\n**Format**: Valid CVV Code\n**Length**: 3-4\n**Example**: \"123\"\n**Description**: The security code for the card.", "5-1": "**Type**: String\n**Length**: 0-512 characters\n**Example**: \"My rewards card\"\n**Description**: An optional short description that describes the reason for the refund.", "6-1": "**Type**: JSON Object\n**Format**: [Address](doc:address) \n**Description**: The billing address for the card.", "7-1": "**Type**: JSON Object\n**Format**: [Meta](doc:meta) \n**Description**: An optional object to store custom data for the Card." }, "cols": 2, "rows": 8 } [/block] ## Response With the exception of cardNumber, all Request parameters will be returned in the Response object. The card number is never returned in responses. The last four digits of the card number are returned instead. The following parameters may also be returned in card responses. [block:parameters] { "data": { "h-0": "Parameter", "0-0": "id", "1-0": "object", "2-0": "brand", "3-0": "last4", "4-0": "fingerprint", "6-0": "created", "7-0": "lastUpdated", "5-0": "status", "0-1": "The unique identifier for the card.", "1-1": "Will have value \"card\" indicating that the object is a card response.", "2-1": "The brand of the card (ie visa, mastercard, amex, discover, etc).", "3-1": "The last four digits of the card.", "4-1": "A unique hash given to the card that uniquely identifies the card characteristics.", "6-1": "The date the card was created.", "7-1": "The date the card was last updated.", "5-1": "The current status of the card. One of: \"created\", \"active\", \"disabled\"", "h-1": "Description" }, "cols": 2, "rows": 8 } [/block] [block:code] { "codes": [ { "code": "{\n \"nameOnCard\": \"Christina Chan\",\n \"cardNumber\": \"4000000000000077\",\n \"expirationMonth\": \"01\",\n \"expirationYear\": \"2019\",\n \"securityCode\": \"123\",\n \"description\": \"My rewards card\",\n\t\"billingAddress\": {..},\n \"meta\": {}\n}", "language": "json", "name": "Card Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"object\":\"card\",\n \"id\":\"5ebz8zwt19hytc61py01bjhl\",\n \"nameOnCard\":\"Christina Chan\",\n \"brand\":\"visa\",\n \"last4\":\"0077\",\n \"expirationMonth\":\"09\",\n \"expirationYear\":\"2019\",\n \"fingerprint\":\"z0h4439popoyeqy9he6yxhn\",\n \"billingAddress\":{\n \"street1\":\"123 test st\",\n \"street2\":\"3g\",\n \"city\":\"santa cruz\",\n \"state\":\"CA\",\n \"postalCode\":\"95060\",\n \"country\":\"USA\"\n },\n \"meta\":{\n \"clientCustomerId\": \"14f3c86236714b508c58f9956831fb6b\"\n },\n \"created\":\"2015-10-28T22:55:01.000Z\",\n \"lastUpdated\":\"2015-10-28T22:55:02.000Z\",\n \"status\":\"active\"\n}", "language": "json", "name": "Card Response" } ], "sidebar": true } [/block]