Initialize-Payment Examples
Initialize Response
The Initialize Payment response has information about the transaction such as the transaction ID and amount along with the configured payment methods or cards types. The merchant must use this operation when a customer checks out.
The Initialize Payment response can be divided into these chunks:
- Merchant configuration
- Transaction information
- Card information
Card Payment
The code below is an example of an Initialize Payment response that the Velocity server sends to a merchant’s customer:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<client-config account="[integer]" auto-capture="false" id="[integer]" mode="[integer]" store-card="[integer]">
<name>Test</name>
<callback-url>[callback url]</callback-url>
<accept-url />
</client-config>
<transaction auto-capture="true" eua-id="[integer]" id="[integer]" language="en" mode="1" order-no="" type-id="[integer]">
<amount country-id="[integer]" currency="DKK" format="{PRICE} {CURRENCY}" symbol="">10025</amount>
<mobile country-id="[integer]" operator-id="[integer]">30206172</mobile>
<callback-url>[CALLBACK URL]</callback-url>
<accept-url />
</transaction>
<cards>
.....
<card cvc-length=“3” cvcmandatory=“false” dcc=“false” presentment ="true" enabled=“true” id=“8” instalment=“0" max-length=“19” min-length=“13" payment-type=“1” preferred=“false” processor-type=“1” psp-id=“21" state-id=“1” type-id=“8">
<name>Visa</name>
<prefixes>
<prefix>
<min>4000</min>
<max>4999</max>
</prefix>
<prefix>
<min>413222</min>
<max>413222</max>
</prefix>
</prefixes>Visa</card>
<!—This is list of settlement currencies for PCC flow These currencies are configured as per merchant’s preference per card. This node will come only if PCC is turned on -- >
<settlement-currencies>
<settlement-currency>
<id>640</id>
</settlement-currency>
<settlement-currency>
<id>684</id>
</settlement-currency>
</settlement-currencies>
</cards>
<stored-cards>
<card id="[integer]" preferred="true" psp-id="2" type-id="2" dcc="true”>
<name>myVisa</name>
<card-number-mask>4711 10** **** 0000</card-number-mask>
<expiry>06/24</expiry>
</card>
</stored-cards>
</root>
Wallet
The code below is an example response for a payment using a wallet:
<wallets>
<card cvc-length="-1" enabled="true" id="15" max-length="-1" min-length="-1" payment-type="3" preferred="false" processor-type="3" psp-id="18" state-id="1" type-id="[integer]">
<name>[wallet name]</name>
<prefixes>
<prefix>
<min>0</min>
<max>0</max>
</prefix>
</prefixes>
<url method="overlay" />
<head><script type='text/javascript'> var debug = false; var countryCode = "US"; var currencyCode = "USD"; var merchantIdentifier = 'merchant.com.cellpointmobile.applepay'; var displayName ="UATP"; var totalAmount = "1"; var supportedNetword = ['AMEX','MASTERCARD','VISA']; </script> <script type="text/javascript" src="https://s3.ap-southeast-1.amazonaws.com/cpmassets/psp/applepay.js"></script> <style> #applePay{width:150px;height:50px;display:none;border-radius:5px;background-image:-webkit-named-image(apple-pay-logo-white);background-position:50% 50%;background-color:#000;background-size:60%;background-repeat:no-repeat} </style></head>
<body><button type="button" id="applePay"></button></body>
</card>
</wallets>
The code below is an example response for a payment using Apple Pay:
?xml version="1.0" encoding="UTF-8"?>
<root>
<url method="overlay" />
<head><script type='text/javascript'> var debug = false; var countryCode = "US"; var currencyCode = "USD"; var merchantIdentifier = 'merchant.com.CPD.iphone.qa'; var displayName ="UATP"; var totalAmount = "1"; var supportedNetword = ['AMEX','MASTERCARD','VISA']; </script> <script type="text/javascript" src="https://s3.ap-southeast-1.amazonaws.com/cpmassets/psp/applepay.js"></script> <style> #applePay{width:150px;height:50px;display:none;border-radius:5px;background-image:-webkit-named-image(apple-pay-logo-white);background-position:50% 50%;background-color:#000;background-size:60%;background-repeat:no-repeat} </style></head>
<body><button type="button" id="applePay"></button></body>
</root>
Updated 3 months ago