Update Online Bill Payments made by Patients: POST securePayments

Update Online Bill Payments made by Patients: POST securePayments

Description
Update the Medfusion system when a payment previously retrieved using the GET securePayments call is posted to a patient’s account. This allows the practice to see the most up to date status of a payment in the Medfusion Practice Portal. Reference the payment ID received to do this.

URI
https://{server}/v1/practice/{PracticeID}/securePayments
HTTP Method
POST
Required URI Values
server
The domain name of the test or production system.

  • Test system: integration.demo.medfusion.net
  • Production system: integration.medfusion.net
PracticeID
The unique practice integration ID for a given practice. Medfusion will provide a practice ID that you can use during development.

Success Response
  • 202 – Accepted. The message has passed XML validation, been stored, and will be processed later. There may still be errors found when it is processed.
Error Response
  • 400 – Bad request. The data given in the HTTP request failed validation.
  • 401 – Unauthorized request. Check the OAuth attributes.
  • 404 – Not found. The requested resource was not found in the server.
  • 415 – Unsupported media type. The server could not process the request because the content type specified in the request header is not supported.

Sample Call
HTTP Request

POST https://integration.medfusion.net/v1/practice/1c7ecf9f-9700-4e70-b976-9356db658274/securePayments

Body

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:Payments
xmlns:ns2="http://schema.intuit.com/health/securePayments/v1">
   <PaymentsMessageHeaders/>
      <Sender deviceName="12.5"/>
      <Partner deviceName="Test Application"/>
      <Destination deviceName="Test Destination Name"/>
   </PaymentsMessageHeaders>
   <PracticeInformation>
      <PracticeIdentifier>
         <PracticeId>1c7ecf9f-9700-4e70-b976-9356db658274</PracticeId>
      </PracticeIdentifier>
   </PracticeInformation>
   <Payment id="782b8228-2527-4e2a-825c-a4afabe74ae0">
      <PaymentDateTimestamp>2014-10-27T11:49:31.956Z</PaymentDateTimestamp>
      <PaymentType>BillPayment</PaymentType>
      <PracticePatientId>12345</PracticePatientId>
      <PatientAccountNumber>12345</PatientAccountNumber>
      <PaymentStatus>POSTED</PaymentStatus>
      *Note the change in status of the payment.
      <PaymentInformation>
         <AmountPaid>50.00</AmountPaid>
         <CCLast4Digits>1111</CCLast4Digits>
         <PaymentComments>Copay for Appointment</PaymentComments>
         <ProcessingFeeAmount>0.00</ProcessingFeeAmount>
      </PaymentInformation>
   </Payment>
</ns2:Payments>
Sample Response
Response Header

202 OK
Content-Length:180
Content-Type: application/xml

Response Body – Successful Completion (Defined in ProcessingResponse.xsd)

<?xml version="1.0" encoding="UTF-8"?>
<ProcessingResponse xmlns:ns2="http://schema.intuit.com/health/admin/v1">
   <DataJobId>652a26dc-2524-4ed2-9c58-6e7ea7384a2c</DataJobId>
   <MessageId>81e083a7-29c6-453d-864c-f6d8f3644eb5</MessageId>
   <ProcessingStatus>Successful</ProcessingStatus>
   <ResponseMessage></ResponseMessage>
</ProcessingResponse>

The “DataJobId” identifies the batch. The “MessageId” value is a unique identifier for this api message, and is intended to be used in future api calls to retrieve the message’s processing status.