Skip to content

Modify payment links

TODO

Overview

Image description

The Links Modification API allows you to perform operations on existing payment links. Currently, the API supports cancellation. Prevent further payments when order is no longer valid.

Supported operations

OperationDescription
CancelImmediately deactivate an existing payment link to prevent further transactions.
POST
/v1/paybylink/{site}/{linkId}

Request example

Use the following request to immediately deactivate an active payment link.

curl --location 'https://api-services.pxpfinancial.com/api/v1/paybylink/site-1/906416c5-b4df-4c25-b3a9-fd2bb98c306f' \
--header 'Content-Type: application/json' \
--data '{
  "operation": "cancel"
}'

Path parameters

ParameterDescription
site
string (≤ 20 characters)
required
Your unique site identifier, as assigned by PXP.
linkId
string
required
The unique identifier of the payment link to modify.

Body parameters

ParameterDescription
operation
string
required
The operation to perform on the payment link. Set this to cancel.

Response example

If your request is successful, you'll receive a 200 response containing a Cancelled state.

{
  "state": "Cancelled",
  "stateData": null,
  "linkId": "8a283e55-f904-4751-81b9-3a2e7310aff0",
  "merchantTransactionId": "TXN-ORDER-26"
}
PropertyDescription
state
string
required
The current status of the payment link after the modification. If cancellation was successful, the state will be Cancelled.
stateData
object or null
Additional information about the link state.
linkId
string
required
The identifier of the modified payment link.
merchantTransactionId
string (≤ 50 characters)
required
The unique identifier for this transaction, as chosen by you.