Skip to end of banner
Go to start of banner

POST payments/reject

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This method is used to reject a payment which is in draft state.

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

Available from CRM.COM R9.1.0

rejection_reason_identifierRejection reason identifier

The reason that the payment is rejected. The allowed rejection reason identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the rejection reason

name

(semi-optional)

String

The name of the rejection reason

alternative_code

(semi-optional)

String

The alternative code of  the rejection reason

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

 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_onDateThe date that the payment was issued
posted_onDateThe date that the payment was posted
payment_amountNumberThe total amount of the payment
processed_by_payment_gatewayString

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_numberString

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_periodCurrency Rate Period

The currency rate period based on which the refund was created

Available from CRM.COM R10.0.0

Referred Objects Response Data

 currency rate period object response data

Name

Type

Description

id

String

The ID of the retrieved currency rate period

rateNumberThe exchange rate of the currency rate period
inverse_rateNumberThe inverse exchange rate of the currency rate period
from_dateDateThe date from which the exchange rate is valid
to_dateDateThe date until which the exchange rate is valid
currencyCurrency ObjectThe 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_symbolStringThe prefix symbol for the specified currency

suffix_symbol

StringThe suffix symbol for the specified currency
life_cycle_stateString

The life cycle state for the specified currency, which can be EFFECTIVE or NOT EFFECTIVE

Available from CRM.COM R14.0.0

integer_part_nameStringThe integer part name for the specified currency
decimal_part_nameStringThe decimal part name for the specified currency

 

Examples

 Example 1

 

HTTP Method: POST

 

Request:

Body:

{
	"token": "B8D7A12E9F91AFADE914B7330AFD08CB",
	"payment_identifier":{"reference_number":"118"},
	"rejection_reason_identifier":{"name":"Reject Due to Business Request"},
}


Response:

{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "payment_amount": 50,
        "issued_on": "2014-07-14T17:06:28",
        "life_cycle_state": "REJECTED",
        "number": null,
        "id": "0ACCC72477BA606EE3B409400069F1BB",
        "reference_number": "118",
        "posted_on": null
    }
}
  • No labels