{"swagger":"2.0","info":{"description":"Payment API exposed to external systems","title":"Payment public API documentation"},"host":"localhost","basePath":"/","tags":[{"name":"Case","description":"Case Controller"},{"name":"Pay By Account","description":"PBA Controller"},{"name":"Payment","description":"Payment Controller"},{"name":"Telephony","description":"Telephony Controller"}],"paths":{"/cases/{case}/payments":{"get":{"tags":["Case"],"summary":"Get payments for a case","description":"Get payments for a case","operationId":"retrieveCasePaymentsUsingGET","produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"case","in":"path","description":"Ccd Case Number","required":true,"type":"string"}],"responses":{"200":{"description":"Payments retrieved","schema":{"$ref":"#/definitions/PaymentsResponse"}},"400":{"description":"Bad request"}},"deprecated":false}},"/payments":{"get":{"tags":["Payment"],"summary":"Get payments for between dates","description":"Get list of payments. You can optionally provide start date and end dates which can include times as well. Following are the supported date/time formats. These are yyyy-MM-dd, dd-MM-yyyy,yyyy-MM-dd HH:mm:ss, dd-MM-yyyy HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss, dd-MM-yyyy'T'HH:mm:ss","operationId":"retrievePaymentsUsingGET","produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"ccd_case_number","in":"query","description":"Ccd Case Number","required":false,"type":"string"},{"name":"end_date","in":"query","description":"End Date Time String","required":false,"type":"string"},{"name":"payment_method","in":"query","description":"Payment Method Type","required":false,"type":"string"},{"name":"pba_number","in":"query","description":"Pba Number","required":false,"type":"string"},{"name":"service_name","in":"query","description":"Service Type","required":false,"type":"string"},{"name":"start_date","in":"query","description":"Start Date Time String","required":false,"type":"string"}],"responses":{"200":{"description":"Payments retrieved","schema":{"$ref":"#/definitions/PaymentsResponse"}},"400":{"description":"Bad request"}},"deprecated":false}},"/payments/{reference}/status/{status}":{"patch":{"tags":["Payment"],"summary":"Update payment status by payment reference","description":"Update payment status by payment reference","operationId":"updatePaymentStatusUsingPATCH","consumes":["application/json"],"produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"reference","in":"path","description":"Reference","required":true,"type":"string"},{"name":"status","in":"path","description":"Status","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseEntity"}},"204":{"description":"No content","schema":{"$ref":"#/definitions/ResponseEntity"}},"404":{"description":"Payment not found"}},"deprecated":false}},"/pba-accounts/{account}/payments":{"get":{"tags":["Pay By Account"],"summary":"Get payments for a PBA account","description":"Get list of payments","operationId":"retrievePaymentsByAccountUsingGET","produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"account","in":"path","description":"Account","required":true,"type":"string"}],"responses":{"200":{"description":"Payments retrieved","schema":{"$ref":"#/definitions/PaymentsResponse"}},"400":{"description":"Bad request"}},"deprecated":false}},"/reconciliation-payments":{"get":{"tags":["Payment"],"summary":"Get payments for Reconciliation for between dates","description":"Get list of payments. You can optionally provide start date and end dates which can include times as well. Following are the supported date/time formats. These are yyyy-MM-dd, dd-MM-yyyy,yyyy-MM-dd HH:mm:ss, dd-MM-yyyy HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss, dd-MM-yyyy'T'HH:mm:ss","operationId":"retrievePaymentsWithApportionUsingGET","produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"ccd_case_number","in":"query","description":"Ccd Case Number","required":false,"type":"string"},{"name":"end_date","in":"query","description":"End Date Time String","required":false,"type":"string"},{"name":"payment_method","in":"query","description":"Payment Method Type","required":false,"type":"string"},{"name":"pba_number","in":"query","description":"Pba Number","required":false,"type":"string"},{"name":"service_name","in":"query","description":"Service Type","required":false,"type":"string"},{"name":"start_date","in":"query","description":"Start Date Time String","required":false,"type":"string"}],"responses":{"200":{"description":"Payments retrieved","schema":{"$ref":"#/definitions/PaymentsResponse"}},"400":{"description":"Bad request"}},"deprecated":false}},"/telephony/callback":{"post":{"tags":["Telephony"],"summary":"Update payment status with pci-pal call back response","description":"pci-pal sends response in application/x-www-form-urlencoded format \n\nExample : orderCurrency=&orderAmount=488.50&orderReference=MOJTest1&ppAccountID=1210&transactionResult=SUCCESS \n&transactionAuthCode=test123&transactionID=3045021106&transactionResponseMsg=&cardExpiry=1220&cardLast4=9999& \ncardType=MASTERCARD&ppCallID=820782890&customData1=MOJTest120190124123432&customData2=MASTERCARD&customData3=CreditCard","operationId":"updateTelephonyPaymentStatusUsingPOST","consumes":["application/x-www-form-urlencoded"],"produces":["*/*"],"parameters":[{"name":"ServiceAuthorization","in":"header","description":"Service authorization header","required":true,"type":"string"},{"name":"cardExpiry","in":"formData","required":false,"type":"string"},{"name":"cardLast4","in":"formData","required":false,"type":"string"},{"name":"customData1","in":"formData","required":false,"type":"string"},{"name":"customData2","in":"formData","required":false,"type":"string"},{"name":"customData3","in":"formData","required":false,"type":"string"},{"name":"customData4","in":"formData","required":false,"type":"string"},{"name":"orderAmount","in":"formData","required":false,"type":"string"},{"name":"orderCurrency","in":"formData","required":false,"type":"string"},{"name":"orderReference","in":"formData","required":false,"type":"string"},{"name":"ppAccountID","in":"formData","required":false,"type":"string"},{"name":"ppCallID","in":"formData","required":false,"type":"string"},{"name":"transactionAuthCode","in":"formData","required":false,"type":"string"},{"name":"transactionID","in":"formData","required":false,"type":"string"},{"name":"transactionResponseMsg","in":"formData","required":false,"type":"string"},{"name":"transactionResult","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseEntity"}},"204":{"description":"No content","schema":{"$ref":"#/definitions/ResponseEntity"}},"404":{"description":"Payment not found"}},"deprecated":false}}},"definitions":{"FeeDto":{"type":"object","properties":{"allocated_amount":{"type":"number"},"amount_due":{"type":"number"},"apportion_amount":{"type":"number"},"apportioned_payment":{"type":"number"},"calculated_amount":{"type":"number"},"case_reference":{"type":"string"},"ccd_case_number":{"type":"string"},"code":{"type":"string"},"date_apportioned":{"type":"string","format":"date-time"},"date_created":{"type":"string","format":"date-time"},"date_receipt_processed":{"type":"string","format":"date-time"},"date_updated":{"type":"string","format":"date-time"},"description":{"type":"string"},"fee_amount":{"type":"number"},"id":{"type":"integer","format":"int32"},"jurisdiction1":{"type":"string"},"jurisdiction2":{"type":"string"},"memo_line":{"type":"string"},"natural_account_code":{"type":"string"},"net_amount":{"type":"number"},"payment_group_reference":{"type":"string"},"reference":{"type":"string"},"version":{"type":"string"},"volume":{"type":"integer","format":"int32"}},"title":"FeeDto"},"LinkDto":{"type":"object","properties":{"href":{"type":"string"},"method":{"type":"string"}},"title":"LinkDto"},"LinksDto":{"type":"object","properties":{"cancel":{"$ref":"#/definitions/LinkDto"},"next_url":{"$ref":"#/definitions/LinkDto"},"self":{"$ref":"#/definitions/LinkDto"}},"title":"LinksDto"},"PaymentAllocationDto":{"type":"object","properties":{"allocation_reason":{"type":"string"},"allocation_status":{"type":"string"},"date_created":{"type":"string","example":"yyyy-MM-dd'T'HH:mm:ss.SSSZ"},"explanation":{"type":"string"},"id":{"type":"string"},"payment_allocation_status":{"$ref":"#/definitions/PaymentAllocationStatus"},"payment_group_reference":{"type":"string"},"payment_reference":{"type":"string"},"reason":{"type":"string"},"receiving_office":{"type":"string"},"unidentified_reason":{"type":"string"},"user_id":{"type":"string"},"user_name":{"type":"string"}},"title":"PaymentAllocationDto"},"PaymentAllocationStatus":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"title":"PaymentAllocationStatus"},"PaymentDto":{"type":"object","properties":{"_links":{"$ref":"#/definitions/LinksDto"},"account_number":{"type":"string"},"amount":{"type":"number"},"banked_date":{"type":"string","format":"date-time"},"case_reference":{"type":"string"},"ccd_case_number":{"type":"string"},"channel":{"type":"string"},"currency":{"type":"string","enum":["GBP"]},"customer_reference":{"type":"string"},"date_created":{"type":"string","example":"yyyy-MM-dd'T'HH:mm:ss.SSSZ"},"date_updated":{"type":"string","example":"yyyy-MM-dd'T'HH:mm:ss.SSSZ"},"description":{"type":"string"},"document_control_number":{"type":"string"},"external_provider":{"type":"string"},"external_reference":{"type":"string"},"fees":{"type":"array","items":{"$ref":"#/definitions/FeeDto"}},"giro_slip_no":{"type":"string"},"id":{"type":"string"},"method":{"type":"string"},"organisation_name":{"type":"string"},"payer_name":{"type":"string"},"payment_allocation":{"type":"array","items":{"$ref":"#/definitions/PaymentAllocationDto"}},"payment_group_reference":{"type":"string"},"payment_reference":{"type":"string"},"reference":{"type":"string"},"reported_date_offline":{"type":"string","format":"date-time"},"service_name":{"type":"string"},"site_id":{"type":"string"},"status":{"type":"string"},"status_histories":{"type":"array","items":{"$ref":"#/definitions/StatusHistoryDto"}}},"title":"PaymentDto"},"PaymentsResponse":{"type":"object","properties":{"payments":{"type":"array","items":{"$ref":"#/definitions/PaymentDto"}}},"title":"PaymentsResponse"},"ResponseEntity":{"type":"object","properties":{"body":{"type":"object"},"statusCode":{"type":"string","enum":["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]},"statusCodeValue":{"type":"integer","format":"int32"}},"title":"ResponseEntity"},"StatusHistoryDto":{"type":"object","properties":{"date_created":{"type":"string","example":"yyyy-MM-dd'T'HH:mm:ss.SSSZ"},"date_updated":{"type":"string","example":"yyyy-MM-dd'T'HH:mm:ss.SSSZ"},"error_code":{"type":"string"},"error_message":{"type":"string"},"external_status":{"type":"string"},"status":{"type":"string"}},"title":"StatusHistoryDto"}}}
