Links API DocsLinks API Docs

Authorize a Payment

POST/api/payments/{identifier}/authorize

This endpoint authorizes a payment by providing the necessary payment method details, customer information, and whether the payment should be auto-captured.

Path Parameters

identifierstringrequired

Body application/json

paymentMethodIdentifierstring

The unique identifier for the payment method.

paymentMethodType"Unknown" | "CreditCard" | "BankAccount"required

The type of payment method being used for authorization.

cardobject

The card details for authorization, if applicable.

Show card properties
cardNumberstringrequired

The credit card number used for the authorization.

cardExpiryMonthinteger<int32>required

The month when the card expires.

cardExpiryYearinteger<int32>required

The year when the card expires.

cardHolderNamestringrequired

The name of the cardholder as it appears on the card.

cardCvvstring

The CVV number for the card (optional).

billingInformationobject

Billing information associated with the payment method.

Show billingInformation properties
firstLinestring

The first line of the billing address (optional).

secondLinestring

The second line of the billing address (optional).

citystring

The city of the billing address (optional).

regionstring

The region or state of the billing address (optional).

zipCodestring

The postal or ZIP code of the billing address (optional).

countryAlpha3Codestringrequired

The three-letter country code (ISO Alpha-3) for the billing address.

paymentobject

Payment-specific details, such as amount and currency.

Show payment properties
paymentType"Unknown" | "Regular" | "Recurring" | "Installment" | "Unscheduled"

The type of payment being authorized.

paymentMode"Unknown" | "Initial" | "Repeated"

The mode of the payment (initial or repeated).

paymentSource"Unknown" | "CIT" | "MIT"

The source of the payment (CIT or MIT).

previousTransactionIdstring

The ID of the previous transaction, if applicable.

customerobject

Customer details, such as customer identifier and reference.

Show customer properties
customerIdstring

The unique identifier for the customer (optional).

customerPhoneCountryCodestring

The country code of the customer's phone number (optional).

customerPhoneNumberstring

The phone number of the customer (optional).

customerMobileCountryCodestring

The country code of the customer's mobile number (optional).

customerMobileNumberstring

The mobile number of the customer (optional).

customerEmailstring

The email address of the customer (optional).

customerIpAddressstring

The IP address of the customer (optional).

merchantNamestring

The name of the merchant making the request (optional).

deviceobject

Device-related information for authorization, if applicable.

Show device properties
browserDeviceIdstring

The ID of the browser device used in the transaction (optional).

mobileDeviceIdstring

The ID of the mobile device used in the transaction (optional).

autoCapturebooleanrequired

Indicates whether the payment should be auto-captured.

Response

A successful response containing the authorization details of the payment.

resultobject

The result of the authorization 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.

merchantIdentifierstring

The unique identifier for the merchant associated with the payment.

amountnumber<double>

The authorized payment amount.

currencyCodestring

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

paymentStatus"New" | "Authorized" | "Captured" | "Voided" | "Processing"

The current status of the payment after authorization.

paymentMethodType"Unknown" | "CreditCard" | "BankAccount"

The type of payment method used for authorization.

acquirerstring

The name of the acquirer processing the payment.

customerIdentifierstring

The unique identifier for the customer associated with the payment.

customerReferencestring

A reference provided by the merchant to identify the customer.

merchantOrderIdstring

The unique identifier for the merchant's order.

paymentIdentifierstring

The unique identifier for the authorized payment.

paymentMethodIdentifierstring

The unique identifier for the payment method used.

returnUrlstring

The URL to which the customer is redirected after authorization.

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.

The specified payment was not found.

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.

Request
curl -X POST "https://testapi.linksmerchantservices.com/api/payments/<identifier>/authorize" \
  -H "Content-Type: application/json" \
  -d '{
  "paymentMethodIdentifier": "string",
  "paymentMethodType": "Unknown",
  "card": {
    "cardNumber": "string",
    "cardExpiryMonth": 0,
    "cardExpiryYear": 0,
    "cardHolderName": "string",
    "cardCvv": "string"
  },
  "billingInformation": {
    "firstLine": "string",
    "secondLine": "string",
    "city": "string",
    "region": "string",
    "zipCode": "string",
    "countryAlpha3Code": "string"
  },
  "payment": {
    "paymentType": "Unknown",
    "paymentMode": "Unknown",
    "paymentSource": "Unknown",
    "previousTransactionId": "string"
  },
  "customer": {
    "customerId": "string",
    "customerPhoneCountryCode": "string",
    "customerPhoneNumber": "string",
    "customerMobileCountryCode": "string",
    "customerMobileNumber": "string",
    "customerEmail": "string",
    "customerIpAddress": "string",
    "merchantName": "string"
  },
  "device": {
    "browserDeviceId": "string",
    "mobileDeviceId": "string"
  },
  "autoCapture": true
}'
Response
{
  "result": {
    "resultType": "Accepted",
    "merchantMessage": "string",
    "logIdentifier": "string",
    "logAsError": true
  },
  "merchantIdentifier": "string",
  "amount": 0,
  "currencyCode": "string",
  "paymentStatus": "New",
  "paymentMethodType": "Unknown",
  "acquirer": "string",
  "customerIdentifier": "string",
  "customerReference": "string",
  "merchantOrderId": "string",
  "paymentIdentifier": "string",
  "paymentMethodIdentifier": "string",
  "returnUrl": "string"
}