Ratepay API Payment-Change Logic

Manage customer requirements and customer complaints with ease!

attention

The gateway <operation>PAYMENT_CHANGE is used to manage

  • shopping cart modifications
  • (partial) cancellations
  • (partial) returns
  • goodwill refunds

Learn how to use the <operation> element correctly. On the next pages we are going to modify one single transaction multiple times.


Purchase Order

Every transaction starts with a purchase.

Copy
Copied
<operation>PAYMENT_REQUEST</operation>

Assumption

Let's imagine a shopper bought three items. One item has a discount. Then there are some shipping fees and our customer redeemed a voucher. The shopping basket amount is 305 Euros in total.

Try to reconstruct the total basket value.

XML request

Copy
Copied
PAYMENT_REQUEST.xml

<shopping-basket amount="305" currency="EUR">
	<items>  
		<item article-number="A" quantity="2" tax-rate="19.00" unit-price-gross="100" discount="-10" description-addition="Rot">Bed Linen</item>
		<item article-number="B" quantity="2" tax-rate="19.00" unit-price-gross="40" description-addition="100x200">Towel</item>
		<item article-number="D" quantity="2" tax-rate="19.00" unit-price-gross="25">Scarf</item>
	</items>
	<discount unit-price-gross="-10" tax-rate="19.00">Voucher</discount>
	<shipping unit-price-gross="5" tax-rate="19.00">UPS Standard</shipping>
</shopping-basket>

Result

# Price Cart
<item> A 90 € 2
<item> B 40 € 2
<item> D 25 € 2
<discount> -10 € -10 €
<shipping> 5 € 5 €