Links API DocsLinks API Docs

Create a New Payment

POST/api/payments

This endpoint allows for the creation of a new payment by providing the necessary details such as the amount, currency, and merchant information.

Body application/json

merchantIdentifierstringrequired

The unique identifier for the merchant creating the payment.

currencyCodestringrequired

The three-letter currency code (ISO 4217) representing the transaction currency.

amountnumber<double>required

The amount of the payment to be processed.

customerIdentifierstring

A unique identifier for the customer making the payment (optional).

customerReferencestring

A reference provided by the merchant to identify the customer (optional).

merchantOrderIdstringrequired

A unique identifier for the merchant's order.

Response

A successful response containing the created payment details.

resultobject

The result of the payment creation request.

Show result properties
resultType"Accepted" | "Declined" | "NotFound" | "ValidationFailed" | "Forbidden" | "Error"

The type of result indicating the status of the request.

merchantMessagestring

A message intended for the merchant, providing additional details about the result of the request.

logIdentifierstring

A unique identifier for the server log entry related to this request, useful for troubleshooting.

logAsErrorboolean

Indicates whether this log entry should be treated as an error.

paymentIdentifierstring

The unique identifier for the created payment.

merchantIdentifierstring

The unique identifier for the merchant who created the payment.

currencyCodestring

The three-letter currency code (ISO 4217) for the payment.

customerIdentifierstring

The unique identifier for the customer associated with the payment (optional).

customerReferencestring

A reference provided by the merchant to identify the customer.

merchantOrderIdstring

The unique identifier for the merchant's order.

tokenstring

A client token for payment authorization.

allowedCardBrands"Unknown" | "MasterCard" | "Visa" | "Amex" | "Discover" | "JCB"[]

A list of allowed credit card brands for the payment.

allowedCurrenciesstring[]

A list of allowed currencies for the payment.

showCardHolderNameFieldboolean

Indicates whether to display the cardholder name field.

showCvvFieldboolean

Indicates whether to display the CVV field.

showZipCodeFieldboolean

Indicates whether to display the ZIP code field.

serverYearinteger<int32>

The current server year.

serverMonthinteger<int32>

The current server month.

showBillingAddressFieldboolean

Indicates whether to display the billing address field.

customerPaymentMethodsobject[]

A list of the customer's saved payment methods.

Show customerPaymentMethods properties
type"Unknown" | "CreditCard" | "BankAccount"

The type of payment method (e.g., credit card, bank account).

identifierstring

A unique identifier for the payment method.

creditCardLast4Digitsstring

The last four digits of the associated credit card (if applicable).

creditCardBrand"Unknown" | "MasterCard" | "Visa" | "Amex" | "Discover" | "JCB"

The list of supported credit card brands.

The request is invalid or contains incorrect parameters.

resultobject

The result object that contains the outcome and additional details of the API request.

Show result properties
resultType"Accepted" | "Declined" | "NotFound" | "ValidationFailed" | "Forbidden" | "Error"

The type of result indicating the status of the request.

merchantMessagestring

A message intended for the merchant, providing additional details about the result of the request.

logIdentifierstring

A unique identifier for the server log entry related to this request, useful for troubleshooting.

logAsErrorboolean

Indicates whether this log entry should be treated as an error.

Unauthorized request. Authentication is required.

Access is forbidden due to insufficient permissions.

Request
curl -X POST "https://testapi.linksmerchantservices.com/api/payments" \
  -H "Content-Type: application/json" \
  -d '{
  "merchantIdentifier": "string",
  "currencyCode": "string",
  "amount": 0,
  "customerIdentifier": "string",
  "customerReference": "string",
  "merchantOrderId": "string"
}'
Response
{
  "result": {
    "resultType": "Accepted",
    "merchantMessage": "string",
    "logIdentifier": "string",
    "logAsError": true
  },
  "paymentIdentifier": "string",
  "merchantIdentifier": "string",
  "currencyCode": "string",
  "customerIdentifier": "string",
  "customerReference": "string",
  "merchantOrderId": "string",
  "token": "string",
  "allowedCardBrands": [
    "Unknown"
  ],
  "allowedCurrencies": [
    "string"
  ],
  "showCardHolderNameField": true,
  "showCvvField": true,
  "showZipCodeField": true,
  "serverYear": 0,
  "serverMonth": 0,
  "showBillingAddressField": true,
  "customerPaymentMethods": [
    {
      "type": "Unknown",
      "identifier": "string",
      "creditCardLast4Digits": "string",
      "creditCardBrand": "Unknown"
    }
  ]
}