Menu

User Tools

Create PDF

Site Tools


Table of Contents

JAPI/SAPI and REST API Request Comparison

The REST API architecture is completely different from the JAPI/SAPI architecture. Therefore, the fields have no corresponding equivalents. This page shows JAPI/SAPI requests and their REST API counterparts.

Header Information

JAPI/SAPI REST API
Authentication: Basic Auth
Username: demo-merchant
Password: 203yefsy
Content-Type: text
Format: NVP
Endpoint: https://checkout.wirecard.com/enterprise-demo

Credit card test credentials
(for both 3-D Secure and non-3-D Secure):

PAN: 9500000000000002
Expiration: 12/2019
Authentication:Basic Auth
Username: 70000-APILUHN-CARD
Password: 8mhwavKVb91T
Content-Type: application/xml
Endpoints:
https://api-test.wirecard.com/engine/rest/paymentmethods/
https://api-test.wirecard.com/engine/rest/payments/

Credit card test credentials:
non-3D Secure:
PAN: 4271149787014678
Expiration Month: 12
Expiration Year: 2020
CVC: 123
Card type: visa
3-D Secure:
PAN: 4012000300001003
Expiration Month: 01
Expiration Year: 2019
CVC: 003
Card type: visa

Initiate Payment

JAPI/SAPI:

COMMAND=INITIATEPAYMENT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
AMOUNT=1.23&
CURRENCY=EUR&
ORDERNUMBER=7049&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
INITTYPE=CCARD&
PAN=9500000000000002&
EXPIRY=12/2019&
CONSUMER_BILLING_FIRST_NAME=John&
CONSUMER_BILLING_LAST_NAME=Doe&
CONSUMER_EMAIL=john.doe@test.com&
CONSUMER_BILLING_PHONE=5555555555&
CONSUMER_BILLING_ADDRESS_1=123 anystreet&
CONSUMER_BILLING_CITY=Brantford&
CONSUMER_BILLING_STATE=ON&
CONSUMER_BILLING_COUNTRY=CA&
CONSUMER_BILLING_ZIP_CODE=M4P1E8

REST API:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment"> 
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id> 
    <request-id>${unique for each request}</request-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="EUR">1.23</requested-amount>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john.doe@test.com</email>
        <phone>5555555555</phone>
        <address>
            <street1>123 anystreet</street1>
            <city>Brantford</city>
            <state>ON</state>
            <country>CA</country>
            <postal-code>M4P1E8</postal-code>
        </address>
    </account-holder>
    <card>
        <account-number>4271149787014678</account-number>
        <expiration-month>12</expiration-month>
        <expiration-year>2020</expiration-year>
        <card-security-code>123</card-security-code>
        <card-type>visa</card-type> 
    </card>
    <ip-address>127.0.0.1</ip-address>
    <order-number>7049</order-number>
    <order-detail>Test transaction Wirecard CEE.</order-detail>
    <payment-methods>
        <payment-method name="creditcard"/>
    </payment-methods>
</payment>

3-D Secure Initiation

JAPI/SAPI:

COMMAND=INITIATEPAYMENT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
ORDERNUMBER=21402614&
AMOUNT=1.23&
CURRENCY=EUR&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
INITTYPE=3DSECURE&
PAN=9500000000000002&
EXPIRY=12/2019&
SUCCESSURL=https://example.com/success.html&
SERVICEURL=https://example.com/service.html&
CONSUMER_BILLING_FIRST_NAME=John&
CONSUMER_BILLING_LAST_NAME=Doe&
CONSUMER_EMAIL=john.doe@test.com&
CONSUMER_BILLING_PHONE=5555555555&
CONSUMER_BILLING_ADDRESS_1=123 anystreet&
CONSUMER_BILLING_CITY=Brantford&
CONSUMER_BILLING_STATE=ON&
CONSUMER_BILLING_COUNTRY=CA&
CONSUMER_BILLING_ZIP_CODE=M4P1E8

REST API:

<!-- Check enrollment -->
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>33f6d473-3036-4ca5-acb5-8c64dac862d1</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>check-enrollment</transaction-type>
    <requested-amount currency="EUR">1.23</requested-amount>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john.doe@test.com</email>
        <phone></phone>
        <address>
            <street1>123 anystreet</street1>
            <city>Brantford</city>
            <state>ON</state>
            <country>CA</country>
        </address>
     </account-holder>
     <card>
        <account-number>4012000300001003</account-number>
        <expiration-month>01</expiration-month>
        <expiration-year>2019</expiration-year>
        <card-type>visa</card-type>
        <card-security-code>003</card-security-code>
     </card>
     <ip-address>127.0.0.1</ip-address>
