Payment Link Integration Guide
Payment Links allow you to securely accept E-commerce payments by generating a URL link via our API which can then be sent out in an email to your customers directly. This keeps your system out of PCI scope while giving you access to fraud prevention and diverse payment methods.
🚀 Getting Started
To initiate a payment link API call, your application must build the JSON request body with a proper Basic Auth header and submit an HTTP_POST request to one of the following endpoints:
- Live Environment:
https://api.e-xact.com/payment_links - Sandbox/Demo Environment:
https://api.demo.e-xact.com/payment_links
Essential Form Fields
At a minimum, your POST request must include the following fields. If any are missing or invalid, the customer will see an error.
Field | Description |
|---|---|
| The total amount to be charged on this payment link transaction in smallest currency unit. (5000 would result in a charge for $50.00) |
| The number of minutes the payment link should be active for before it is considered expired and no longer valid |
| The type of transaction this payment link should be processing. Options are:
|
Unlike our standard Transaction API (which formats amounts with a decimal, e.g.
15.99), the Payment Link API requires all transaction amounts to be passed as an integer representing the total value in cents.You must remove all decimals from your payload for this endpoint.
- $15.99 must be passed as
1599- $1,250.00 must be passed as
125000
Transaction and Display Fields
Customer Fields
Field Category | Included Fields |
|---|---|
Customer information |
|
Customer Address Fields
Field Category | Included Fields |
|---|---|
Customer address |
|
Customer Ship To Fields
Field Category | Included Fields |
|---|---|
Customer ship to information |
|
Customer Ship To Address Fields
Field Category | Included Fields |
|---|---|
Customer ship to address |
|
Reference Fields
Field Category | Included Fields |
|---|---|
Reference details |
|
Line Item Fields
Field Category | Included Fields |
|---|---|
Line item details
|
|
Split Customer Fields
Field Category | Included Fields |
|---|---|
Split customer details
|
|
Option Fields
Field Category | Included Fields |
|---|---|
Additional options |
|
Extra Fields
Field Category | Included Fields |
|---|---|
Extra details |
|
Sample Request
require 'uri'
require 'net/http'
require 'json'
url = URI("https://api.demo.e-xact.com/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
# basic auth username is the payment page ID. (eg. WSP-E-XBC-kLS1GQAB0g)
# basic auth password is the payment page's payment link API key. (eg. sk_...)
request["authorization"] = 'Basic V1NQLUUtWEFDLWtMUzZHUUFCMGc6c2tfRHhwMWdxOU1EM1V2ZkN0M1hRZlgyNEJKTFhOd0J1OXg='
params = {
amount: 5000,
minutes_until_expiry: 1320,
transaction_type: "AUTH_TOKEN"
}
request.body = params.to_json
response = http.request(request)
puts response.read_bodyUpdated 30 days ago
