Skip to content

The Calculation Request calculates and returns an installment plan depending on the request parameters and the stored parameters of the merchant profile.

Request Parameters

<head> Section

ParameterConditionEnumeration
system-idMandatory
operationMandatoryCALCULATION_REQUEST

|operation@subtype|Mandatory|calculation-by-time| |credential|Mandatory||

<content> Section

The <content> section of the CALCULATION_REQUEST request contains the input parameters for the instalment plan favored by the customer.

ParameterConditionType
installment-calculationMandatoryinstallmentCalculationType

XML Examples

<<<<<<< HEAD

calculation-request-by-time
<?xml version="1.0"?>
<request version="1.0" xmlns="urn://www.ratepay.com/payment/1_0">
	<head>
		<system-id>MyTestsystem</system-id>
		<operation subtype="calculation-by-time">CALCULATION_REQUEST</operation>
		<credential>
			<profile-id>INTEGRATION_TE_DACH</profile-id>
			<securitycode>4c0a11923fa3433fb168f9c7176429e9</securitycode>
		</credential>
	</head>
	<content>
		<installment-calculation>
			<amount>200.00</amount>
			<calculation-time>
				<month>3</month>
			</calculation-time>
		</installment-calculation>
	</content>
</request>

Response Parameters

<head> Section

ParameterConditionEnumeration
system-idMandatory
operationMandatory

|operation@subtype|Mandatory|calculation-by-time| |response-type|Mandatory|- INSTALLMENT_PLAN
- STATUS_ERROR| |processing|Mandatory||

<content> Section

The <content> section of the CALCULATION_REQUEST response contains the details of the calculated instalment plan.

ParameterConditionType
installment-calculation-resultMandatoryinstallmentCalculationResultType

XML Examples

by-rate
<response xmlns="urn://www.ratepay.com/payment/1_0" version="1.0">
<head>
	<system-id>MyTestsystem</system-id>
	<operation subtype="calculation-by-rate">CALCULATION_REQUEST</operation>
	<response-type>INSTALLMENT_PLAN</response-type>
	<external />
	<processing>
		<timestamp>2016-01-06T16:10:50.000</timestamp>
		<status code="OK">Successfully</status>
		<reason code="697">Calculation reason: NOT_ALLOWED_RUNTIME: Rate or runtime did not match allowed runtime – rate has been adjusted.</reason>
		<result code="502">Calculation successful</result>
	</processing>
</head>
<content>
	<installment-calculation-result>
		<total-amount>244.67</total-amount>
		<amount>230</amount>
		<interest-amount>10.72</interest-amount>
		<service-charge>3.95</service-charge>
		<interest-rate>13.7</interest-rate>
		<annual-percentage-rate>19.36</annual-percentage-rate>
		<monthly-debit-interest>1.08</monthly-debit-interest>
		<number-of-rates>6</number-of-rates>
		<rate>40.79</rate>
		<last-rate>40.72</last-rate>
		<payment-firstday>28</payment-firstday>
	</installment-calculation-result>
</content>
</response>

-->

by-time
<response xmlns="urn://www.ratepay.com/payment/1_0" version="1.0">
  <head>
	<system-id>MyTestsystem</system-id>
	<operation subtype="calculation-by-time">CALCULATION_REQUEST</operation>
	<response-type>INSTALLMENT_PLAN</response-type>
	<external />
	<processing>
	  <timestamp>2016-03-29T13:37:08.000</timestamp>
	  <status code="OK">Successfully</status>
	  <reason code="603">Calculation reason: FULFILLED_CONDITION: The payment plan fulfilled the conditions.</reason>
	  <result code="502">Calculation successful</result>
	</processing>
  </head>
  <content>
	<installment-calculation-result>
	  <total-amount>200</total-amount>
	  <amount>200</amount>
	  <interest-amount>0</interest-amount>
	  <service-charge>0</service-charge>
	  <interest-rate>0</interest-rate>
	  <annual-percentage-rate>0</annual-percentage-rate>
	  <monthly-debit-interest>0</monthly-debit-interest>
	  <number-of-rates>3</number-of-rates>
	  <rate>66.67</rate>
	  <last-rate>66.66</last-rate>
	  <payment-firstday>2</payment-firstday>
	</installment-calculation-result>
  </content>
</response>

How the instalment calculation result of the CALCULATION_REQUEST maps to the instalment details of the PAYMENT_REQUEST

Some parameters of the Calculation Request response must be passed to the Gateway with the subsequent Payment Request request. The following illustration demonstrates how those parameters are mapped.

Mapping of Calculation Request results to Payment Request parameters

Mapping Table

CALCULATION_REQUEST
Response parameters
=PAYMENT_REQUEST
Request parameters
total-amount=amount
àmount=shopping-basket@amount
interest-rate=interest-rate
number-of-rates=installment-number
rate=installment-amount
last-rate=last-installment-amount
payment-firstday=payment-firstday