Simulate inbound return request
api reference simulate receiving a request to return funds from the receiving bank after payment settlement this api can only be run in the cross river sandbox docid kaqyvqvnuagqnekfkcuy { "name" "endpoint /rtp/payments/{id}/simulated inbound return request", "method" "post", "url" "https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request", "tab" "examples", "examples" { "languages" \[ { "id" "curl example", "language" "curl", "code" "curl x post https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request \\\\\\\\\n h \\"authorization bearer your access token\\" \\\\\\\\\n h \\"content type application/json\\" \\\\\\\\\n d '{\n \\"additionalinfo\\" \\"sample value\\",\n \\"casecreatorname\\" \\"john doe\\",\n \\"originatororganybic\\" \\"chasus33xxx\\",\n \\"originatororglei\\" \\"sample value\\",\n \\"originatororgotherid\\" \\"sample value\\"\n}'" }, { "id" "nodejs example", "language" "nodejs", "code" "const axios = require('axios');\n\nconst options = {\n method 'post',\n url 'https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request',\n headers {\n 'authorization' 'bearer your access token',\n 'content type' 'application/json',\n },\n data {\n \\"additionalinfo\\" \\"sample value\\",\n \\"casecreatorname\\" \\"john doe\\",\n \\"originatororganybic\\" \\"chasus33xxx\\",\n \\"originatororglei\\" \\"sample value\\",\n \\"originatororgotherid\\" \\"sample value\\"\n}\n};\n\naxios(options)\n then(response => console log(response data))\n catch(error => console error(error));" }, { "id" "python example", "language" "python", "code" "import requests\n\nurl = 'https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request'\nheaders = {\n 'authorization' 'bearer your access token',\n 'content type' 'application/json',\n}\ndata = {\n \\"additionalinfo\\" \\"sample value\\",\n \\"casecreatorname\\" \\"john doe\\",\n \\"originatororganybic\\" \\"chasus33xxx\\",\n \\"originatororglei\\" \\"sample value\\",\n \\"originatororgotherid\\" \\"sample value\\"\n}\n\nresponse = requests post(url, headers=headers, json=data)\nprint(response json())" }, { "id" "ruby example", "language" "ruby", "code" "require 'net/http'\nrequire 'json'\n\nuri = uri('https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request')\nhttp = net http new(uri host, uri port)\nhttp use ssl = true\n\nrequest = net http post new(uri)\nrequest\['authorization'] = 'bearer your access token'\nrequest\['content type'] = 'application/json'\nrequest body = {\n \\"additionalinfo\\" \\"sample value\\",\n \\"casecreatorname\\" \\"john doe\\",\n \\"originatororganybic\\" \\"chasus33xxx\\",\n \\"originatororglei\\" \\"sample value\\",\n \\"originatororgotherid\\" \\"sample value\\"\n} to json\n\nresponse = http request(request)\nputs json parse(response body)" }, { "id" "go example", "language" "go", "code" "package main\n\nimport (\n \\"bytes\\"\n \\"encoding/json\\"\n \\"fmt\\"\n \\"io/ioutil\\"\n \\"net/http\"\n)\n\nfunc main() {\n payload = \[]byte(`{\n \\"additionalinfo\\" \\"sample value\\",\n \\"casecreatorname\\" \\"john doe\\",\n \\"originatororganybic\\" \\"chasus33xxx\\",\n \\"originatororglei\\" \\"sample value\\",\n \\"originatororgotherid\\" \\"sample value\\"\n}`)\n\n req, = http newrequest(\\"post\\", \\"https //sandbox crbcos com/rtp/v1/payments/{id}/simulated inbound return request\\", bytes newbuffer(payload))\n req header add(\\"authorization\\", \\"bearer your access token\\")\n req header add(\\"content type\\", \\"application/json\\")\n\n client = \&http client{}\n resp, err = client do(req)\n if err != nil {\n panic(err)\n }\n defer resp body close()\n\n body, = ioutil readall(resp body)\n fmt println(string(body))\n}" } ] }, "results" { "languages" \[ { "id" "202", "language" "202", "code" "" }, { "id" "400", "language" "400", "code" "{\\\n \\\\\\"errors\\\\\\" \[{\\\n \\\\\\"code\\\\\\" 2001,\\\n \\\\\\"message\\\\\\" \\\\\\"validation error\\\\\\"\\\n }]\\\n}" }, { "id" "401", "language" "401", "code" "{\\\n \\\\\\"errors\\\\\\" \[{\\\n \\\\\\"code\\\\\\" 3001,\\\n \\\\\\"message\\\\\\" \\\\\\"unauthorized\\\\\\"\\\n }]\\\n}" } ] }, "request" { "pathparameters" \[ { "name" "id", "type" "string", "kind" "required", "description" "unique identifier for the loan guid" } ], "queryparameters" \[], "headerparameters" \[], "formdataparameters" \[], "bodydataparameters" \[ { "name" "additionalinfo", "kind" "optional", "type" "string", "description" "provides supplementary details regarding the status report" }, { "name" "casecreatorname", "kind" "required", "type" "string", "description" "casecreatorname" }, { "name" "originatororganybic", "kind" "optional", "type" "string", "description" "originatororganybic" }, { "name" "originatororglei", "kind" "optional", "type" "string", "description" "originatororglei" }, { "name" "originatororgotherid", "kind" "optional", "type" "string", "description" "unique identifier for originatororgother (uuid format)" } ] }, "response" \[], "description" "", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "autogeneratedanchorslug" "endpoint rtppaymentsidsimulated inbound return req", "legacyhash" "hpdfhvmncheskn2aubf0m" } use cases test payment return handling in sandbox environment validate return reason code processing develop return dispute workflows without affecting real payments train staff on various return scenarios (fraud, closed account, incorrect account) error codes code scenario resolution 2021 only credit transfers can be refunded verify request parameters and retry 2015 payment had already been refunded verify request parameters and retry 2019 return can not be requested for a credit transfer due to payment status verify request parameters and retry 2028 simulator credit transfer must be inbound verify request parameters and retry 2022 payment already has an existing return of funds in process verify request parameters and retry 2039 reasoncode is missing or invalid verify request parameters and retry 2063 reason code uapa only available for rtp v5 0 please use reason code frad verify request parameters and retry 2042 additionalinfo is required for specified reasoncode verify request parameters and retry 2066 case creator name can only be used for fednow payments verify request parameters and retry 3001 unauthorized verify bearer token is valid and not expired 3002 insufficient permissions verify user has required permission for this operation business rules requires valid bearer token with permissions permissions payments simulate request validation performed before processing errors return 400 bad request with detailed error information rate limiting may apply to prevent abuse