Create a Payment
post
/payment
Creates a payment.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json;charset=utf-8
The payment to create.
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
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
account(required): object
object
Account Ref
Title:
Account Ref
A reference to an account. -
amount: object
object
Money
Title:
Money
An amount of money. -
authorizationCode: string
Title:
Authorization code
An authorization code from an external payment gateway. -
channel: object
object
ChannelRef
A reference to a channel.
-
correlatorId: string
Title:
correlator ID
An payment correlation ID from a client application. -
description: string
Title:
Payment Description
The payment's description. -
name: string
Title:
Payment Name
The payment's name. -
payer: object
object
Related Party
Title:
Related Party
A party related to another object. -
paymentItem: array
array
paymentItem
Payment items which can be assigned to bills.
-
paymentMethod(required): object
object
Payment Method Ref Or Value
Title:
Payment Method Ref Or Value
A link to the resource containing information about the payment method. For Payment_Create requests, when the value of the payment method's @type property is PaymentMethodRef, the @referredType property is also required, and valid values are tokenizedCard, bankAccountDebit, and bankCard. -
taxAmount: object
object
Money
Title:
Money
An amount of money. -
totalAmount(required): object
object
Money
Title:
Money
An amount of money.
Nested Schema : Account Ref
Type:
object
Title:
Account Ref
A reference to an account.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
description: string
Title:
Description
The account reference's description. -
href: string
Title:
Account Href
The account reference's href. -
id(required): string
Title:
Account ID
The account reference's ID. -
name: string
Title:
Account Name
The account reference's name.
Nested Schema : Money
Type:
object
Title:
Money
An amount of money.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
unit: string
Title:
Currency
An ISO 4217 three letter currency code. -
value: number
(float)
Title:
Amount
A positive floating point number.
Nested Schema : ChannelRef
Type:
object
A reference to a channel.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
Title:
Channel Href
The channel's href. -
id(required): string
Title:
Channel ID
The channel's ID. -
name: string
Title:
Channel Name
The channel's name.
Nested Schema : Related Party
Type:
object
Title:
Related Party
A party related to another object.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType(required): string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
(uri)
Title:
Href
The party's href. -
id(required): string
Title:
Party ID
The party's ID. -
name: string
Title:
Party Name
The party's name. -
role: string
Title:
Party Role
The party's role.
Nested Schema : paymentItem
Type:
array
Payment items which can be assigned to bills.
Show Source
-
Array of:
object Payment Item
Title:
Payment Item
A portion of a payment that can be assigned to a bill.
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. For Payment_Create requests, when the value of the payment method's @type property is PaymentMethodRef, the @referredType property is also required, and valid values are tokenizedCard, bankAccountDebit, and bankCard.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type(required): string
Title:
Type
The payment method's type. Valid values are PaymentMethodRef for a credit or debit card, Cash, or Check. When the value is PaymentMethodRef, the payment method specified must be the one assigned to the bill unit. If you specify a different payment method, the one assigned to the bill unit will be refunded instead. (For payments and refunds, @type is not used for subclassing.) -
account: array
array
account
Accounts associated with the payment method.
-
description: string
Title:
Payment Method Description
The payment method's description. -
href: string
Title:
Payment Method Href
The payment method's href. -
id(required): string
Title:
Payment Method ID
The payment method's ID. -
isPreferred: boolean
Title:
Payment Method Preferred
Whether this is the preferred payment method (true) or not (false). -
name: string
Title:
Payment Method Name
The payment method's name. - relatedParty: object object Related Party
-
status: string
Title:
Status
The payment method's status. -
statusDate: string
(date-time)
Title:
Status Date
The date the payment method's status was recorded. -
validFor: object
object
Time Period
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
Nested Schema : Payment Item
Type:
object
Title:
Payment Item
A portion of a payment that can be assigned to a bill.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
amount: object
object
Money
Title:
Money
An amount of money. -
id: string
Title:
Payment Item ID
The payment item's ID. -
item(required): object
object
Entity Ref
Title:
Entity Ref
An entity reference schema. -
taxAmount: object
object
Money
Title:
Money
An amount of money. -
totalAmount: object
object
Money
Title:
Money
An amount of money.
Nested Schema : Entity Ref
Type:
object
Title:
Entity Ref
An entity reference schema.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
Title:
Entity Href
The entity's href.. -
id(required): string
(uri)
Title:
Entity ID
The entity's ID. -
name: string
Title:
Entity Name
The entity's name.
Nested Schema : account
Type:
array
Accounts associated with the payment method.
Show Source
-
Array of:
object Account Ref
Title:
Account Ref
A reference to an account.
Nested Schema : Time Period
Type:
object
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
endDateTime: string
(date-time)
Title:
End DateTime
The end of the time period in IETC-RFC-3339 format.Example:1985-04-12T23:20:50.520Z
-
startDateTime: string
(date-time)
Title:
Start DateTime
The start of the time period in IETC-RFC-3339 format. If you specify this, you must also specify endDateTime.Example:1985-04-12T23:20:50.520Z
Response
Supported Media Types
- application/json;charset=utf-8
201 Response
Created
Root Schema : Payment
Type:
object
Title:
Payment
A payment, including information about the payment, the payment amount, and the payment method.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
account(required): object
object
Account Ref
Title:
Account Ref
A reference to an account. -
amount: object
object
Money
Title:
Money
An amount of money. -
authorizationCode: string
Title:
Authorization code
An authorization code from an external payment gateway. -
channel: object
object
ChannelRef
A reference to a channel.
-
correlatorId: string
Title:
correlator ID
An payment correlation ID from a client application. -
description: string
Title:
Payment Description
The payment's description. -
href(required): string
Title:
Payment Href
The payment's href. -
id(required): string
Title:
Payment ID
The payment's ID. -
name: string
Title:
Payment Name
The payment's name. -
payer: object
object
Related Party
Title:
Related Party
A party related to another object. -
paymentDate(required): string
(date-time)
Title:
Payment Date
The date the payment was made. -
paymentItem: array
array
paymentItem
Payment items which can be assigned to bills.
-
paymentMethod(required): object
object
Payment Method Ref Or Value
Title:
Payment Method Ref Or Value
A link to the resource containing information about the payment method. For Payment_Create requests, when the value of the payment method's @type property is PaymentMethodRef, the @referredType property is also required, and valid values are tokenizedCard, bankAccountDebit, and bankCard. -
status(required): string
Title:
Payment Status
The payment's status. -
statusDate: string
(date-time)
Title:
Status Date
The date the payment's status was recorded. -
taxAmount: object
object
Money
Title:
Money
An amount of money. -
totalAmount(required): object
object
Money
Title:
Money
An amount of money.
Nested Schema : Account Ref
Type:
object
Title:
Account Ref
A reference to an account.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
description: string
Title:
Description
The account reference's description. -
href: string
Title:
Account Href
The account reference's href. -
id(required): string
Title:
Account ID
The account reference's ID. -
name: string
Title:
Account Name
The account reference's name.
Nested Schema : Money
Type:
object
Title:
Money
An amount of money.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
unit: string
Title:
Currency
An ISO 4217 three letter currency code. -
value: number
(float)
Title:
Amount
A positive floating point number.
Nested Schema : ChannelRef
Type:
object
A reference to a channel.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
Title:
Channel Href
The channel's href. -
id(required): string
Title:
Channel ID
The channel's ID. -
name: string
Title:
Channel Name
The channel's name.
Nested Schema : Related Party
Type:
object
Title:
Related Party
A party related to another object.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType(required): string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
(uri)
Title:
Href
The party's href. -
id(required): string
Title:
Party ID
The party's ID. -
name: string
Title:
Party Name
The party's name. -
role: string
Title:
Party Role
The party's role.
Nested Schema : paymentItem
Type:
array
Payment items which can be assigned to bills.
Show Source
-
Array of:
object Payment Item
Title:
Payment Item
A portion of a payment that can be assigned to a bill.
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. For Payment_Create requests, when the value of the payment method's @type property is PaymentMethodRef, the @referredType property is also required, and valid values are tokenizedCard, bankAccountDebit, and bankCard.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type(required): string
Title:
Type
The payment method's type. Valid values are PaymentMethodRef for a credit or debit card, Cash, or Check. When the value is PaymentMethodRef, the payment method specified must be the one assigned to the bill unit. If you specify a different payment method, the one assigned to the bill unit will be refunded instead. (For payments and refunds, @type is not used for subclassing.) -
account: array
array
account
Accounts associated with the payment method.
-
description: string
Title:
Payment Method Description
The payment method's description. -
href: string
Title:
Payment Method Href
The payment method's href. -
id(required): string
Title:
Payment Method ID
The payment method's ID. -
isPreferred: boolean
Title:
Payment Method Preferred
Whether this is the preferred payment method (true) or not (false). -
name: string
Title:
Payment Method Name
The payment method's name. - relatedParty: object object Related Party
-
status: string
Title:
Status
The payment method's status. -
statusDate: string
(date-time)
Title:
Status Date
The date the payment method's status was recorded. -
validFor: object
object
Time Period
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
Nested Schema : Payment Item
Type:
object
Title:
Payment Item
A portion of a payment that can be assigned to a bill.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON-Schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
amount: object
object
Money
Title:
Money
An amount of money. -
id: string
Title:
Payment Item ID
The payment item's ID. -
item(required): object
object
Entity Ref
Title:
Entity Ref
An entity reference schema. -
taxAmount: object
object
Money
Title:
Money
An amount of money. -
totalAmount: object
object
Money
Title:
Money
An amount of money.
Nested Schema : Entity Ref
Type:
object
Title:
Entity Ref
An entity reference schema.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@referredType: string
Title:
Referred Type
The object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
href: string
Title:
Entity Href
The entity's href.. -
id(required): string
(uri)
Title:
Entity ID
The entity's ID. -
name: string
Title:
Entity Name
The entity's name.
Nested Schema : account
Type:
array
Accounts associated with the payment method.
Show Source
-
Array of:
object Account Ref
Title:
Account Ref
A reference to an account.
Nested Schema : Time Period
Type:
object
Title:
Time Period
A period of time. You can specify only endDateTime or both endDateTime and startDateTime.
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
endDateTime: string
(date-time)
Title:
End DateTime
The end of the time period in IETC-RFC-3339 format.Example:1985-04-12T23:20:50.520Z
-
startDateTime: string
(date-time)
Title:
Start DateTime
The start of the time period in IETC-RFC-3339 format. If you specify this, you must also specify endDateTime.Example:1985-04-12T23:20:50.520Z
400 Response
Bad Request
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
401 Response
Unauthorized
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
403 Response
Forbidden
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
405 Response
Method Not allowed
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
409 Response
Conflict
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
500 Response
Internal Server Error
Root Schema : Error
Type:
object
Title:
Error
Used when an API returns an error, typically with a HTTP error response-code such as 401 (Unauthorized) or 500 (Internal Server Error).
Show Source
-
@baseType: string
Title:
Base Type
The object's superclass. -
@schemaLocation: string
(uri)
Title:
Schema Location
A URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
Type
The object's subclass. -
code(required): string
Title:
Error Code
An error code. -
message: string
Title:
Error Message
Details and corrective actions related to the error. -
reason(required): string
Title:
Reason
The reason for the error. -
referenceError: string
(uri)
Title:
Reference Error
A URI to documentation describing the error. -
status: string
Title:
Error Status
The HTTP Error code extension.
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.
{ "@type":"Payment_Create", "account":{ "id":"0.0.0.1+-account+84808" }, "paymentMethod":{ "id":"0.0.0.1+-payinfo-cc+77289", "@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": "Grace Wang", "@baseType": null, "@schemaLocation": null, "@type": null, "@referredType": "billingAccount" }, "amount": null, "channel": null, "payer": null, "paymentItem": null, "paymentMethod": { "id": "0.0.0.1+-payinfo-cc+97134", "href": "http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-cc+97134", "description": null, "isPreferred": null, "name": Grace Wang'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" }