This API enables PCI-compliant merchants to send transactions containing card data directly, without requiring them to use the payment.js tokenization or hosted payment page.
The API solely supports card transactions. For any other kind of payment method (e.g. PayPal, DirectDebit etc.) please refer to the Regular API.
The TransactionWithCard Gateway API expects an HTTP POST request with XML Payload
and an Authentication
header containing a Hash HMAC signature
(see Signing Requests below).
The destination URL is: https://secure.ixopay.com/transaction
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>YOUR_USERNAME</username>
<password>SHA1 HASHED PASSWORD</password>
<cardData>
<cardHolder>test test</cardHolder>
<pan>4111111111111111</pan>
<cvv>123</cvv>
<expirationMonth>12</expirationMonth>
<expirationYear>2021</expirationYear>
</cardData>
<debit>
<transactionId>Your Transaction ID</transactionId>
<customer>
<!-- refer to Transaction Data for all available fields -->
<identification>Customer ID</identification>
<billingCountry>2-letter country code of your customer</billingCountry>
<email>email address of your customer</email>
<ipAddress>127.0.0.1</ipAddress>
</customer>
<amount>9.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
<withRegister>false</withRegister>
</debit>
</transactionWithCard>
The examples show the basic data most connector requires. Depending on the connector type more data could be necessary. Please refer to the Connector Types documentation for concrete requirements.
To see all available fields please refer to Transaction Data.
For some languages we already provide a ready-to-use client implementation on GitHub.
For password hashing please see chapter Authentication
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<cardData>
<cardHolder>test test</cardHolder>
<pan>4111111111111111</pan>
<cvv>123</cvv>
<expirationMonth>12</expirationMonth>
<expirationYear>2021</expirationYear>
</cardData>
<debit>
<transactionId>transaction-00001</transactionId>
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<merchantMetaData>my-category-1</merchantMetaData>
<amount>4.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
<withRegister>false</withRegister>
<transactionIndicator>SINGLE</transactionIndicator>
</debit>
</transactionWithCard>
curl https://secure.ixopay.com/transaction \
-d "PUT_XML_HERE" \
-H "Authorization: Gateway ConnectorKey:Signature" \
-H "Content-Type: text/xml"
A Debit performs a complete customer-to-merchant payment
POST /transaction/{apiKey}/debit
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<debit>
<transactionId>transaction-00002</transactionId>
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<referenceTransactionId>ID-FROM-FIRST-TRANSACTION</referenceTransactionId>
<amount>4.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
<transactionIndicator>RECURRING</transactionIndicator> <!-- or CARDONFILE -->
</debit>
</transactionWithCard>
For recurring charges the initial transaction must either be a
Register, or a Debit resp. Preauthorize with the
withRegister
flag set to true
.
You must store the returned referenceId
and use for recurring transactions
in the field referencedTransactionId
.
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<cardData>
<cardHolder>test test</cardHolder>
<pan>4111111111111111</pan>
<cvv>123</cvv>
<expirationMonth>12</expirationMonth>
<expirationYear>2021</expirationYear>
</cardData>
<preauthorize>
<transactionId>transaction-00001</transactionId>
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<merchantMetaData>my-category-1</merchantMetaData>
<amount>4.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
<withRegister>false</withRegister>
</preauthorize>
</transactionWithCard>
A Preauthorize reserves the payment amount on the customer's payment instrument.
Depending on the payment method you have up to 7 days until you must Capture the transaction before the authorization expires.
POST /transaction/{apiKey}/preauthorize
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<capture>
<transactionId>transaction-00002</transactionId>
<referenceTransactionId>UUID of preauthorize transaction</referenceTransactionId>
<amount>4.99</amount>
<currency>EUR</currency>
</capture>
</transactionWithCard>
A Capture completes the payment which was previously authorized with the Preauthorize method.
Depending on the payment method you can even capture only a partial amount of the authorized amount.
POST /transaction/{apiKey}/capture
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<void>
<transactionId>transaction-00002</transactionId>
<referenceTransactionId>UUID of preauthorize transaction</referenceTransactionId>
</void>
</transactionWithCard>
A Void cancels a previously performed authorization made with the Preauthorize method.
POST /transaction/{apiKey}/void
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<refund>
<transactionId>transaction-00002</transactionId>
<referenceTransactionId>UUID of debit or capture transaction</referenceTransactionId>
<amount>4.99</amount>
<currency>EUR</currency>
</refund>
</transactionWithCard>
A Refund reverses a payment which was previously performed with Debit or Capture.
Depending on the payment method you can even refund only a partial amount of the original transaction amount.
POST /transaction/{apiKey}/refund
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<payout>
<transactionId>transaction-00001</transactionId>
<referenceTransactionId>UUID of first transaction</referenceTransactionId> <!-- this is optional but may be required for certain methods -->
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<amount>4.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
</payout>
</transactionWithCard>
A Payout credits the customer's account with the given amount.
Depending on the connector, either referenceUuid
or cardData
will be required.
POST /transaction/{apiKey}/payout
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<cardData>
<cardHolder>test test</cardHolder>
<pan>4111111111111111</pan>
<cvv>123</cvv>
<expirationMonth>12</expirationMonth>
<expirationYear>2021</expirationYear>
</cardData>
<register>
<transactionId>transaction-00001</transactionId>
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
</register>
</transactionWithCard>
Registers a customer's payment instrument for future charges (Debits or Preauthorizations)
POST /transaction/{apiKey}/register
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<deregister>
<transactionId>transaction-00002</transactionId>
<referenceTransactionId>UUID of register transaction</referenceTransactionId>
</deregister>
</transactionWithCard>
A Deregister deletes a previously registered payment instrument using Register.
POST /transaction/{apiKey}/deregister
Path parameters
Name | Type | Required | Description |
---|---|---|---|
apiKey | string | true | API Key of Connector |
<!-- Request -->
<?xml version="1.0" encoding="utf-8"?>
<transactionWithCard xmlns="https://secure.ixopay.com/Schema/V2/TransactionWithCard">
<username>API_USER</username>
<password>5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8</password>
<language>en</language>
<cardData>
<cardHolder>test test</cardHolder>
<pan>4111111111111111</pan>
<cvv>123</cvv>
<expirationMonth>12</expirationMonth>
<expirationYear>2021</expirationYear>
</cardData>
<debit>
<transactionId>transaction-00001</transactionId>
<customer>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customer>
<amount>9.99</amount>
<currency>EUR</currency>
<description>Transaction Description</description>
<successUrl>https://link.to/your/payment-successful-page</successUrl>
<cancelUrl>https://link.to/your/payment-canceled-page</cancelUrl>
<errorUrl>https://link.to/your/payment-failed-page</errorUrl>
<callbackUrl>https://link.to/your/notification-handler</callbackUrl>
<withRegister>true</withRegister>
<startSchedule>
<amount>4.99</amount>
<currency>EUR</currency>
<periodLength>1</periodLength>
<periodUnit>MONTH</periodUnit>
<startDateTime>2018-06-05 10:54:51 UTC</startDateTime>
</startSchedule>
</debit>
</transactionWithCard>
You can start a transaction with a schedule on the fly, the transaction must be either a Register, a Debit with-register or a Preauthorize with-register.
The field startDateTime is optional and can be used to set a differing length for the first period (e.g. as trial period).
If your customer is already registered, and you can provide the registrationId, then it is recommended to use the Schedule API instead (see Schedule API).
As response to the API call the gateway answers with a Result XML with the status and further instructions.
Generally there are 4 possible results:
<?xml version="1.0" encoding="utf-8"?>
<result xmlns="https://secure.ixopay.com/Schema/V2/Result">
<success>true</success>
<referenceId>12345678901234567890</referenceId>
<purchaseId>20170101-12345678901234567890</purchaseId>
<returnType>FINISHED</returnType>
</result>
The transaction completed and was processed successfully. You can deliver the ordered goods.
<?xml version="1.0" encoding="utf-8"?>
<result xmlns="https://secure.ixopay.com/Schema/V2/Result">
<success>false</success>
<referenceId>12345678901234567890</referenceId>
<purchaseId>20170101-12345678901234567890</purchaseId>
<returnType>ERROR</returnType>
<errors>
<error>
<message>Card number invalid</message>
<code>2008</code>
<adapterMessage>Invalid card number</adapterMessage>
<adapterCode>200</adapterCode>
</error>
</errors>
</result>
The transaction failed or was declined. See the error code and message for further details.
You will find the native error message and code from the payment
provider/acquiring bank in the fields adapterMessage
and adapterCode
.
<result xmlns="https://secure.ixopay.com/Schema/V2/Result">
<success>true</success>
<referenceId>12345678901234567890</referenceId>
<purchaseId>20170101-12345678901234567890</purchaseId>
<returnType>REDIRECT</returnType>
<redirectUrl>https://secure.ixopay.com/redirect/12345678901234567890/ABCDEF01234567890ABCDEF01234567890=</redirectUrl>
</result>
You must redirect the user to the URL defined in redirectUrl
to proceed with
the transaction. Afterwards the user will be back redirected to your shop
(one of the URLs you defined in the API call in successUrl
, cancelUrl
or errorUrl
).
In parallel the gateway sends a status notification to you callbackUrl
with
the final result.
<?xml version="1.0" encoding="utf-8"?>
<result xmlns="https://secure.ixopay.com/Schema/V2/Result">
<success>true</success>
<referenceId>12345678901234567890</referenceId>
<purchaseId>20170101-12345678901234567890</purchaseId>
<returnType>PENDING</returnType>
</result>
The transaction was accepted for processing, but is not yet completed. You will
receive a status notification to the URL you defined in callbackUrl
once it
reaches a final state.
Depending on the payment method, this can take from seconds up to several days.
<?xml version="1.0" encoding="utf-8"?>
<result xmlns="https://secure.ixopay.com/Schema/V2/Result">
<success>true</success>
<referenceId>12345678901234567890</referenceId>
<purchaseId>20170101-12345678901234567890</purchaseId>
<registrationId>aab69791ddedcaeae4ae</registrationId>
<returnType>FINISHED</returnType>
<scheduleId>SC-7AA3-37B8-0F27-8BCA-5B3D-90DB</scheduleId>
<scheduleStatus>ACTIVE</scheduleStatus>
<scheduledAt>2018-07-05 16:22:06 UTC</scheduledAt>
</result>
If you have started a Schedule please store the received scheduleId for further schedule handling, the scheduleId is required for operating with the Schedule API (see Schedule API).
The Gateway sends you an asynchronous notification once a transaction reaches its final state. Per default, the format of the notification will be in the same format as your request.
Please consider the namespace host name for postback notifications is: gateway.ixopay.com
A typical success notification looks like this (the element returnData
can
differ depending on the payment method):
<?xml version="1.0" encoding="utf-8"?>
<callback xmlns="https://gateway.ixopay.com/Schema/V2/Callback">
<result>OK</result>
<referenceId>edcba123456789012345</referenceId>
<transactionId>YOUR_TRANSACTION_ID</transactionId>
<purchaseId>20170120-edcba123456789012345</purchaseId>
<transactionType>DEBIT</transactionType>
<merchantMetaData>YOUR_OPTIONAL_META_DATA</merchantMetaData>
<amount>4.99</amount>
<currency>USD</currency>
<returnData type="creditcardData">
<creditcardData>
<type>visa</type>
<cardHolder>Max Mustermann</cardHolder>
<expiryMonth>10</expiryMonth>
<expiryYear>2020</expiryYear>
<firstSixDigits>411111</firstSixDigits>
<lastFourDigits>1111</lastFourDigits>
<fingerprint>ABCXYZ...</fingerprint>
<threeDSecure>MANDATORY</threeDSecure>
<eci>05</eci>
<binBrand>VISA</binBrand>
<binBank>Issuing Bank</binBank>
<binCountry>AT</binCountry>
</creditcardData>
</returnData>
<customerData>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customerData>
</callback>
This is an example for an error notification:
<?xml version="1.0" encoding="utf-8"?>
<callback xmlns="https://gateway.ixopay.com/Schema/V2/Callback">
<result>ERROR</result>
<referenceId>edcba123456789012345</referenceId>
<transactionId>YOUR_TRANSACTION_ID</transactionId>
<purchaseId>20170120-edcba123456789012345</purchaseId>
<transactionType>DEBIT</transactionType>
<merchantMetaData>YOUR_OPTIONAL_META_DATA</merchantMetaData>
<amount>4.99</amount>
<currency>USD</currency>
<errors>
<error>
<message>Card invalid</message>
<code>2008</code>
<adapterMessage>Invalid Card Entered</adapterMessage>
<adapterCode>100.000.100</adapterCode>
</error>
</errors>
<returnData type="creditcardData">
<creditcardData>
<type>visa</type>
<country>AT</country>
<cardHolder>Max Mustermann</cardHolder>
<expiryMonth>10</expiryMonth>
<expiryYear>2020</expiryYear>
<firstSixDigits>411111</firstSixDigits>
<lastFourDigits>1111</lastFourDigits>
</creditcardData>
</returnData>
<customerData>
<identification>1111</identification>
<firstName>John</firstName>
<lastName>Smith</lastName>
<billingCountry>AT</billingCountry>
<email>[email protected]</email>
<ipAddress>123.123.123.123</ipAddress>
</customerData>
</callback>
The result
tag will either contain "OK" or "ERROR". In case of error the XML contains an errors
element with further information.
<?xml version="1.0" encoding="utf-8"?>
<callback xmlns="https://gateway.ixopay.com/Schema/V2/Callback">
<result>OK</result>
<referenceId>edcba123456789012345</referenceId>
<transactionId>YOUR_TRANSACTION_ID</transactionId>
<purchaseId>20170120-edcba123456789012345</purchaseId>
<transactionType>DEBIT</transactionType>
<merchantMetaData>YOUR_OPTIONAL_META_DATA</merchantMetaData>
<amount>4.99</amount>
<currency>USD</currency>
<errors>
<error>
<message>Card declined</message>
<code>2003</code>
<adapterMessage>Card declined by authorisation System</adapterMessage>
<adapterCode>301.110</adapterCode>
</error>
</errors>
</callback>
To prove the authenticity of the notification the Gateway signs every request with the same shared secret as used for signing your requests.
You should verify the signature by calculating it on your system and compare it to the given one.
The mechanism is the same as described in Signature, but instead of defining the various values (request URI, date, etc.), you must take them out of the HTTP request you received from us. You should also verify that the Date header is within a reasonable deviation of the current timestamp (e.g. 60 seconds)
If you need additional information to process the notification for your shop
order, you can use the optional field merchantMetaData, or you can provide that
data as GET parameters in the callbackUrl
you define.
E.g. https://www.merchant.com/notification-url?someKey=someValue&anything=else
If a transaction gets charged back by the customer, the Gateway will send you a notification to the URL from the original transaction (i.e. the Debit or Capture transaction).
The notification XML will then contain an element chargebackData
with further information
<?xml version="1.0" encoding="utf-8"?>
<callback xmlns="https://gateway.ixopay.com/Schema/V2/Callback">
<result>OK</result>
<referenceId>edcba123456789012345</referenceId>
<transactionId>auto-generated-id</transactionId>
<purchaseId>20170120-edcba123456789012345</purchaseId>
<transactionType>CHARGEBACK</transactionType>
<amount>9.99</amount>
<currency>EUR</currency>
<chargebackData>
<originalReferenceId>abcdef123456123456</originalReferenceId>
<originalTransactionId>YOUR_TRANSACTION_ID</originalTransactionId>
<amount>9.99</amount>
<currency>EUR</currency>
<reason>customer_chargeback</reason>
<chargebackDateTime>2017-02-10T04:36:09Z</chargebackDateTime>
</chargebackData>
</callback>
You must confirm the notification in the same manner as normal status notifications with status code 200 and text "OK" in the response's payload.
As a follow-up on chargebacks there can be a chargeback reversal. Again the Gateway will send you a notification to the URL of the original transaction.
For this kind of notification the XML contains an element chargebackReversalData
with information to the original transaction and the chargeback transaction
<?xml version="1.0" encoding="utf-8"?>
<callback xmlns="https://gateway.ixopay.com/Schema/V2/Callback">
<result>OK</result>
<referenceId>b5c36138ada44ca09d45</referenceId>
<transactionId>auto-generated-id</transactionId>
<purchaseId>20170120-edcba123456789012345</purchaseId>
<transactionType>CHARGEBACK-REVERSAL</transactionType>
<amount>9.99</amount>
<currency>EUR</currency>
<chargebackReversalData>
<originalReferenceId>abcdef123456123456</originalReferenceId>
<originalTransactionId>YOUR_TRANSACTION_ID</originalTransactionId>
<chargebackReferenceId>edcba123456789012345</chargebackReferenceId>
<amount>9.99</amount>
<currency>EUR</currency>
<reason>dispute_won</reason>
<reversalDateTime>2017-03-26T11:27:15Z</reversalDateTime>
</chargebackReversalData>
</callback>
Note: For conditional fields, please refer to the corresponding adapter specific documentation.
Field | Required | Description |
---|---|---|
Root-level | ||
username | true | API Username given to you |
password | true | API Password given to you, hashed with SHA-1 in 10 rounds (see Password Hashing below) |
transaction tag | true | it must be one of the following types: debit, preauthorize, capture, void, refund, register, deregister, payout |
Transaction-level | ||
transactionId | true | your transaction id, must be unique |
additionalId1 | false | any additional ID if required by adapter |
additionalId2 | false | any additional ID if required by adapter |
customer | false | customer element (see below) |
extraData | false | extra parameters if required by adapter |
merchantMetaData | false | Can be filled with any string you want, with a maximum length of 255 characters. The value of that field has no influence at all on the transaction processing, but will be just returned to you in any postback notification, and will also be included in data exports. Hint: If you want to put in different types of information, we would recommend to separate them by a character, which would not occur in the data value itself, e.g. a pipe character. Example: "anyValue1|anotherValue2" |
referenceTransactionId | conditionally | UUID of reference transaction (for recurring debits, refunds, capture/voids, deregister) |
referenceCustomerId | false | reference customer ID if required by adapter |
referenceId2 | false | any additional ID if required by adapter |
referenceId3 | false | any additional ID if required by adapter |
referenceId4 | false | any additional ID if required by adapter |
amount | conditionally | Amount of transaction, decimals separated by a "." (dot) |
currency | conditionally | 3-letter currency code for amount |
description | conditionally | Transaction subject |
successUrl | conditionally | the URL to your shop, to which the user gets redirected, after the payment succeeded (or the payment status is yet unknown) |
cancelUrl | conditionally | the URL to your shop, to which the user gets redirected, after the payment was cancelled by the user |
errorUrl | conditionally | the URL to your shop, to which the user gets redirected, after the payment failed |
callbackUrl | true | the URL to your endpoint, to which the Gateway sends the status notification |
withRegister | false | this flag enables storing of the customer's payment instrument for recurring transactions |
transactionIndicator | false | this marks the type of evt. recurring or card-on-file transactions (refer to Recurring transactions ) |
The customer
element can be one of two different customer types:
For details, refer to the Transaction XML definition
Field | Description |
---|---|
Customer-level | |
identification | Unique customer identification (i.e. User ID, up to 36 characters) |
firstName | First name of customer |
lastName | Last name of customer |
birthDate | Birth date |
gender | either M for male or F for female |
billingAddress1 | Street address line 1 |
billingAddress2 | Street address line 2 |
billingCity | City |
billingPostcode | Postal code / ZIP code |
billingState | State |
billingCountry | 2-letter country code |
billingPhone | Phone number |
shippingFirstName | Shipping address first name |
shippingLastName | Shipping address last name |
shippingCompany | Shipping address company name |
shippingAddress1 | Street address line 1 |
shippingAddress2 | Street address line 2 |
shippingCity | City |
shippingPostcode | Postal code / ZIP code |
shippingState | State |
shippingCountry | 2-letter country code |
shippingPhone | Phone number |
company | Company name of the customer |
Customer's E-Mail address | |
emailVerified | Flag if you verified the email address (for example via verification email) |
ipAddress | IP address of the customer |
extraData | key/value array with additional customer data (if required by the connector) |
nationalId | The national ID (e.g. social insurance number) for a customer |
IbanCustomer | |
iban | IBAN bank account number |
bic | BIC bank identifier code |
mandateId | SEPA mandate identification |
mandateDate | Date of the SEPA mandate |
As explained in 3D Secure 2.0 Authentication you should provide as many data as you have to apply for the 3D Secure 2.0 frictionless flow.
Any data field listed shall be provided within an extraData
element.
Field & Description |
---|
3ds:channel Indicates the type of channel interface being used to initiate the transaction 01 -> App-based 02 -> Browser 03 -> 3DS Requestor Initiated |
3ds:authenticationIndicator Indicates the type of Authentication request. This data element provides additional information to the ACS to determine the best approach for handling an authentication request. 01 -> Payment transaction 02 -> Recurring transaction 03 -> Installment transaction 04 -> Add card 05 -> Maintain card 06 -> Cardholder verification as part of EMV token ID&V |
3ds:cardholderAuthenticationMethod Mechanism used by the Cardholder to authenticate to the 3DS Requestor. 01 -> No 3DS Requestor authentication occurred (i.e. cardholder "logged in" as guest) 02 -> Login to the cardholder account at the 3DS Requestor system using 3DS Requestor's own credentials 03 -> Login to the cardholder account at the 3DS Requestor system using federated ID 04 -> Login to the cardholder account at the 3DS Requestor system using issuer credentials 05 -> Login to the cardholder account at the 3DS Requestor system using third-party authentication 06 -> Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator |
3ds:cardholderAuthenticationDateTime Date and time in UTC of the cardholder authentication. Format: YYYY-MM-DD HH:mm Example: 2019-05-12 18:34 |
3ds:cardHolderAuthenticationData Data that documents and supports a specific authentication process. In the current version of the specification, this data element is not defined in detail, however the intention is that for each 3DS Requestor Authentication Method, this field carry data that the ACS can use to verify the authentication process. |
3ds:challengeIndicator Indicates whether a challenge is requested for this transaction. For example: For 01-PA, a 3DS Requestor may have concerns about the transaction, and request a challenge. 01 -> No preference 02 -> No challenge requested 03 -> Challenge requested: 3DS Requestor Preference 04 -> Challenge requested: Mandate |
3ds:priorReference This data element provides additional information to the ACS to determine the best approach for handling a request. The field is limited to 36 characters containing ACS Transaction ID for a prior authenticated transaction (for example, the first recurring transaction that was authenticated with the cardholder). |
3ds:priorAuthenticationMethod Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. 01 -> Frictionless authentication occurred by ACS 02 -> Cardholder challenge occurred by ACS 03 -> AVS verified 04 -> Other issuer methods |
3ds:priorAuthenticationDateTime Date and time in UTC of the prior authentication. Format: YYYY-MM-DD HH:mm Example: 2019-05-12 18:34 |
3ds:priorAuthenticationData Data that documents and supports a specfic authentication porcess. In the current version of the specification this data element is not defined in detail, however the intention is that for each 3DS Requestor Authentication Method, this field carry data that the ACS can use to verify the authentication process. In future versions of the application, these details are expected to be included. Field is limited to maximum 2048 characters. |
3ds:cardholderAccountType Indicates the type of account. For example, for a multi-account card product. 01 -> Not applicable 02 -> Credit 03 -> Debit 04 -> JCB specific value for Prepaid |
3ds:cardholderAccountAgeIndicator Length of time that the cardholder has had the account with the 3DS Requestor. 01 -> No account (guest check-out) 02 -> During this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
3ds:cardholderAccountDate Date that the cardholder opened the account with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
3ds:cardholderAccountChangeIndicator Length of time since the cardholder’s account information with the 3DS Requestor waslast changed. Includes Billing or Shipping address, new payment account, or new user(s) added. 01 -> Changed during this transaction 02 -> Less than 30 days 03 -> 30 - 60 days 04 -> More than 60 days |
3ds:cardholderAccountLastChange Date that the cardholder’s account with the 3DS Requestor was last changed. Including Billing or Shipping address, new payment account, or new user(s) added. Format: YYYY-MM-DD Example: 2019-05-12 |
3ds:cardholderAccountPasswordChangeIndicator Length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. 01 -> No change 02 -> Changed during this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
3ds:cardholderAccountLastPasswordChange Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: YYYY-MM-DD Example: 2019-05-12 |
3ds:shippingAddressUsageIndicator Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. 01 -> This transaction 02 -> Less than 30 days 03 -> 30 - 60 days 04 -> More than 60 days. |
3ds:shippingAddressFirstUsage Date when the shipping address used for this transaction was first used with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
3ds:transactionActivityDay Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. |
3ds:transactionActivityYear Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. |
3ds:addCardAttemptsDay Number of Add Card attempts in the last 24 hours. |
3ds:purchaseCountSixMonths Number of purchases with this cardholder account during the previous six months. |
3ds:suspiciousAccountActivityIndicator Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. 01 -> No suspicious activity has been observed 02 -> Suspicious activity has been observed |
3ds:shippingNameEqualIndicator Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. 01 -> Account Name identical to shipping Name 02 -> Account Name different than shipping Name |
3ds:paymentAccountAgeIndicator Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. 01 -> No account (guest check-out) 02 -> During this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
3ds:paymentAccountAgeDate Date that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
3ds:billingAddressLine3 Line 3 of customer's billing address |
3ds:shippingAddressLine3 Line 3 of customer's shipping address |
3ds:billingShippingAddressMatch Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Y -> Shipping Address matches Billing Address N -> Shipping Address does not match Billing Address |
3ds:homePhoneCountryPrefix Country Code of the home phone, limited to 1-3 characters |
3ds:homePhoneNumber subscriber section of the number, limited to maximum 15 characters. |
3ds:mobilePhoneCountryPrefix Country Code of the mobile phone, limited to 1-3 characters |
3ds:mobilePhoneNumber subscriber section of the number, limited to maximum 15 characters. |
3ds:workPhoneCountryPrefix Country Code of the work phone, limited to 1-3 characters |
3ds:workPhoneNumber subscriber section of the number, limited to maximum 15 characters. |
3ds:purchaseInstalData Indicates the maximum number of authorisations permitted for instalment payments. The field is limited to maximum 3 characters and value shall be greater than 1. The fields is required if the Merchant and Cardholder have agreed to installment payments, i.e. if 3DS Requestor Authentication Indicator = 03. Omitted if not an installment payment authentication. |
3ds:shipIndicator Indicates shipping method chosen for the transaction. Merchants must choose the Shipping Indicator code that most accurately describes the cardholder's specific transaction. If one or more items are included in the sale, use the Shipping Indicator code for the physical goods, or if all digital goods, use the code that describes the most expensive item. 01 -> Ship to cardholder's billing address 02 -> Ship to another verified address on file with merchant 03 -> Ship to address that is different than the cardholder's billing address 04 -> "Ship to Store" / Pick-up at local store (Store address shall be populated in shipping address fields) 05 -> Digital goods (includes online services, electronic gift cards and redemption codes) 06 -> Travel and Event tickets, not shipped 07 -> Other (for example, Gaming, digital services not shipped, emedia subscriptions, etc.) |
3ds:deliveryTimeframe Indicates the merchandise delivery timeframe. 01 -> Electronic Delivery 02 -> Same day shipping 03 -> Overnight shipping 04 -> Two-day or more shipping |
3ds:deliveryEmailAddress For electronic delivery, the email address to which the merchandise was delivered. |
3ds:reorderItemsIndicator Indicates whether the cardholder is reordering previously purchased merchandise. 01 -> First time ordered 02 -> Reordered |
3ds:preOrderPurchaseIndicator Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. 01 -> Merchandise available 02 -> Future availability |
3ds:preOrderDate For a pre-ordered purchase, the expected date that the merchandise will be available. Format: YYYY-MM-DD |
3ds:giftCardAmount For prepaid or gift card purchase, the purchase amount total of prepaid or gift card(s) in major units (for example, USD 123.45 is 123). |
3ds:giftCardCurrency For prepaid or gift card purchase, the currency code of the card |
3ds:giftCardCount For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. Field is limited to 2 characters. |
3ds:purchaseDate Date and time of the purchase, expressed in UTC. Format: YYYY-MM-DD HH:mm:ss **Note: if omitted we put in today's date |
3ds:recurringExpiry Date after which no further authorizations shall be performed. This field is required for 01-PA and for 02-NPA, if 3DS Requestor Authentication Indicator = 02 or 03. Format: YYYY-MM-DD |
3ds:recurringFrequency Indicates the minimum number of days between authorizations. The field is limited to maximum 4 characters. This field is required if 3DS Requestor Authentication Indicator = 02 or 03. |
3ds:transType Identifies the type of transaction being authenticated. The values are derived from ISO 8583. 01 -> Goods / Service purchase 03 -> Check Acceptance 10 -> Account Funding 11 -> Quasi-Cash Transaction 28 -> Prepaid activation and Loan |
3ds:exemptionIndicator Requests an SCA exemption for this transaction. Possible values are: 01 -> Low Value Transaction (amount under 30 EUR) 02 -> Low Risk Transaction 03 -> Whitelisted transaction, merchant is added as "Trusted Beneficiary" by cardholder 04 -> Secure Corporate Payment 05 -> Recurring or Merchant-initiated transaction 06 -> Mail or Telephone Order 07 -> Anonymous payment card |
3ds:browserChallengeWindowSize Dimensions of the challenge window that has been displayed to the Cardholder. The ACS shall reply with content that is formatted to appropriately render in this window to provide the best possible user experience. 01 -> 250 x 400 02 -> 390 x 400 03 -> 500 x 600 04 -> 600 x 400 05 -> Full screen |
For 3DS v2, the device data below are mandatory. Transaction will not succeed if either all browser or all SDK parameters are provided.
The following fields are filled automatically by the Gateway if you are using hosted payment pages or payment.js integration. For any other integration flow you will need to provide them:
Key & Description |
---|
3ds:browserAcceptHeader Exact content of the HTTP accept headers as sent to the 3DS Requestor from the Cardholder's browser |
3ds:browserIpAddress IP address of the browser as returned by the HTTP headers to the 3DS Requestor. - IPv4 address is represented in the dotted decimal format of 4 sets of decimal numbers separated by dots. The decimal number in each and every set is in the range 0 - 255. Example: 1.12.123.255 - IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits (two octets). The groups are separated by colons (:). Example: 2011:0db8:85a3:0101:0101:8a2e:0370:7334 |
3ds:browserJavaEnabled Boolean that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. |
3ds:browserLanguage Value representing the browser language as defined in IETF BCP47. The value is limited to 1-8 characters. Value is returned from navigator.language property. |
3ds:browserColorDepth Value representing the bit depth of the colour palette for displaying images, in bits per pixel. Obtained from Cardholder browser using the screen.colorDepth property. 1 -> 1 bit 4 -> 4 bits 8 -> 8 bits 15 -> 15 bits 16 -> 16 bits 24 -> 24 bits 32 -> 32 bits 48 -> 48 bits |
3ds:browserScreenHeight Total height of the Cardholder's screen in pixels. Value is returned from the screen.height property. |
3ds:browserScreenWidth Total width of the Cardholder's screen in pixels. Value is returned from the screen.width property. |
3ds:browserTimezone Time difference between UTC time and the Cardholder browser local time, in minutes. The field is limited to 1-5 characters where the value is returned from the getTimezoneOffset() method. |
3ds:browserUserAgent Exact content of the HTTP user-agent header. The field is limited to maximum 2048 characters. |
Key & Description |
---|
3ds:sdkInterface Specifies all of the SDK Interface types that the device supports for displaying specific challenge user interfaces within the SDK. Accepted values are: 01 -> Native 02 -> HTML 03 -> Both |
3ds:sdkUiType Contains a comma-separated list of all UI types that the device supports for displaying specific challenge user interfaces within the SDK. Accepted values for each UI type are: 01 -> Text 02 -> Single select 03 -> Multi select 04 -> OOB 05 -> Html Other (valid only for HTML UI) E.g. 01,02,05 |
3ds:sdkAppID Universally unique ID created upon all installations and updates of the 3DS Requestor App on a Customer Device. |
3ds:sdkEncData JWE Object as defined 3DS Specs Section 6.2.2.1 containing data encrypted by the SDK for the DS to decrypt. |
3ds:sdkEphemPubKey Public key component of the ephemeral key pair generated by the 3DS SDK and used to establish session keys between the 3DS SDK and ACS The value should be a JSON string containing the keys kty , crv , x , y , e.g. {"kty":"EC","crv":"P-256","x":"...","y":"..."} |
3ds:sdkMaxTimeout Indicates the maximum amount of time (in minutes) for all exchanges. The field shall have value greater than or equal to 05. |
3ds:sdkReferenceNumber Identifies the vendor and version of the 3DS SDK that is integrated in a 3DS Requestor App, assigned by EMVCo when the 3DS SDK is approved. The field is limited to 32 characters. |
3ds:sdkTransID Universally unique transaction identifier assigned by the 3DS SDK to identify a single transaction. |
Within the transaction request XML you pass username and password given by your integration engineer.
The plaintext password must be hashed with SHA1 hashing algorithm. The result shall be passed in lower case letters.
$password = 'myPassword';
$password = sha1($password);
var pass = "myPassword";
var sha1 = SHA1.Create();
var hash = sha1.ComputeHash(System.Text.Encoding.ASCII.GetBytes(pass));
pass = this.ByteToString(hash).ToLower(); //see function below
protected string ByteToString(byte[] buff)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < buff.Length; i++)
{
sb.Append(buff[i].ToString("X2"));
}
return sb.ToString();
}
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
String password = 'myPassword';
MessageDigest md;
try {
md = MessageDigest.getInstance("SHA-1");
} catch( NoSuchAlgorithmException e ) {
// should never happen since MessageDigest doc says SHA-1 must be on every JVM
throw new RuntimeException("couldn't get SHA-1 digest", e);
}
byte[] digest = password.getBytes(StandardCharsets.UTF_8);
md.reset();
digest = Hex.hex(md.digest(digest)).getBytes(StandardCharsets.UTF_8);
password = new String(digest, StandardCharsets.UTF_8);
Every request to the Transaction API must be signed with your shared secret.
The signature is generated via Hash HMAC method, using SHA2-512 as hashing algorithm and is expected to be BASE64 encoded.
$method = 'POST';
$xml = '...'; //see Transaction Request chapter
$contentType = 'text/xml; charset=utf-8';
$date = new \DateTime('now', new \DateTimeZone('UTC'));
$timestamp = $date->format('D, d M Y H:i:s T');
$additionals = '';
$requestUri = '/transaction';
$signatureMessage = join("\n", [$method, hash("sha512", $xml), $contentType, $timestamp, $additionals, $requestUri]);
$digest = hash_hmac('sha512', $signatureMessage, 'THE_SHARED_SECRET', true);
$signature = base64_encode($digest);
var sharedSecret = "SHARED_SECRET";
var method = "POST";
var bodySHA512 = MakeSHA512Hash(transactionXml);
var contentType = "text/xml; charset=utf-8";
var date = new DateTime();
var timestamp = date.ToUniversalTime().ToString("r");
var additionals = "";
var requestUri = "/transaction";
var signatureMessage = method + "\n" + bodySHA512 + "\n" + contentType + "\n" + timestamp + "\n" + additionals + "\n" + requestUri;
var hmacSha512 = new HMACSHA512(Encoding.UTF8.GetBytes(sharedSecret));
var hash = hmacSha512.ComputeHash(Encoding.UTF8.GetBytes(signatureMessage));
var signature = System.Convert.ToBase64String(hash); //this is what we need now
public string MakeSHA512Hash(string content) {
SHA512 sha512 = new SHA512Managed();
byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(input);
byte[] hash = sha512.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++) {
sb.Append(hash[i].ToString("X2"));
}
return sb.ToString();
}
// No Java example yet
The signature message is built by concatenating the following data with a line
break \n
Date
headerAfterwards you build the HMAC digest with SHA512 of this message with the shared secret as key. The digest should be generated in binary (not hexadecimal) and then base64 encoded.
curl \
-d "PUT_XML_HERE" \
-H "Authorization: Gateway THE_API_KEY:Signature" \
-H "Content-Type: text/xml" \
"https://gateway.ixopay.com/transaction"
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: Gateway THE_API_KEY:'.$signature,
'Date: '.$timestamp, //from above
'Content-Type: '.$contentType
);
var apiKey = 'YOUR_API_KEY';
var request = (HttpWebRequest)WebRequest.Create("https://gateway.ixopay.com/transaction");
//values from above
request.Method = method;
request.ContentType = contentType;
request.ContentLength = transactionXml.Length;
request.Date = now;
request.Headers.Add("Authorization: Gateway " + apiKey + ":" + signature);
// No Java example yet
The generated signature must be passed in the request header Authorization
,
alongside with the application name ("Gateway") and your API key for the desired
connector.
E.g.: Authorization: Gateway API_KEY:generatedSignature
(Replace "API_KEY" and "generatedSignature" with the appropriate values)
Now you can send the request.
Use this tool to verify the correctness of your signature generation.