Documentation

SaltPay, all rights reserved. 2022 ©

Authentication

Authentication is performed using BasicAuthentication with the provided key as username.

    > curl --user <ACCESS_TOKEN>: <SERVICE_URL>

Example Payment requests

PreAuthorization with card

Request:

[POST] api/payment

{
    "TransactionType": "PreAuthorization",
    "Amount": 100,
    "Currency": "352",
    "TransactionDate": "2015-10-10T11:00:00",
    "OrderId": "INTEGR421602",
    "PaymentMethod": {
        "PaymentType": "Card",
        "PAN": "{{TestCardPAN}}",
        "ExpYear": "{{TestCardExpYear}}",
        "ExpMonth": "{{TestCardExpMonth}}"
    },
    "Metadata": {"Payload": "TESTING" }
}

Response:

{
  "TransactionId": "tr_-B1no9KwnhnqB2wul9yUXHLdKNYE3snj",
  "TransactionType": "PreAuthorization",
  "Amount": 100,
  "Currency": "352",
  "TransactionDate": "2015-10-10T11:00:00",
  "OrderId": "INTEGR421602",
  "AuthCode": "731007",
  "ActionCode": "000",
  "TransactionStatus": "Uncaptured",
  "PaymentMethod": {
    "PaymentType": "Card",
    "PAN": "558740******2011",
    "ExpYear": "2018",
    "ExpMonth": "09",
    "CardType": "MasterCard"
  },
  "Metadata": {
    "Payload": "TESTING"
  }
}

Sale with Single use token

Request: [POST] api/payment

{
    "TransactionType": "Sale",
    "Amount": 100,
    "Currency": "352",
    "TransactionDate": "2015-10-10T11:00:00",
    "OrderId": "INTEGR630564",
    "PaymentMethod": {
        "PaymentType": "TokenSingle",
        "Token": "ts_n1yQuIg1hAiB89NW0MMvZaNKbpOi810r"
    },
    "Metadata": {"Payload": "TESTING" }
}

Response:

{
  "TransactionId": "tr_Md1RlGuITsq3hpCa25zZkWuOp70NhvGs",
  "TransactionType": "Sale",
  "Amount": 100,
  "Currency": "352",
  "TransactionDate": "2015-10-10T11:00:00",
  "OrderId": "INTEGR630564",
  "AuthCode": "731847",
  "ActionCode": "000",
  "TransactionStatus": "Accepted",
  "PaymentMethod": {
    "PaymentType": "TokenSingle",
    "PAN": "558740******2011",
    "Token": "ts_n1yQuIg1hAiB89NW0MMvZaNKbpOi810r",
    "CardType": "MasterCard"
  },
  "Metadata": {
    "Payload": "TESTING"
  }
}

Capture PreAuthorization

Request:

[PUT] api/Payment/tr_-B1no9KwnhnqB2wul9yUXHLdKNYE3snj/Capture

Response:

{
  "TransactionId": "tr_-B1no9KwnhnqB2wul9yUXHLdKNYE3snj",
  "ActionCode": "000"
}

Cancel PreAuthorization or Sale

*Request:

[PUT] api/Payment/tr_luVic4665CfPZE1SCbc9zWJG47MsTfVh/Cancel

Response:

{
  "TransactionId": "tr_luVic4665CfPZE1SCbc9zWJG47MsTfVh",
  "ActionCode": "000"
}

Refund Sale or captured PreAuthorization

Request:

[PUT] api/Payment/tr_JX5A3h6aUS5BNdrIzjrOdOMoSdojJfu1/Refund

Response:

{
    "TransactionId": "tr_GhoCRmtHfb8cic8m5TQh0BnB1Md7utcV",
    "ActionCode": "000",
    "RefundTransactionId": "tr_N7geproi6VnRC4QkMp_2KP4lBF4SFCT1",
    "RefundAmount": 100
}

Partially Refund Sale or captured PreAuthorization

Request:

[PUT] api/Payment/tr_JX5A3h6aUS5BNdrIzjrOdOMoSdojJfu1/Refund

{
    "PartialAmount": 50
}

Response:

{
    "TransactionId": "tr_GhoCRmtHfb8cic8m5TQh0BnB1Md7utcV",
    "ActionCode": "000",
    "RefundTransactionId": "tr_N7geproi6VnRC4QkMp_2KP4lBF4SFCT1",
    "RefundAmount": 50
}

Get payment info

Request:

[GET] api/Payment/{{TransactionId}}

Response:

{
  "TransactionId": "tr_vL3I8fgVtWESzx9l87JBShe3ibSjwKon",
  "TransactionType": "PreAuthorization",
  "Amount": 100,
  "Currency": "352",
  "TransactionDate": "2015-11-27T09:38:07",
  "OrderId": "TOKSeZJBOIRc",
  "AuthCode": "731907",
  "ActionCode": "000",
  "TransactionStatus": "Captured",
  "PaymentMethod": {
    "PaymentType": "Card",
    "PAN": "558740******2011",
    "ExpYear": "2018",
    "ExpMonth": "09",
    "CardType": "MasterCard"
  }
}

