Skip to content

Payment REST API - Server

Initiate Payment

To initiate a payment for a new order, send POST request to the below path where {mid} is your merchant id and {orderId} is your reference to the order.

POST /v2/merchants/{mid}/orders/{orderId}

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
POST /v2/merchants/1570616552/orders/order_example_1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "currency": "EUR",
    "amount": 10.50
  },
  "transactionChannel": "Web Online",
  "cardInfo": {
    "cardNumber": "4111111111111111",
    "expirationDate": "12-2024"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 0.00,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 0.00,
    "baseRefundedAmount": 0.00,
    "capturable": true,
    "cancelable": true,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986908782,
            "transactionTypeId": 1,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Authorize",
            "transactionDate": "2019-10-04T14:05:26.927Z",
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "acquirerAuthorizationCode": "123456",
            "acquirerReferenceId": "622135",
            "acquirerAnswerCode": "00",
            "bankReferenceId": "622135",
            "bankAnswerCode": "00",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 2,
            "avsResponse": "",
            "avsAnswerCode": 3
        }
    ]
}

Auto Capture

Use the flag autoCapture to determine whether the transaction is to be executed as an Authorize or Debit.

The value by default is false, that will initiate an Authorize transaction. Set autoCapture to true to initiate a Debit transaction.

Recurring payments

To indicate that a transaction is recurring or not, use the recurringInfo object.

Tokenization

Referencing a tokenized card

Use a previously stored card by referencing the name of the token in the payment request.

To tokenize a card

Set createToken to true to store a card number during the Initiate Payment transaction call.

See Tokenization for other methods for tokenization.

Fraud Screening

To determine overall fraud screening behavior, use fraudControl.fraudScreening.

fraudScreening options Explanation
Screen Activate fraud screening.
Bypass Disable fraud screening.
Passive Fraud screening active, but ignore result.
Field Name Value Explanation
fraudScreeningPreAuth true Fraud screen prior to the processing of the transaction. This is the default behavior.
fraudScreeningPreAuth false Fraud screen after sending the transaction to the acquirer.
fraudScreeningOn3DSLiabilityShift true Fraud screen transaction even after successful 3DSecure liability shift.
fraudScreeningOn3DSLiabilityShift false Do not fraud screen transaction after successful 3DSecure liability shift. This is the default behavior.
fraudScreeningActionOnHold PASSED Override when the fraud screening provider returns HOLD.
fraudScreeningActionOnHold BLOCKED Do not override the fraud screening provider's response.

CVV, CVC screening

Set cardVerificationInfo.cvCodeState to USED when you pass cardVerificationInfo.cvCode.

AVS Screening

Address Validation System is activated when the issuing bank supports it. In order to enable, cardVerificationInfo.useAVS should be set to true. AVS uses addressLine1, city, zipCode under billingInfo.contactInfo object.

Payment control parameters

Set transactionChannel to indicate how the transaction details are collected, e.g. Web Online for a regular online transaction.

Set merchantInfo.posId to one of the pre-configured Point Of Sale IDs. Only use this field if you are configured for multiple posIDs.

Authorization type

Set cardInfo.authorizationType to define authorization type. The default value is UNDEFINED. Visa and MasterCard both supports PRE_AUTHORIZATION. However, Visa does not support FINAL_AUTHORIZATION.

Originating Account Type

originatingAccountType overrides the default card issue type by indicating the type of account to charge for the transaction when possible. The default is UNSPECIFIED. CHEQUE_ACCOUNT uses the card as a debit card. CREDIT_FACILITY uses the card as a credit card.

Order level vs Transaction level Payment processing

The recommended way to integrate with the Payment REST API is by working with orders.

The Merchant configuration applies for both the Order level and Transaction level. The Request and the Response body follows the same schema.

Transaction level payment management is an advance way to handle more complex use cases. It mandates the merchant to explicitly specify the reference transaction of each operation. The Payments REST API will validate the correctness of the referred transaction.

Cancel order

To cancel an order, send a POST request to the below path where {mid} is the merchant id and {orderId} is the reference to the order. Send empty body in the request.

POST /v2/merchants/{mid}/orders/{orderId}/cancels

Example request

1
2
3
4
POST /v2/merchants/1570616552/orders/order_example_1/cancels HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 0.00,
    "fulfilmentAmount": 0.00,
    "capturedAmount": 0.00,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 0.00,
    "baseFulfilmentAmount": 0.00,
    "baseCapturedAmount": 0.00,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909900,
            "transactionTypeId": 4,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Cancel",
            "transactionDate": "2019-10-04T14:33:18.848Z",
            "refTransactionId": 5986909891,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "acquirerAnswerCode": "00",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Cancel transaction

Advanced topic

This section explains the payment processing on transaction level. Transaction level payment processing allows granular control and is subjected to specific validations.

Cancelling a specific Authorize transaction is done by referring to the Authorize Transaction.

POST /v2/transactions/{transactionId}/cancels

Example request