</payment>


3-D Secure ACS Redirect

JAPI/SAPI: –> returns HTML with included javascript pop-up, which automatically opens 3-D Secure page for authentication.

REST API: –> returns XML or JSON response; merchant needs to parse acs-url and implement functionality which redirects the consumer to the 3-D Secure page for authentication.


3-D Secure Verification

JAPI/SAPI:

COMMAND=VERIFYPAYMENT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
ORDERNUMBER=21402614&
MD=Q1JFRElUQ0FSRHwxfDF8MjE0MDI2MTQ=&
PARES=DEMO-PAYER-AUTHENTICATION-RESPONSE-CAN-BE-UP-TO-5K-OF-DATA+++MS4wMHw5Nzh8MjE0MDI2MTR8MjE0MDI2MTR8Q1JFRE
lUQ0FSRHwyMDE4MTEwODA4Mjc1N3xSR1Z0Ync9PXxWR1Z6ZEhSeVlXNXpZV3QwYVc5dUlGZHBjbVZqWVhKa0lFTkZSUzRnUW1
sMGRHVWdibWxqYUhRZ1lXSmlkV05vWlc0aHxyc2x5bDMxMXRrQXJteUxSWkMzOXVnPT0=

REST API:

Check payer response (if cardholder authenticated with 3-D Secure):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>33f6d473-3036-4ca5-acb5-8c64dac862d1</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>check-payer-response</transaction-type>
    <parent-transaction-id>${get transaction id from check enrollment}</parent-transaction-id>
    <three-d>
        <pares>{pares inserted here}</pares>
    </three-d>
</payment>

Send payment request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
     <merchant-account-id>33f6d473-3036-4ca5-acb5-8c64dac862d1</merchant-account-id>
     <request-id>fbeee5af-8329-48ad-af9e-3aaca489520a</request-id>
     <transaction-type>purchase</transaction-type>
     <parent-transaction-id>${get transaction id from check enrollment}</parent-transaction-id>
     <three-d>
        <pares>{pares inserted here}</pares>
    </three-d>
</payment>

Deposit/Capture Authorization

JAPI/SAPI:

COMMAND=DEPOSIT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
AMOUNT=1.23&
CURRENCY=EUR&
ORDERNUMBER=21402615&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
PAYMENTNUMBER=21402615

REST API:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>capture-authorization</transaction-type>
    <parent-transaction-id>${get transaction id from authorization}</parent-transaction-id>
    <requested-amount currency="EUR">1.23</requested-amount>
    <ip-address>127.0.0.1</ip-address>
</payment>

First Initiation for Recurring Payment

JAPI/SAPI:

COMMAND=INITIATEPAYMENT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
AMOUNT=1.23&
CURRENCY=EUR&
ORDERNUMBER=21402615&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
INITTYPE=CCARD&
PAN=9500000000000002&
EXPIRY=12/2019&
CONSUMER_BILLING_FIRST_NAME=John&
CONSUMER_BILLING_LAST_NAME=Doe&
CONSUMER_EMAIL=john.doe@test.com&
CONSUMER_BILLING_PHONE=5555555555&
CONSUMER_BILLING_ADDRESS_1=123 anystreet&
CONSUMER_BILLING_CITY=Brantford&
CONSUMER_BILLING_STATE=ON&
CONSUMER_BILLING_COUNTRY=CA&
CONSUMER_BILLING_ZIP_CODE=M4P1E8

REST API:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <payment xmlns="http://www.elastic-payments.com/schema/payment"> 
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id> 
    <request-id>${unique for each request}</request-id>
    <transaction-type>purchase</transaction-type>
    <requested-amount currency="EUR">1.23</requested-amount>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john.doe@test.com</email>
        <phone></phone>
        <address>
            <street1>123 anystreet</street1>
            <city>Brantford</city>
            <state>ON</state>
            <country>CA</country>
            <postal-code>M4P1E8</postal-code>
         </address>
    </account-holder>  
    <card>
        <account-number>4271149787014678</account-number>
        <expiration-month>12</expiration-month>
        <expiration-year>2020</expiration-year>
        <card-type>visa</card-type>  
    </card>
    <order-number>21402615</order-number>
    <order-detail>Test transaction Wirecard CEE.</order-detail>
    <ip-address>127.0.0.1</ip-address>
    <periodic-type>recurring</periodic-type>
    <sequence-type>first</sequence-type>
    <payment-methods>
        <payment-method name="creditcard"/>
    </payment-methods>
