This method is used to cancel a posted payment. A payment cancellation is created and posted to cancel the specified payment
Resource URL
Parameters
Name | Type | Description |
token | String | The token retrieved from the login method |
payment_identifier (mandatory) | Payment Identifier | The identifier of the payment that should be posted. Only payments in draft state can be specified.The allowed payment identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the payment | number (semi-optional) | String | The number of the payment | reference_number (semi-optional) | String | The reference number of the payment | back_office_code (semi-optional) | String | The back office code of the payment |
|
type_identifier (mandatory) | Financial transaction type identifier | The financial transaction type of the payment cancellation. The allowed financial transaction type identifier field are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the financial transaction type | name (semi-optional) | String | The name of the financial transaction type | alternative_code (semi-optional) | String | The alternative code of the financial transaction type |
|
category_identifier (optional) | Financial transaction category identifier | The financial transaction category of the payment cancellation. The allowed financial transaction category identifier fields are the following: Name | Type | Description |
---|
id (semi-optional) | String | The ID of the financial transaction category | name (semi-optional) | String | The name of the financial transaction category | code (semi-optional) | String | The code of the financial transaction category |
|
notes (optional) | String | Shared notes for the payment cancellation |
back_office_code (optional) | String | A back office code for the payment cancellation. If specified then it should be unique |
issue_reason (optional) | String | A description of the reason that the payment cancellation is issued |
udf_string_1 (optional) | String | User Defined Field of type String |
udf_string_2 (optional) | String | User Defined Field of type String |
udf_string_3 (optional) | String | User Defined Field of type String |
udf_string_4 (optional) | String | User Defined Field of type String |
udf_string_5 (optional) | String | User Defined Field of type String |
udf_string_6 (optional) | String | User Defined Field of type String |
udf_string_7 (optional) | String | User Defined Field of type String |
udf_string_8 (optional) | String | User Defined Field of type String |
udf_float_1 (optional) | Float | User Defined Field of type Float |
udf_float_2 (optional) | Float | User Defined Field of type Float |
udf_float_3 (optional) | Float | User Defined Field of type Float |
udf_float_4 (optional) | Float | User Defined Field of type Float |
udf_date_1 (optional) | Date | User Defined Field of type Date |
udf_date_2 (optional) | Date | User Defined Field of type Date |
udf_date_3 (optional) | Date | User Defined Field of type Date |
udf_date_4 (optional) | Date | User Defined Field of type Date |
fields_set (optional) | List of Strings, comma separated | A list of fields that should be included in the results. If not specified then all the available fields will be returned |
Restrictions
- It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.
Response Data
Name | Type | Description |
payment | Payment object | The payment that was cancelled |
payment_cancellation | Payment cancellation object | The payment cancellation that was created |
Referred Objects Response Data
payment object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved payment |
number | String | The number of the retrieved payment |
reference_number | String | The reference number of the retrieved payment |
life_cycle_state | String | The life cycle state of the payment. One of the following values is returned: DRAFT, REJECTED, POSTED, CANCELLED, PENDING_VERIFICATION |
issued_on | Date | The date that the payment was issued |
posted_on | Date | The date that the payment was posted |
payment_amount | Number | The total amount of the payment |
processed_by_payment_gateway | String | The payment gateway that processed the payment. This information becomes available only if the selected payment method is included in the payment gateway provider as a linked payment method, or if the payment is already posted and the information was already completed |
payment_gateway_reference_number | String | A reference to the number of the payment that was created on the payment gateway. This information becomes available only if the selected payment method is included in the payment gateway provider as a linked payment method, or if the payment is already posted and the information was already completed |
currency_rate_period | Currency Rate Period | The currency rate period based on which the refund was created |
Referred Objects Response Data
currency rate period object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved currency rate period |
rate | Number | The exchange rate of the currency rate period |
inverse_rate | Number | The inverse exchange rate of the currency rate period |
from_date | Date | The date from which the exchange rate is valid |
to_date | Date | The date until which the exchange rate is valid |
currency | Currency Object | The Currency with which the returned exchange rate information refers to |
Referred Objects Response Data
currency object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved currency |
code | String | The code of the retrieved currency |
prefix_symbol | String | The prefix symbol for the specified currency |
suffix_symbol | String | The suffix symbol for the specified currency |
life_cycle_state | String | The life cycle state for the specified currency, which can be EFFECTIVE or NOT EFFECTIVE |
integer_part_name | String | The integer part name for the specified currency |
decimal_part_name | String | The decimal part name for the specified currency |
payment cancellation object response data
Name | Type | Description |
---|
id | String | The ID of the retrieved payment cancellation |
number | String | The number of the retrieved payment cancellation |
reference_number | String | The reference number of the retrieved payment cancellation |
life_cycle_state | String | The life cycle state of the payment cancellation. the only available value is POSTED. |
issued_on | Date | The date that the payment cancellation was issued |
posted_on | Date | The date that the payment cancellation was posted |
payment_amount | Number | The total amount of the payment cancellation |
processed_by_payment_gateway | String | The payment gateway that processed the payment cancellation |
payment_gateway_reference_number | String | A reference to the number of the payment cancellation that was created on the payment gateway |
Examples
Example 1
HTTP Method: POST
Request:
Body:
{
"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
"payment_identifier":{"reference_number":"117"},
"type_identifier":{"name":"Payment Cancellation"},
"category_identifier":{"name":"Cancellation Because of Mistake"},
}
Response:
{
"status":
{
"message": null,
"description": null,
"code": "OK"
},
"data":
{
"payment":
{
"payment_amount": 50,
"issued_on": "2014-07-14T17:06:14",
"life_cycle_state": "POSTED",
"number": "102",
"id": "4653BEFC9239043011096B329DFEF3F7",
"reference_number": "117",
"posted_on": "2014-07-14T17:07:13"
},
"payment_cancellation":
{
"payment_amount": 50,
"issued_on": "2014-07-14T17:21:06",
"life_cycle_state": "POSTED",
"number": "35",
"id": "8F3613168562A73556CECA0FEA772AFE",
"reference_number": "26",
"posted_on": "2014-07-14T17:21:06"
}
}
}