PDF Export

EPayment.performRefund

  • Object: /net/dsb/commons/EPayment
  • Method: performRefund
  • Version: 1.0.0

This service performs a refund..

This can be done on two ways:

  1. Bookback of a previous payment. In this case the transaction-id of the payment must be provided. The refund can contain the previously paid amount, at the most.
  2. Refund / Payment of a arbitrary amount without a reference to a previous payment. In this case the die Paypal ID or the Email addresse of the receiver must be provided. You can refund a arbitrary amount of money. A merchant-request-id should be provided to reference this refund in the system of the payment provider.

Not all service provider allow both methods.

Service Provider Bookback of a previous payment Refund of an arbitrary amount
PayPal X X
Amazon X -
Epay X -

Parameter

Name Type / Length Mandatory / Optional Description
refund-request-paypalXML m XML element with the data.
Request
Structure
<message version="1.0" system="VHS/3">
  <header>
    <client>9999</client>
    <service-provider>999</service-provider>
    <service-object>/net/dsb/commons/EPayment</service-object>
    <service-method>performRefund</service-method>
    <service-version>1.0.0</service-version>
  </header>
  <body>
    <epayment-transaction>
      <refund-request>
        <payment-provider>PAYPAL</payment-provider>
        <transaction-id>0123456789123456789</transaction-id>
        <amount>10.00</amount>
        <curreny-code>EUR</curreny-code>
        <memo>a refund for you</memo>
      </refund-request>
    </epayment-transaction>
  </body>
</message>
Elements
Name MandatoryLengthTypeDescription
epayment-transaction X - XMLXML Element
refund-request X - XMLXML Element
transaction-id 19 AN TransactionID of the transaction that is booked back.
payerID AN ID of receiver
payerEmail AN Email address of the receiver
merchant-id 36 AN merchant ID (mandatory, if there are multiple merchant ids with this client)
amount 12 N Amount of the transaction. Value with two decimal digits. (if this is missing the whole transaction is booked back.)
currency-code 3 AN Currency (ISO 4217). (mandatory, if amount is given)
memo 255 AN arbitrary test
merchant-request-id 128 AN request ID of the merchant (max. 30 chars if PayPal)
Response
Structure
<message version="1.0" system="VHS/3">
  <header>
    <client>9999</client>
    <service-provider>999</service-provider>
  </header>
  <body>
    <refund-response>
      <transaction-id >asdfasdfasdf</transaction-id>
      <fee-amount>0.37</fee-amount>
      <gross-amount>10.00</gross-amount>
      <net-amount>9.63</net-amount>
    </refund-response>
  </body>
</message>  
Elements
Name LengthTypeDescription
refund-response - XMLXML Element
transaction-id 19 AN id of the refund
fee-amount 12 N Fee. Value with two decimal digits
gross-amount 12 N Total Amount. Value with two decimal digits
net-amount 12 N Net Amount. Value with two decimal digits
error XMLin case of an error
error-code N Error code
error-message N Error message
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information