Backend Tips

Netaxept offers REST API to register, authorize and capture payments and query transaction status. This section provides backend tips of each API and some variations for different payment flows.

Register API

Merchant backend registers payments with netaxept through the register API. This API is also used to register/store cards in Netaxept’s secure store (for cards that support this feature). The API retruns a transaction ID which the client SDK (Pia SDK) uses to make terminal call with Netaxept for most transaction flows.

Registering card for Easy Payment

Note: See Netaxept documentation for more details on this API.

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/register.aspx Method: POST

Request body:

{
    "merchantId" : "integer", 
    "token" : "string",
    "orderNumber" : "string",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "M",
    "recurringType" : "S",
    "force3DSecure" : "true",
    "updateStoredPaymentInfo" : "true"
} 

Netaxept returns transaction ID following the above register call. In order to store the card, make a verify API call to Netaxept with the given transaction ID.

(Query the status of the register call with Netaxept to retreive and store the Pan-hash associated with the card)

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/process.aspx Method: POST

Request body:

{
    "merchantId" : "string",
    "token" : "string",
    "transactionId" : "string",
    "operation" : "VERIFY"
}

Use the query API to fetch the Pan Hash associated with the card once process VERIFY is successful.

Registering Easy Payment

Initial transaction

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/register.aspx Method: POST

Request body:

{
    "merchantId" : "integer", 
    "token" : "string",
    "language" : "string", 
    "orderNumber" : "string",
    "amount" : "integer",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "M",
    "recurringType" : "S",
    "force3DSecure" : "true"
} 
Subsequent transaction

Subsequent easy payment requires recurringUse3DS = true and the panHash additional fields.

{
    "merchantId" : "integer", 
    "token" : "string",
    "language" : "string", 
    "orderNumber" : "string",
    "amount" : "integer",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "M",
    "recurringType" : "S",
    "recurringUse3DS" : "true", 
    "panHash" : "string"
} 

Registering Recurring Payment

Initial transaction

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/register.aspx Method: POST

Request body:

{
    "merchantId" : "integer", 
    "token" : "string",
    "language" : "string", 
    "orderNumber" : "string",
    "amount" : "integer",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "M",
    "recurringType" : "R",
    "force3DSecure" : "true",
    "recurringExpiryDate" : "YYYYMMDD", 
    "recurringFrequency" : "integer"
} 

If the initial transaction is merely to store card for further payments, add "updateStoredPaymentInfo" : "true" field to the request body.

Subsequent transaction

Subsequent recurring payment requires "recurringUse3DS" : "true" and the "panHash" : "string" additional fields.

{
    "merchantId" : "integer", 
    "token" : "string",
    "language" : "string", 
    "orderNumber" : "string",
    "amount" : "integer",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "M",
    "recurringType" : "R",
    "recurringUse3DS" : "true", 
    "panHash" : "string"
} 
Request body - S-Business Card Payment registration:

Make sure to add the below parameter along with all other required parameters for card payment registeration.

{
    "paymentMethodActionList" : { 
        "PaymentMethod" : "SBusinessCard" 
    }
}
Request body - Pay Pal payment registration:
{
    "paymentMethodActionList" : { 
        "PaymentMethod" : "PayPal" 
    }
}
Request body - Apple Pay payment registration:
{
    "paymentData" : "string",
    "paymentMethodActionList" : { 
        "PaymentMethod" : "ApplePay" 
    }
}

The paymentData should contain th encrypted Payment Data from Apple pay of the following format:

{
    "paymentData" : {
        "version" : "string",
        "data" : "string",
        "signature" : "string", 
        "header" : {
            "ephemeralPublicKey" : "string", 
            "publicKeyHash" : "string",
            "transactionId" : "string"
        }
    },
    "paymentMethod" : {
        "displayName" : "string",
        "network" : "string", 
        "type" : "string"
    },
    "transactionIdentifier" : "string"
}
Request body - Vipps payment registration:

You can either pass the phone number or set the isApp to true.

{
    "customerPhoneNumber" : "string" or "isApp" : "true",
    "paymentMethodActionList" : { 
        "PaymentMethod" : "Vipps"
    }
}
Request body - Swish payment registration:
{
    "paymentMethodActionList" : { 
        "PaymentMethod" : "SwishM" 
    }
}
Request body - Mobilepay payment registration:
{
    "paymentMethodActionList" : { 
        "PaymentMethod" : "Mobilepay" 
    }
}
Request body - Paytrail payment registration:
{
    "merchantId" : "integer", 
    "token" : "string",
    "orderNumber" : "string",
    "amount" : "integer",
    "currencyCode" : "string",  
    "redirectUrl" : "string",
    "serviceType" : "B",
    "paymentMethodActionList" : { 
        "PaymentMethod" : "bank selected by the customer, example PaytrailOPBankFinland or PaytrailAktiaFinland"
    },
    "customerEmail" : "string",
    "customerFirstName" : "string",
    "customerLastName" : "string",
    "customerAddress1" : "string",
    "customerPostCode" : "string",
    "customerTown" : "string",
    "customerCountry" : "string",
}

Payment authorization with Netaxept

Send authorization of payment to Netaxept following user’s action (handled by the client Pia SDK)

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/process.aspx Method: POST

Request body:

{
    "merchantId" : "string",
    "token" : "string",
    "transactionId" : "string",
    "operation" : "AUTH"
}

Note: See Netaxept documentation for more details on this API.

Capture payment

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/process.aspx Method: POST

Request body:

{
    "merchantId" : "string",
    "token" : "string",
    "transactionId" : "string",
    "transactionAmount " : "integer",
    "operation" : "CAPTURE "
}

Query transaction status

Test: https://test.epayment.nets.eu Production: https://epayment.nets.eu Path: /netaxept/query.aspx Method: POST

Request body:

{
    "merchantId" : "string",
    "token" : "string",
    "transactionId" : "string"
}

Note: See Netaxept documentation for more details on this API.