Initialize-Payment

Initialize Request

Refer to Initialize Request for details.

πŸ“˜

Note: For split abandoned payments, the session-id is sent back in the initialize request with full amount.

Split abandoned happens when a customer starts a fresh transaction and leaves a current split payment.

Response for First Initialize

The response from the Velocity server has information about the transaction such as transaction ID and amount along with the configured payment methods or card types. The merchants must call this API when a customer checks out.

The Initialize Payment response can be divided into the following chunks:

  • Merchant configuration
  • Transaction information
  • Card information

The code below is an example of an Initialize Payment response for a split payment:

<?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>
        <split_payment>
        <configuration>
            <applicable_combinations>
                <combination>
                    <payment_type>
                        <id>1</id>
                        <sequence>1</sequence>
                    </payment_type>
                    <payment_type>
                        <id>2</id>
                        <sequence>2</sequence>
                    </payment_type>
                    <is_one_step_authorization>true</is_one_step_authorization>
                </combination>
                <combination>
                    <payment_type>
                        <id>1</id>
                        <sequence>1</sequence>
                    </payment_type>
                    <payment_type>
                        <id>1</id>
                        <sequence>2</sequence>
                    </payment_type>
                    <is_one_step_authorization>false</is_one_step_authorization>
                </combination>
            </applicable_combinations>
        </configuration>
    </split_payment>
        <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” 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>
              <card id="28" type-id="28" psp-id="24" min-length="-1" max-length="-1" cvc-length="-1" state-id="1" payment-type="4" preferred="false" enabled="true" processor-type="4" installment="0" cvcmandatory="false" dcc="true" presentment-currency="false">
                      <name>[PSP]</name>
                      <prefixes>
                              <prefix>
                                     <min>0</min>
                                     <max>0</max>
                              </prefix>
                      </prefixes>[PSP name]
              </card>
       </cards>
	    <vouchers>
        <card id="26" type-id="26" psp-id="-1" min-length="-1" max-length="-1" cvc-length="-1" state-id="1" payment-type="2" preferred="false" enabled="true" processor-type="2" installment="0" cvcmandatory="false" dcc="false" presentment-currency="false">
            <name>TravelFund</name>
            <prefixes>
                <prefix id="337">
                    <min>-1</min>
                    <max>-1</max>
                </prefix>
            </prefixes>TravelFund
        </card>
    </vouchers>
</root>

Response for Subsequent Initialize

The code below is an example of a subsequent Initialize Payment response for a split payment:

<?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>
        <split_payment>
<active_split>
            <current_split_sequence>2</current_split_sequence>
            <transactions>
                <transaction>
                    <payment_type>1</payment_type>
                    <id>5297575</id>
                    <sequence>1</sequence>
                </transaction>
            </transactions>
        </active_split>


        <configuration>
            <applicable_combinations>
                <combination>
                    <payment_type>
                        <id>1</id>
                        <sequence>1</sequence>
                    </payment_type>
                    <payment_type>
                        <id>2</id>
                        <sequence>2</sequence>
                    </payment_type>
                    <is_one_step_authorization>true</is_one_step_authorization>
                </combination>
                <combination>
                    <payment_type>
                        <id>1</id>
                        <sequence>1</sequence>
                    </payment_type>
                    <payment_type>
                        <id>1</id>
                        <sequence>2</sequence>
                    </payment_type>
                    <is_one_step_authorization>false</is_one_step_authorization>
                </combination>
            </applicable_combinations>
        </configuration>
    </split_payment>
        <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” 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>
              <card id="28" type-id="28" psp-id="24" min-length="-1" max-length="-1" cvc-length="-1" state-id="1" payment-type="4" preferred="false" enabled="true" processor-type="4" installment="0" cvcmandatory="false" dcc="true" presentment-currency="false">
                      <name>[PSP]</name>
                      <prefixes>
                              <prefix>
                                     <min>0</min>
                                     <max>0</max>
                              </prefix>
                      </prefixes>[PSP name]
              </card>
       </cards>
    <vouchers>
        <card id="26" type-id="26" psp-id="-1" min-length="-1" max-length="-1" cvc-length="-1" state-id="1" payment-type="2" preferred="false" enabled="true" processor-type="2" installment="0" cvcmandatory="false" dcc="false" presentment-currency="false">
            <name>TravelFund</name>
            <prefixes>
                <prefix id="337">
                    <min>-1</min>
                    <max>-1</max>
                </prefix>
            </prefixes>TravelFund
        </card>
    </vouchers>
</root>

All subsequent operations such as authorization and capture are driven normally via API calls for each payment.