{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/app/updateSession","auth":"never","results":{"codes":[{"name":"","code":"{\n \"status\": \"success\",\n \"session\": {\n // see Session JSON\n\t\t\"hash\": \"0ds1mku0o018wqtkscqcm2kt75l6gjtf57dfb8c04a238\",\n \"status\": \"incomplete\",\n \"errors\": {...},\n \t\"values\": {...},\n ...\n\t}\n}","language":"json","status":200},{"status":400,"language":"json","code":"{\n \"status\": \"error\",\n \"error\": \"...\"\n}"}]},"settings":"","examples":{"codes":[{"code":"<?php \n$curl = curl_init(\"https://secure.fundraisingbox.com/app/updateSession\");\n \ncurl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__).'/cacert.pem');\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($curl, CURLOPT_POST, true);\ncurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\n \n// set values\n$data = array(\n \"hash\" => \"{your_form_hash}\",\n \"fbSessionHash\" => \"{your_session_hash}\",\n \"payment\" => array(\n\t\t\"first_name\" => \"Max\",\n \"last_name\" => \"Mustermann\",\n\t\t\"amount\" => \"20\"\n )\n);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n \n// receive session\n$result = json_decode(curl_exec($curl), true);\n$status = $result[\"status\"];\n$session = $result[\"session\"];\n \n// TODO error handling\n$curl_error = curl_error($curl);\n$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n$curl_error_no = curl_errno($curl);\nif($curl_error)\n{\n // do something\n}\n \ncurl_close($curl);\n\n// ...","language":"php"}]},"method":"post","params":[{"name":"hash","type":"string","default":"","desc":"required: hash of the form","required":false,"in":"query","ref":"","_id":"57dfbb664d55c022002811df"},{"name":"fbSessionHash","type":"string","default":"","desc":"required: hash of an exisiting session to update or read the session","required":false,"in":"query","ref":"","_id":"57e0e5d3082ddd190062266c"},{"name":"payment","type":"array_mixed","default":"","desc":"optional","required":false,"in":"query","ref":"","_id":"571f9219e54f2d0e003ebb38"},{"name":"sandbox","type":"string","default":"","desc":"optional: sandbox hash of the form","required":false,"in":"query","ref":"","_id":"61289381224817002c57c5eb"}]},"next":{"description":"","pages":[]},"title":"app/updateSession","type":"endpoint","slug":"appupdatesession","excerpt":"","body":"With this method you can update or read an existing session. The sent data is immediately validated as good as possible, so you can easily show errors in a multi-step-form.\nSee [Session JSON](doc:session-json) for details.\n\n**Update payment session**\nUse the session hash you got from create and send additional data or override data in your session.\n\n**Read payment session**\nUse the session hash without sending payment-data to read the session.\n[block:callout]\n{\n \"type\": \"warning\",\n \"title\": \"The session must not be processed.\"\n}\n[/block]","updates":[],"order":5,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"57dfb45e5927cb0e002bce39","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Session-API (Enterprise)","slug":"session-api","order":2,"from_sync":false,"reference":true,"_id":"571f7d2720695f3400f38797","createdAt":"2016-04-26T14:37:27.487Z","__v":1,"project":"571f5e8cd8667f0e00a3c498","version":"571f5e8cd8667f0e00a3c49b"},"project":"571f5e8cd8667f0e00a3c498","parentDoc":null,"__v":5,"createdAt":"2016-09-19T09:48:14.225Z","githubsync":"","user":"5720c075db52d01700f5d1e4","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["571f5e8cd8667f0e00a3c49c","571f73cfcb4baa0e00d13a80","571f7451cb4baa0e00d13a88","571f7d2720695f3400f38797","571f7fb0ac2a080e0014c661","571f884be54f2d0e003ebb0a","572200c9ecb38d0e00d80ebd","572c301e7c8eff0e00aaa174","57df91b2c6348d0e0020c452","57e104db9ff1e21900a721ab","57fd04caeaa77f19008b8202","5899c7113514ce0f0014da84","5cbeda4b862d090013abd413","5e60d6278f8b380072f0b1e3"],"_id":"571f5e8cd8667f0e00a3c49b","hasDoc":true,"releaseDate":"2016-04-26T12:26:52.312Z","__v":14,"hasReference":true,"createdAt":"2016-04-26T12:26:52.312Z","project":"571f5e8cd8667f0e00a3c498"}}
postapp/updateSession
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Query Params
hash:
string
required: hash of the form
fbSessionHash:
string
required: hash of an exisiting session to update or read the session
payment:
array of mixed
optional
sandbox:
string
optional: sandbox hash of the form