1
2
3
4
POST /v2/transactions/5986909891/cancels HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172 

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 0.00,
    "fulfilmentAmount": 0.00,
    "capturedAmount": 0.00,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 0.00,
    "baseFulfilmentAmount": 0.00,
    "baseCapturedAmount": 0.00,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909900,
            "transactionTypeId": 4,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Cancel",
            "transactionDate": "2019-10-04T14:33:18.848Z",
            "refTransactionId": 5986909891,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "acquirerAnswerCode": "00",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Capture order

To capture an order, send a POST request to the below path where {mid} is the merchant id and {orderId} is the reference to the order.

POST /v2/merchants/{mid}/orders/{orderId}/captures

The default amount to capture is the FulfilmentAmount that is already successfully authorized.

Partial capture is supported for the authorized amount.

Multiple captures and over captures are supported if configured.

If an amount is specified, the currency has to be the same currency as used in the previous transaction on the order.

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST /v2/merchants/1570616552/orders/order_example_1/captures HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount" : {
    "amount": 10.50,
    "currency": "EUR"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": true,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909881,
            "transactionTypeId": 3,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Capture",
            "transactionDate": "2019-10-04T14:19:34.264Z",
            "refTransactionId": 5986908782,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Capture transaction

Advanced topic

This section explains the payment processing on transaction level. Transaction level payment processing allows granular control and is subjected to specific validations.

Capturing a specific Authorize transaction is done by referring to the Authorize Transaction.

POST /v2/transactions/{transactionId}/captures

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST /v2/transactions/5986908782/captures HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount" : {
    "amount": 10.50,
    "currency": "EUR"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": true,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909881,
            "transactionTypeId": 3,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Capture",
            "transactionDate": "2019-10-04T14:19:34.264Z",
            "refTransactionId": 5986908782,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Refund order

To refund an order, send a POST request to the below path where {mid} is the merchant id and {orderId} is the reference to the order.

POST /v2/merchants/{mid}/orders/{orderId}/refunds

By default, if there is no amount and currency in the request, the amount that is refunded will be set to that of the order CaptureAmount.

Partial refund is supported, if the order has a single capture or a debit transaction. The processing currency of the refund request has to be same as the currency of the order.

Multiple partial refunds are allowed but the with the same limitation as above.

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST /v2/merchants/1570616552/orders/order_example_1/refunds HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Refund to a different card

Processing a Refund to a different card number/ card scheme is possible by specifying the card details or token.

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
POST /v2/merchants/1570616552/orders/order_example_1/refunds HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  },
   "cardInfo": {
    "cardNumber": "5555555555554444",
    "expirationDate": "06-2026"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "MasterCard",
            "paymentMethodId": 1002,
            "maskedAccountNumber": "555555xxxxxx4444",
            "cardExpiryDate": "2026-06",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Refund using a token

Processing a Refund using a token referencing to a card number is possible by specifying the token details.

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
POST /v2/merchants/1570616552/orders/order_example_1/refunds HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  },
   "token":"9000037590314444"
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "MasterCard",
            "paymentMethodId": 1002,
            "token":"9000037590314444",
            "maskedAccountNumber": "555555xxxxxx4444",
            "cardExpiryDate": "2026-06",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Refund to a bank account

Processing a Refund to a consumer's bank account is possible by specifying the bank details.

It is only valid for Redirect Payment and EFT.

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
POST /v2/merchants/1570616552/orders/order_example/refunds HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  },
   "bankBillingInfo": {
    "iban": "SE123456",
    "swiftBIC" : "ESSESESS"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
    "mid": 1570616552,
    "orderId": "order_example",
    "orderAmount": 0,
    "fulfilmentAmount": 0,
    "capturedAmount": 0,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 0,
    "baseFulfilmentAmount": 0,
    "baseCapturedAmount": 0,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "timestamp": "2020-01-13T08:09:29.487Z",
    "transactionReferences": [
        {
            "transactionId": 10194108019,
            "transactionTypeId": 65,
            "mid": 1570616552,
            "orderId": "order_example",
            "transactionType": "Payout",
            "transactionDate": "2020-01-13T08:09:29.487Z",
            "transactionDesc": "OK",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "SEPA",
            "paymentMethodId": 3502
        }
    ]
}

Refund transaction

Advanced topic

This section explains the payment processing on transaction level. Transaction level payment processing allows granular control and is subjected to specific validations.

Refunding a specific transaction is done by referring to a Capture or Debit Transaction.

POST /v2/transactions/{transactionId}/refunds

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
POST /v2/transactions/5986909904/refunds HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}

Complete Payment

Complete Payment supports redirect payment methods. The request will trigger a real-time check to get the latest transaction status from third parties. E.g. Banks.

POST /v2/merchants/{mid}/orders/{orderId}/completes

Example request

