RESTful Application Development Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Payment

 


Operations

The RESTful Payment interface allows an application to charge an amount to an end-user’s account using Diameter, refund amounts to that account, and split charge amounts among multiple end-users. An application can also reserve amounts, reserve additional amounts, charge against the reservation or release the reservation.

In the listings below, bold indicates a required attribute, <> a descriptive comment.

Note: An HTML version of this information is at http://host:port/rest/payment/index.html where host and port depend on the Oracle Communications Services Gatekeeper installation.

Charge Amount

Charges an amount directly to an end-user’s account using Diameter

Request

URI

http://host:port/rest/payment/charge-amount

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be charged>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

"endUserIdentifier": "URI",<The address of the end-user to be charged>

"referenceCode": "String"<A unique identifier in case of disputes>

}

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

Refund Amount

Refunds an amount directly to an end-user’s account using Diameter

Request

URI

http://host:port/rest/payment/refund-amount

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be refunded>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

"endUserIdentifier": "URI",<The address of the end-user to be refunded to>

"referenceCode": "String"<A unique identifier in case of disputes>

}

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

Charge Split Amount

Charges an amount directly to multiple end users concurrently (for example, for charging multiple participants in a conference)

Request

URI

http://host:port/rest/payment/charge-split-amount

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be refunded>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

  "referenceCode": "String",<A unique identifier in case of disputes>

"splitInfo": [{<How the charge should be split>

"endUserIdentifier": "URI",<The address of the end-user>

"percent": "Integer"<The percentage this end-user should be charged>

}]

}

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

Reserve Amount

Reserves an amount for an account indicated by the end-user identifier.

Request

URI

http://host:port/rest/payment/reserve-amount

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be reserved>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

"endUserIdentifier": "URI",<The address of the end-user against whose account the reservation is made>

}

HTTP Method

POST

Response

Response Content-Type

application/json

Body

{"result": "String"}

An identifier for the reservation

Error Response

Service Exception

Policy Exception

Reserve Additional Amount

Reserves an additional amount against an end-user account

Request

URI

http://host:port/rest/payment/reserve-additional-amount

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be reserved>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

    "reservationIdentifier": "String"<The result value returned from the initial reservation request>

}

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

Charge Reservation

Charges a previously reserved amount against an end-user account

Request

URI

http://host:port/rest/payment/charge-reservation

Request Content-Type

application/json

Body

{

"charge": {

    "description": "String", <Text to be used for information and billing>

"amount": "BigDecimal", <The amount to be reserved>

"code": "String", <A charging code, from an existing contractual description>

"currency": "String" <A currency identifier as defined in ISO 4217 [9]>

},

  "referenceCode": "String",<A unique identifier in case of disputes>

"reservationIdentifier": "String"<The result value returned from the intial reservation request>

}

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

Release Reservation

Returns funds left in a reservation to the account against which this reservation was made

Request

URI

http://host:port.rest/payment/release-reservation

Request Content-Type

application/json

Body

{"reservationIdentifier": "String"}

The result value returned from the initial reservation request

HTTP Method

POST

Response

Body

Empty

Error Response

Service Exception

Policy Exception

 


Errors

The content of possible error messages.

Service Exception

{"error":{

"type":"org.csapi.schema.parlayx.common.v3_1.ServiceException"

"message":"String"

}}

Policy Exception

{"error":{

"type":"org.csapi.schema.parlayx.common.v3_1.PolicyException"

"message":"String"

}}


  Back to Top       Previous  Next