This is an API reference for the PayByLink service. The PayByLink API enables you to programmatically generate secure payment links for your customers with comprehensive configuration options for payment methods, customer data collection, and post-payment behaviours.
PayByLink API (1.0.0)
https://api-services.pxp.io/api/v1/
https://api-services.test.pxp.io/api/v1/
A unique identifier for this transaction.
Details about the payment amount and currency.
Array of product information for display on the payment page.
The product description.
Details about the link behaviour.
The type of link to create.
A human-readable link name. This is solely for display purposes in the Unity Portal, for easier identification.
Details about the customer.
The transaction intent. Learn more.
Details about the AVS.
- Production environment
https://api-services.pxp.io/api/v1/paybylink
- Sandbox environment
https://api-services.test.pxp.io/api/v1/paybylink
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-services.pxp.io/api/v1/paybylink \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-H 'X-Client-Id: b14d0efd-b57f-470a-932d-c5d8517ff021' \
-H 'X-Request-Id: 550e8400-e29b-41d4-a716-446655440000' \
-d '{
"merchantTransactionId": "ORDER-2025-001",
"amounts": {
"transaction": 29.99,
"currencyCode": "USD"
},
"products": [
{
"name": "Premium Widget",
"description": "High-quality widget with advanced features",
"productImageUrl": "https://example.com/product-image.jpg"
}
],
"linkConfiguration": {
"type": "SingleUse",
"name": "Invoice Payment Link",
"expiresInHours": 72
},
"shopper": {
"countryCode": "US",
"merchantShopperId": "CUST_001",
"shopperInputPreferences": {
"email": false,
"phoneNumber": false,
"firstName": false,
"lastName": false,
"address": false,
"dateOfBirth": false,
"customerNumber": false,
"productSpecifications": false
}
},
"site": "site-1",
"merchant": "merchant-1",
"intent": "Purchase",
"avs": {
"type": "SkipAvs",
"addressVerification": {
"countryCode": "US",
"houseNumberOrName": "123 Main Street",
"postalCode": "12345"
}
},
"allowedFundingTypes": {
"cards": [
"Visa",
"Mastercard"
],
"wallets": [
"PayPal"
]
},
"afterPaymentConfiguration": {
"afterPaymentConfigurationType": "Redirect",
"redirectUrl": "https://yourstore.com/payment-success",
"customMessage": "Thank you for your purchase!"
}
}'Payment link created successfully
The unique payment link identifier generated by PXP. Use this for tracking and management operations.
The complete payment link URL that you can share with customers. This is the link customers will use to make their payment.
The current status of the payment link.
The date and time when the link expires, in UTC. After this time, the link will no longer accept payments.
The site identifier used in the request, confirming the merchant configuration.
Your transaction identifier from the request, used for reconciliation and tracking.
{ "linkId": "06da69e0-b668-40b2-ba2f-6c505f08866c", "url": "https://paybylink.dev.pxp.io/06da69e0-b668-40b2-ba2f-6c505f08866c", "status": "Active", "expirationTimestamp": "2025-09-11T04:12:15.3044876Z", "site": "site-1", "amounts": { "transaction": 180, "currencyCode": "USD" }, "merchantTransactionId": "bbb958c6-37bc-47e3-8dd3-6122d4e361d5", "merchantShopperId": "CUST_001", "afterPaymentConfiguration": { "afterPaymentConfigurationType": "Redirect", "redirectUrl": "https://localhost:5325/api/v1/paybylink", "customMessage": "custom message" } }