</payment>

Recurring Payment

JAPI/SAPI:

COMMAND=RECURPAYMENT&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
SOURCEORDERNUMBER=21402615&
ORDERNUMBER=44152&
AMOUNT=1.23&
CURRENCY=EUR&
ADMIN_PASSWORD=test&
CONSUMER_BILLING_FIRST_NAME=John&
CONSUMER_BILLING_LAST_NAME=Doe&
CONSUMER_EMAIL=john.doe@test.com&
CONSUMER_BILLING_PHONE=5555555555&
CONSUMER_BILLING_ADDRESS_1=123 anystreet&
CONSUMER_BILLING_CITY=Brantford&
CONSUMER_BILLING_STATE=ON&
CONSUMER_BILLING_COUNTRY=CA&
CONSUMER_BILLING_ZIP_CODE=M4P1E8

REST API:

<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>>${unique for each request}</request-id>
    <transaction-type>purchase</transaction-type>
    <parent-transaction-id>${get transaction id first purchase}</parent-transaction-id>
    <requested-amount currency="EUR">1.23</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>recurring</sequence-type>
    </periodic>
    <payment-methods>
        <payment-method name="creditcard"/>
    </payment-methods>
</payment>

Referenced transaction:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment"> 
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>referenced-authorization</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <requested-amount currency="EUR">1.23</requested-amount>
    <ip-address>127.0.0.1</ip-address>
</payment>

Refund

A refund needs a preceding transaction to reference to.

JAPI/SAPI:

COMMAND=REFUND&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
SOURCEORDERNUMBER=15598604&
ORDERNUMBER=3763380&
AMOUNT=1.23&
CURRENCY=EUR&
ADMIN_PASSWORD=test

REST API:

Refund capture:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>refund-capture</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
</payment>

Refund purchase:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>refund-purchase</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
</payment>

Different Basic Auth credentials for refund:
Username: 16390-testing
Password: 3!3013=D3fD8X7

Refund capture for non credit card (e.g. Paypal):

<?xml version="1.0" encoding="utf-8"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>be17476f-1a0c-442e-8841-70e33996c0aa</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>refund-debit</transaction-type>
    <payment-methods>
        <payment-method name="paypal" />
    </payment-methods>
    <requested-amount currency="EUR">1.23</requested-amount>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <order-description>Test transaction Wirecard CEE.</order-description>
</payment>

Approve Reversal

An approval reversal needs a preceding transaction to reference to.

JAPI/SAPI:

COMMAND=APPROVEREVERSAL&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
PAYMENTNUMBER=5462117&
ORDERNUMBER=5462117&
ADMIN_PASSWORD=test

REST API:

Void authorization:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>void-authorization</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
</payment>

Void preauthorization:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>void-preauthorization</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
</payment>

Deposit Reversal

A deposit reversal needs a preceding transaction to reference to.

JAPI/SAPI:

COMMAND=DEPOSITREVERSAL&
MERCHANTKEY=41HxtdddMcf.z-rVhvc84C1.vwsnk7xoppacfzL0QdJHQ_&
PAYMENTTYPE=CREDITCARD&
ORDERDESCRIPTION=Test transaction Wirecard CEE.&
PAYMENTNUMBER=5462117&
ORDERNUMBER=5462117&
ADMIN_PASSWORD=test

REST API:

Void capture:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
    <request-id>${unique for each request}</request-id>
    <transaction-type>void-capture</transaction-type>
    <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
</payment>

Void purchase:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
     <merchant-account-id>07edc10b-d3f9-4d12-901f-0db7f4c7e75c</merchant-account-id>
     <request-id>${unique for each request}</request-id>
     <transaction-type>void-purchase</transaction-type>
     <parent-transaction-id>${get transaction id from parent transaction}</parent-transaction-id>
     <ip-address>127.0.0.1</ip-address>
</payment>

Back to Switching to Wirecard Payment Gateway main page.


This website uses cookies to deliver the best service to you. By continuing to browse the site, you are agreeing to our use of cookies.