1
2
3
4
5
6
7
8
POST /v2/merchants/1570616552/orders/order_example_1/completes HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
    "redirectParameterString": "A=X&B=Y"
}    

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": true,
    "completable": false,
    "dccIndicator": false,
    "timestamp": "2020-01-10T15:53:48.538Z",
    "transactionReferences": [
        {
            "transactionId": 10442995789,
            "transactionTypeId": 109,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Debit",
            "transactionDate": "2020-01-10T15:54:15.163Z",
            "refTransactionId": 10442995788,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "CCAvenue",
            "paymentMethodId": 28
        }
    ]
}

Complete transaction

Advanced topic

This section explains the payment processing on transaction level. Transaction level payment processing allows granular control and is subjected to specific validations.

Completing a specific transaction is done by referring to an InitiateAuthorize or InitiateDebit Transaction.

POST /v2/transactions/{transactionId}/completes

Example request

1
2
3
4
5
6
7
8
POST /v2/transactions/1234567890/completes HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
    "redirectParameterString": "A=X&B=Y"
}    

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 0.00,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 0.00,
    "capturable": false,
    "cancelable": false,
    "refundable": true,
    "completable": false,
    "dccIndicator": false,
    "timestamp": "2020-01-10T15:56:29.454Z",
    "transactionReferences": [
        {
            "transactionId": 10442995796,
            "transactionTypeId": 109,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Debit",
            "transactionDate": "2020-01-10T15:56:38.503Z",
            "refTransactionId": 1234567890,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "CCAvenue",
            "paymentMethodId": 28
        }
    ]
}

Get order

To get an order details, send a GET request to the below path where {mid} is the merchant id and {orderId} is the reference to the order.

GET /v2/merchants/{mid}/orders/{orderId}

The GET response includes all the transactions in the scope of the order.

Example request

1
2
3
4
GET /v2/merchants/1570616552/orders/order_example_1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.5,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        },
        {
            "transactionId": 5986909904,
            "transactionTypeId": 3,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Capture",
            "transactionDate": "2019-10-04T14:38:52.752Z",
            "refTransactionId": 5986909903,
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.5,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        },
        {
            "transactionId": 5986909903,
            "transactionTypeId": 1,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Authorize",
            "transactionDate": "2019-10-04T14:38:43.410Z",
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.5,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "acquirerAuthorizationCode": "123456",
            "acquirerReferenceId": "228748",
            "acquirerAnswerCode": "00",
            "bankReferenceId": "228748",
            "bankAnswerCode": "00",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "2024-12",
            "cvResponse": "",
            "cvAnswerCode": 2,
            "avsResponse": "",
            "avsAnswerCode": 3
        }
    ]
}

Original Credit (Credit without reference)

Original credit is a special transaction type which allows a refund without referring to an earlier payment. The orderId must be unique for this transaction type.

POST /v2/merchants/{mid}/orders/{orderId}/originalcredits

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
POST /v2/merchants/1570616552/orders/order_example/originalcredits HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "currency": "EUR",
    "amount": 10.50
  },
  "cardInfo": {
    "cardNumber": "4111111111111111",
    "expirationDate": "12-2024"
  }
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
    "mid": 1570616552,
    "orderId": "order_example",
    "orderAmount": 0.00,
    "fulfilmentAmount": 0.00,
    "capturedAmount": 0.00,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 0.00,
    "baseFulfilmentAmount": 0.00,
    "baseCapturedAmount": 0.00,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "timestamp": "2020-01-08T14:03:03.144Z",
    "transactionReferences": [
        {
            "transactionId": 10040895226,
            "transactionTypeId": 7,
            "mid": 1570616552,
            "orderId": "order_example",
            "transactionType": "OriginalCredit",
            "transactionDate": "2020-01-08T14:04:13.578Z",
            "transactionDesc": "Transaction accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "maskedAccountNumber": "411111xxxxx1111",
            "cardExpiryDate": "2024-12"
        }
    ]
}

Payout to a bank account

Payout is a special transaction type which allows a refund to a Consumer's bank account without referring to an earlier payment. The orderId must be unique for this transaction type.

POST /v2/merchants/{mid}/orders/{orderId}/originalcredits

Example request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
POST /v2/merchants/1570616552/orders/order_example/originalcredits HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172

{
  "amount": {
    "amount": 10.50,
    "currency": "EUR"
  },
   "bankBillingInfo": {
    "iban": "SE123456",
    "swiftBIC" : "ESSESESS"
  },
  "paymentMethodId": 3502
}

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
    "mid": 1570616552,
    "orderId": "order_example",
    "orderAmount": 0,
    "fulfilmentAmount": 0,
    "capturedAmount": 0,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 0,
    "baseFulfilmentAmount": 0,
    "baseCapturedAmount": 0,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "timestamp": "2020-01-13T08:09:29.487Z",
    "transactionReferences": [
        {
            "transactionId": 10194108019,
            "transactionTypeId": 65,
            "mid": 1570616552,
            "orderId": "order_example",
            "transactionType": "Payout",
            "transactionDate": "2020-01-13T08:09:29.487Z",
            "transactionDesc": "OK",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "SEPA",
            "paymentMethodId": 3502
        }
    ]
}