Several operations are available for the Payment interface using the REST API. All of these operations are based on the Parlay X 2.1 standard.
JSON requests, only HTTP POST is supported.
For JSON requests, the field names need to match exactly with the Parlay X 2.1 specifications. The JSON implementation does not supply any default values to the fields.
Used for charging an amount to an end user's account.
POST path/chargeAmount?version=1.0&endUserId=tel:+447990123456¤cy=GBP &amount=1 & referenceCode=ABC & description=Some billing information HTTP/1.1 Host: www.example.com
HTTP Status: 204 No content.
POST http://localhost:9080/PaymentService/services/JSON/chargeAmount {"endUser Identifier":"tel"+447990123456", "charge":{ "description":"Some billing information", "currency":"GBP", "amount": 1000, "code":"ABC-123" }, "referenceCode":"ABC" }
HTTP/1.1 200 OK {}
Used for refunding an amount to an end user's account
POST path/refundAmount?version=1.0 & sendUserId=tel:+44790123456& currency=GBP &amount=1 & referenceCode=ABC& description= Some billing information HTTP/1.1 Host: www.example.com
HTTP Status: 204 No content.
POST http://localhost:9080/PaymentService/services/JSON/refundAmount { "endUserIdentifier":"tel:+447990123456", "charge":{ "description":"Some billing information", "currency":"GBP", "amount":1000, "code":"123-ABC" }, " referencecode":"ABC" }
HTTP/1.1 200 OK {}
Used for reserving a charge for an end user's account.
POST path/reserveAmount?version=1.0 &endUserId=tel:+447990123456& currency=GBP & amount=10& description= some billing information HTTP/1.1 Host: www.example.com
<ReserveResponse version=”1.0” reservationId=”1234”/>
POST http://localhost:9080/PaymentService/services/JSON/reserveAmount { "endUserIdentifier":"tel:+447990123456", "charge":{ "description":"Some billing information", currency":"GBP", "amount":1000, "code":"123-ABC" } }
HTTP/1.1 200 OK {"result":"1234"}
Used for charging to a previously made reservation.
POST path/chargeReservation?reserve=1234&version=1.0& currency=GBP &amount=6&referenceCode=ABC&description=Some billinginformation HTTP/1.1 Host:www.example.com
HTTP Status: 204 No Content.
POST http://localhost:9080/PaymentService/services/JSON/chargeReservation { "reservationIdentifier":"1234", "charge": { "description":"Some billing information", "currency":"GBP", "amount": 1000, "code": "123-ABC" }, "referenceCode": "ABC" }
HTTP/1.1 200 OK
Used for releasing funds left in a previously made reservation to the account from which the reservation was made.
DELETE path/releaseReservation?reserve=1234&version=0 HTTP/1.1 Host: www.example.com
HTTP Status: 204 No Content.
POST http://localhost:9080/PaymentService/services/JSON/releaseReservation {"reservationIdentifier":"123-ABC" }
HTTP/1.1 200 OK {}