Trying to create Cash payment getting error

68 views
Skip to first unread message
Assigned to desani...@gmail.com by aaron....@oracle.com

Monikandan Paulpandian

unread,
Feb 15, 2021, 6:34:28 AM2/15/21
to Cerner FHIR Developers
Details used:
POST URL :https://fhir-ehr-.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Basic
Scope : FinancialTransaction.write

Getting response :
"{\"resourceType\":\"OperationOutcome\",\"issue\":[{\"severity\":\"error\",\"code\":\"forbidden\",\"diagnostics\":\"Bearer realm=\\\"fhir-ehr.cerner.com\\\", error=\\\"insufficient_scope\\\"\",\"expression\":[\"http.Authorization\"]}]}",

403 forbidden ..


Request from the cerner site
{ "resourceType": "Basic", "code": { "coding": [ { "code": "FinancialTransaction" } ] }, "identifier": [ { "value": "14266754", "use": "usual" } ], "extension": [ { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-type", "valueCodeableConcept": { "coding": [ { "code": "payment", "system": "http://terminology.hl7.org/CodeSystem/payment-type" } ] } }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-method", "valueCodeableConcept": { "coding": [ { "code": "CASH", "display": "Cash", "system": "http://terminology.hl7.org/CodeSystem/v2-0570", "userSelected": true } ], "text": "Cash" } }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-tendered-amount", "valueMoney": { "value": 12.0, "currency": "USD" } }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-allocation", "extension": [ { "url": "target", "valueReference": { "reference": "Encounter/97953536" } }, { "url": "amount", "valueMoney": { "value": 12.0, "currency": "USD" } } ] }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-alias", "valueString": "0111" }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-location", "valueString": "98920358" }, { "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/financial-transaction-amount", "valueMoney": { "value": 12.0, "currency": "USD" } } ] }

Monikandan Paulpandian

unread,
Feb 15, 2021, 6:35:56 AM2/15/21
to Cerner FHIR Developers

Benjamin Eichhorn (Cerner)

unread,
Feb 15, 2021, 9:05:50 AM2/15/21
to Cerner FHIR Developers
Hi, 

Per our group guidelines, could you please post the X-Request-Id associated with your request? This is located in the headers of the response.

Thanks,
Ben (Cerner)

Monikandan Paulpandian

unread,
Feb 15, 2021, 9:10:14 AM2/15/21
to Cerner FHIR Developers

Here is the  X-Request-Id: "8cf357fa-f559-48f9-82a5-b3768ee3fd61"

Fenil Desani (Cerner)

unread,
Feb 15, 2021, 11:20:02 AM2/15/21
to Cerner FHIR Developers
For FinancialTransactions, you need the Basic.write scope as well.
  • When creating FinancialTransactions, a Basic OAuth2 token scope is required in addition to a FinancialTransaction Oauth2 token scope. [1]

Monikandan Paulpandian

unread,
Feb 16, 2021, 1:06:54 AM2/16/21
to Cerner FHIR Developers
still getting the same error. this time give following details

Scope : "System/FinancialTransaction.write System/Basic.write"        (space in between).

X-Request ID :"206975fd-9071-40d3-a169-33bd3c3960d4"

please suggest me in detail

Benjamin Eichhorn (Cerner)

unread,
Feb 16, 2021, 9:03:12 AM2/16/21
to Cerner FHIR Developers
Hi,

Scopes are case-sensitive so please ensure that you are sending it system/Basic.write and system/FinancialTransaction.write also ensure in the code Console you have authorized your app for those scopes.

Thanks,
Ben (Cerner)

Monikandan Paulpandian

unread,
Feb 16, 2021, 11:07:10 AM2/16/21
to Cerner FHIR Developers
Still getting the same exception
System.Exception: '{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"forbidden","diagnostics":"Bearer realm=\"fhir-ehr.cerner.com\", error=\"insufficient_scope\"","expression":["http.Authorization"]}]}'


X-Request-id :"9f220f58-e014-44d2-bf22-8fa11f53e842"

Question:
Scope :"system/Basic.write system/FinancialTransaction.write"

Fenil Desani (Cerner)

unread,
Feb 16, 2021, 1:06:06 PM2/16/21
to Cerner FHIR Developers
Your Application doesn't seem to have the system/Basic.write scope in the code Console.
As mentioned by Ben, make sure you have system/Basic.write and system/FinancialTransaction.write scopes, authorized for your App in the code Console.

Also, once you get the token, make sure it has all the scopes returned successfully and use that token to make the API call.

Lastly, looking at your POST body,
The identifier should be unique so '14266754' may not work. Provide another unique ID.

The location value needs to be updated to: 98920385

Monikandan Paulpandian

unread,
Feb 17, 2021, 2:02:48 AM2/17/21
to Cerner FHIR Developers
Awesome,  we enabled or selected the Basic.write and FinancialTransaction.write in code console. It resolves the "insufficient_scope" issue. Then I corrected the data as per Fenil Desani (Cerner). It works perfect now.. Thanks.

Thanks Fenil and Ben!.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages