Skip to main content

Authorize Payment

LINKs API Authorize Payment endpoint can be used in a few different ways. It allows you to set the payment method, along with the needed data for the selected method. You can also define a auto-capture flag, allowing you to automatically capture the payment, skipping the need to make a call to the capture endpoint. This page presents you the different possibilities and parameters you can add to the authorization request.

Request Parameters

Field NameRequiredDescription
paymentMethodIdentifierNoA unique identifier for the payment method.
paymentMethodTypeYesSpecifies the type of payment method being used. Must be one of:
"Unknown"
"CreditCard"
"BankAccount"
autoCaptureYesA boolean flag indicating whether the payment should be captured automatically upon authorization.
cardNoContains card-related information necessary for processing credit card payments.
billingInformationNoHolds the billing details associated with the payment method.
paymentNoIncludes specific payment-related fields required for authorization.
customerNoStores information about the customer making the payment.
deviceNoContains details about the device used to initiate the payment.

Auto Capture a Payment

LINKs allows you to auto capture payments when authorizing them by setting the autoCapture flag to true in the request body. This enables immediate payment capture upon authorization, streamlining the payment process and eliminating the need for separate capture requests.

Here is an example of how to include the autoCapture flag in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": true
// ... other fields
}

Card

The card object contains the necessary credit card details required for authorizing a payment. This object should be included in the authorization request when the paymentMethodType is set to "CreditCard". Providing accurate and complete card information ensures a smooth and secure payment process.

Field NameRequiredDescription
cardNumberYesThe credit card number used for the authorization.
cardExpiryMonthYesThe month when the card expires.
cardExpiryYearYesThe year when the card expires.
cardHolderNameYesThe name of the cardholder as it appears on the card.
cardCvvNoThe CVV number for the card.

Here is an example of how to include the card object in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": false,
"card": {
"cardNumber": "4111111111111111",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025,
"cardHolderName": "John Doe",
"cardCvv": "123"
}
// ... other fields
}

Billing Information

The billingInformation object contains the billing address details associated with the payment method. This information is used to verify the billing address of the customer and can help reduce the risk of fraudulent transactions.

Field NameRequiredDescription
firstLineNoThe first line of the billing address. (Maximum 100 characters)
secondLineNoThe second line of the billing address. (Maximum 100 characters)
cityNoThe city of the billing address. (Maximum 100 characters)
regionNoThe region or state of the billing address. (Maximum 100 characters)
zipCodeNoThe postal or ZIP code of the billing address. (Maximum 20 characters)
countryAlpha3CodeYes

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

Here is an example of how to include the billingInformation object in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": true,
"billingInformation": {
"firstLine": "123 Main Street",
"secondLine": "Apt 4B",
"city": "New York",
"region": "NY",
"zipCode": "10001",
"countryAlpha3Code": "USA"
}
// ... other fields
}

Payment

The payment object contains payment-specific details required for authorizing a transaction, such as the type, mode, source, and references to previous transactions. This object should be included in the authorization request when you need to specify these payment details to tailor the payment process to specific needs.

Field NameRequiredDescription
paymentTypeNo

Specifies the type of payment being authorized. Must be one of the following values:

  • Unknown
  • Regular
  • Recurring
  • Installment
  • Unscheduled
paymentModeNo

Defines the mode of the payment. Must be one of the following values:

  • Unknown
  • Initial
  • Repeated
paymentSourceNo

Indicates the source of the payment. Must be one of the following values:

  • Unknown
  • CIT
  • MIT
previousTransactionIdNo

The ID of the previous transaction, if applicable. This is useful for linking related transactions or referencing past payments.

Here is an example of how to include the payment object in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": true,
"payment": {
"paymentType": "Recurring",
"paymentMode": "Initial",
"paymentSource": "CIT",
"previousTransactionId": "abc123xyz"
}
// ... other fields
}

Customer

The customer object contains detailed information about the customer making the payment. This can be used to identify the customer, enhancing security, and providing personalized experiences.

Field NameRequiredDescription
customerIdNoThe unique identifier for the customer.
customerPhoneCountryCodeNoThe country code of the customer's phone number.
customerPhoneNumberNoThe customer's phone number.
customerMobileCountryCodeNoThe country code of the customer's mobile number.
customerMobileNumberNoThe customer's mobile number.
customerEmailNoThe email address of the customer.
customerIpAddressNoThe IP address of the customer.
merchantNameNoThe name of the merchant making the request.

Here is an example of how to include the customer object in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": true,
"customer": {
"customerId": "cust_78910",
"customerPhoneCountryCode": "+1",
"customerPhoneNumber": "5551234567",
"customerMobileCountryCode": "+1",
"customerMobileNumber": "5557654321",
"customerEmail": "[email protected]",
"customerIpAddress": "192.168.1.100",
"merchantName": "Example Merchant"
}
// ... other fields
}

Certainly! Below is the Device section tailored to seamlessly integrate into your existing documentation. It includes a clear explanation of the device object, a detailed table of its fields, comprehensive field definitions, guidance on when to use it, and an example of how to include it in your authorization request.


Device

The device object contains information about the device used to initiate the payment. Including device-related data enhances security by verifying the origin of the transaction and aids in fraud detection.

Field NameRequiredDescription
browserDeviceIdNoThe ID of the browser device used in the transaction.
mobileDeviceIdNoThe ID of the mobile device used in the transaction.

Here is an example of how to include the device object in your authorization request:

{
"paymentMethodType": "CreditCard",
"autoCapture": true,
"device": {
"browserDeviceId": "browser-uuid-12345",
"mobileDeviceId": "mobile-uuid-67890"
}
// ... other fields
}