Get payment info with refunds

Request:

[GET] api/Payment/{{TransactionId}}

Response:

{
    "TransactionId": "tr_GhoCRmtHfb8cic8m5TQh0BnB1Md7utcV",
    "TransactionType": "Sale",
    "Amount": 100,
    "Currency": "352",
    "TransactionDate": "2018-05-30T17:19:21.687",
    "OrderId": "INTEGR395625",
    "AuthCode": "869006",
    "ActionCode": "000",
    "TransactionStatus": "RefundedPartial",
    "PaymentMethod": {
        "PaymentType": "Card",
        "PAN": "558740******2011",
        "ExpYear": "2018",
        "ExpMonth": "09",
        "CardType": "MasterCard"
    },
    "RefundTransactions": [
        {
            "TransactionId": "tr_N7geproi6VnRC4QkMp_2KP4lBF4SFCT1",
            "Amount": 50,
            "TransactionDate": "2018-05-30T17:19:21",
            "ActionCode": "000"
        },
        {
            "TransactionId": "tr_pFkyMgRNNf2Si07DfuIRn4ABF3i0vNV0",
            "Amount": 100,
            "TransactionDate": "2018-05-30T17:19:21",
            "ActionCode": "110"
        },
        {
            "TransactionId": "tr_Z4py7R2EPGIStQjmEGKZNzVi4Vtm2uxC",
            "Amount": 10,
            "TransactionDate": "2018-05-30T17:19:21",
            "ActionCode": "000"
        }
    ]
}

Single use tokens example requests

Create token without card verification

Request:

[POST] api/token/single

{
    "PAN": "{{TestCardPAN}}",
    "ExpYear": "{{TestCardExpYear}}",
    "ExpMonth": "{{TestCardExpMonth}}",
    "Expires": "120",
    "Metadata": {"Payload": "TESTING" }
}

Response:

{
  "Token": "ts_VI02EiXh6xF6qcVY-aBWm8Qh0mDcnVqx",
  "PAN": "558740******2011",
  "ExpYear": "2018",
  "ExpMonth": "09",
  "Enabled": true,
  "Used": false,
  "ValidUntil": "2015-11-27T09:14:38Z",
  "Metadata": {
    "Payload": "TESTING"
  }
}

Disable token

Request:

[PUT] api/token/single/{{TokenSingleId}}/disable

Response:

If successful: Status code 204

Get Token

Request:

[GET] api/token/single/{{TokenSingleId}}

Response:

{
  "Token": "ts_n1yQuIg1hAiB89NW0MMvZaNKbpOi810r",
  "PAN": "558740******2011",
  "ExpYear": "2018",
  "ExpMonth": "09",
  "Enabled": true,
  "Used": true,
  "TransactionId": "tr_Md1RlGuITsq3hpCa25zZkWuOp70NhvGs",
  "ValidUntil": "2015-11-27T08:57:05",
  "UsedTime": "2015-11-27T08:55:09.33",
  "Metadata": {
    "Payload": "TESTING"
  }
}

Multi use tokens example requests

Create multi token without card verification

Request:

[POST] api/token/multi

{
    "PAN": "{{TestCardPAN}}",
    "ExpYear": "{{TestCardExpYear}}",
    "ExpMonth": "{{TestCardExpMonth}}",
    "Metadata": {"Payload": "TESTING" }
}

Response:

{
  "Token": "tm_UxwgHZr7cKMvw9KtGHTq9rM8XE9b-xi7",
  "PAN": "558740******2011",
  "ExpYear": "2018",
  "ExpMonth": "09",
  "Enabled": true,
  "Metadata": {
    "Payload": "TESTING"
  }
}

Create multi token with card verification

[POST] api/token/multi

{
    "PAN": "{{TestCardPAN}}",
    "ExpYear": "{{TestCardExpYear}}",
    "ExpMonth": "{{TestCardExpMonth}}",
    "VerifyCard": {
        "CheckAmount": 100,
        "Currency": "352"
    },
    "Metadata": {"Payload": "TESTING" }
}

Response:

{
  "Token": "tm_Mbkx0bOSPFwL2MnS8daFH_Q9byBTBf1E",
  "PAN": "558740******2011",
  "ExpYear": "2018",
  "ExpMonth": "09",
  "Enabled": true,
  "VerifyCardResult": {
    "TransactionId": "tr_y3JeGJkiYIcgvIZsTxsKC4Vfjj1ymZc6",
    "ActionCode": "000"
  },
  "Metadata": {
    "Payload": "TESTING"
  }
}

Disable multi token

Request:

[PUT] api/token/multi/{{TokenMultiId}}/disable

Response:

If successful: Status code 204

Get multi Token

Request:

[GET] api/token/multi/{{TokenMultiId}}

Response:

{
  "Token": "tm_UxwgHZr7cKMvw9KtGHTq9rM8XE9b-xi7",
  "PAN": "558740******2011",
  "ExpYear": "2018",
  "ExpMonth": "09",
  "Enabled": true,
  "Metadata": {
    "Payload": "TESTING"
  }
}