Create a Payment

post

/payment

Creates a payment.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json;charset=utf-8 ()
Root Schema : Payment Create
Type: object
Title: Payment Create
A payment, used in payment create requests. The id, href, status, statusDate, and paymentDate properties aren't used in the create request.
Show Source
Nested Schema : AccountRef
Type: object
The account reference.
Match All
The account reference.
Show Source
Nested Schema : Money
Type: object
The base / value business entity used to represent money.
Show Source
  • The currency (ISO4217 norm uses 3 letters to define the currency).
  • The signed floating point number, the meaning of the sign is according to the context of the API that uses this Data type
Nested Schema : ChannelRef
Type: object
A reference to a channel.
Show Source
Nested Schema : Related Party
Type: object
Title: Related Party
A party related to another object.
Show Source
Nested Schema : paymentItem
Type: array
Payment items that can be assigned to bills.
Show Source
Nested Schema : Payment Method Ref Or Value
Type: object
Title: Payment Method Ref Or Value
A link to the resource containing information about the payment method.
Show Source
Nested Schema : EntityRef
Match All
The entity reference schema to be use for all entityRef class.
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Addressable
    The base schema for adressable entities.
  • EntityRef-allOf[2]
    The entity reference schema to be use for all entityRef class.
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Addressable
Type: object
The base schema for adressable entities.
Show Source
Nested Schema : EntityRef-allOf[2]
Type: object
The entity reference schema to be use for all entityRef class.
Show Source
Nested Schema : Payment Item
Type: object
Title: Payment Item
A portion of a payment that can be assigned to a bill.
Show Source
Nested Schema : account
Type: array
Accounts associated with the payment method.
Show Source
Nested Schema : TimePeriod
Type: object
The period of time, either as a deadline (endDateTime only) a startDateTime only, or both.
Show Source
Back to Top

Response

Supported Media Types

201 Response

The payment was created successfully.
Body ()
Root Schema : Payment
Type: object
Title: Payment
A payment, including information about the payment, the payment amount, and the payment method.
Show Source
Nested Schema : AccountRef
Type: object
The account reference.
Match All
The account reference.
Show Source
Nested Schema : Money
Type: object
The base / value business entity used to represent money.
Show Source
  • The currency (ISO4217 norm uses 3 letters to define the currency).
  • The signed floating point number, the meaning of the sign is according to the context of the API that uses this Data type
Nested Schema : ChannelRef
Type: object
A reference to a channel.
Show Source
Nested Schema : Related Party
Type: object
Title: Related Party
A party related to another object.
Show Source
Nested Schema : paymentItem
Type: array
Payment items that can be assigned to bills.
Show Source
Nested Schema : Payment Method Ref Or Value
Type: object
Title: Payment Method Ref Or Value
A link to the resource containing information about the payment method.
Show Source
Nested Schema : EntityRef
Match All
The entity reference schema to be use for all entityRef class.
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Addressable
    The base schema for adressable entities.
  • EntityRef-allOf[2]
    The entity reference schema to be use for all entityRef class.
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Addressable
Type: object
The base schema for adressable entities.
Show Source
Nested Schema : EntityRef-allOf[2]
Type: object
The entity reference schema to be use for all entityRef class.
Show Source
Nested Schema : Payment Item
Type: object
Title: Payment Item
A portion of a payment that can be assigned to a bill.
Show Source
Nested Schema : account
Type: array
Accounts associated with the payment method.
Show Source
Nested Schema : TimePeriod
Type: object
The period of time, either as a deadline (endDateTime only) a startDateTime only, or both.
Show Source

400 Response

The request isn't valid.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

401 Response

The client doesn't have the correct privileges.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

403 Response

The request wasn't authorized.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

405 Response

This method is not allowed.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

409 Response

The request could not be processed due to the conflict with the existing state of the resource.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

500 Response

The system encountered an internal error.
Body ()
Root Schema : Error
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Match All
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
The operation used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
  • Extensible
    The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
  • Error-allOf[1]
Nested Schema : Extensible
Type: object
The Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to create a payment by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -d option specifies the file to attach as the request body.

curl -X POST 'http://host:port/brm/payment/version/payment' -d @paymentCreate.json

Example of Request Body

The following is an example of the contents of the paymentCreate.json file sent as the request body. The request includes the following:

  • account.id set to an account POID (0.0.0.1+-account+84808"). Alternatively, you could set account.id to an account number.

  • paymentMethod.id set to an external payment method ID (Test123XYZ). Alternatively, you could set paymentMethod.id to an internal payment method ID.

{
   "@type":"Payment_Create",
   "account":{
      "id":"0.0.0.1+-account+84808"
   },
   "paymentMethod":{ 
      "id":"Test123XYZ",
      "@referredType": "bankCard",
      "@type": "PaymentMethodRef"
   },
   "totalAmount":{
      "value":10,
      "unit":"USD"
   },
   "description": "New Payment"
}

Example of Response Body

The following is an example of the response body in JSON format.

{
   "id": "0.0.0.1+-item-payment+207561",
   "href": "http://host:port/brm/payment/version/payment/0.0.0.1+-item-payment+207561",
   "authorizationCode": null,
   "correlatorId": null,
   "description": null,
   "name": null,
   "paymentDate": null,
   "status": null,
   "statusDate": null,
   "account": {
      "id": "0.0.0.1+-account+84808",
      "href": null,
      "description": null,
      "name": "Mary Irwin",
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null,
      "@referredType": "billingAccount"
   },
   "amount": null,
   "channel": null,
   "payer": null,
   "paymentItem": null,
   "paymentMethod": {
      "id": "Test123XYZ",
      "href": "http://host:port/brm/paymentMethods/version/paymentMethod/Test123XYZ",
      "description": null,
      "isPreferred": null,
      "name": Mary Irwin's Credit Card,
      "status": null,
      "statusDate": null,
      "account": null,
      "relatedParty": null,
      "validFor": null,
      "@baseType": "PaymentMethodRefOrValue",
      "@schemaLocation": null,
      "@type": PaymentMethodRefOrValue,
      "@referredType": null
   },
   "taxAmount": null,
   "totalAmount": {
      "unit": "USD",
      "value": 10,
      "@baseType": null,
      "@schemaLocation": null,
      "@type": null
   },
   "@baseType": "Payment",
   "@schemaLocation": null,
   "@type": "Payment"
}
Back to Top