Payment Links

A Payment Link is an entry point for a user to pay a payment request. A merchant can create a payment and associate the payment request to a payment link.

Attributes

  • id

    string

    The unique identifier of the Payment Link.

  • status

    status

    The status of the Payment Link. Can be "created" or "archived".

  • name

    string

    The display name of the Payment Link.

  • merchantId

    string

    The Merchant the Payment Link is made on behalf of.

  • paymentRequestId

    boolean

    The Payment Request the Payment Link is associated with.

  • test

    boolean

    true if the Payment Link is for testing purposes only.

  • createdAt

    timestamp

    When the Payment Link was created.

  • updatedAt

    timestamp

    When the Payment Link was updated.

  • createdBy

    timestamp

    The identity that created the Payment Link.

  • updatedBy

    timestamp

    The identity that updated the Payment Link.


This endpoint allows you to retrieve a Payment Link.

Request
curl -X GET \
https://service.centrapay.com/api/payment-links/1234 \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "1234",
"status": "created",
"name": "Front Checkout",
"merchantId": "b040b262ddb80ea8",
"paymentRequestId": "12d22ece51eb033",
"createdBy": "crn:1234abc:api-key:MyAPIKey",
"createdAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn:1234abc:api-key:MyAPIKey",
"updatedAt": "2022-08-25T00:02:49.488Z"
}

This endpoint allows you to retrieve the summary of a Payment Link.

Request
curl -X GET \
https://service.centrapay.com/api/payment-links/1234/summary \
-H 'content-type: application/json'
Response
{
"id": "1234",
"merchantId": "b040b262ddb80ea8",
"paymentRequestId": "12d22ece51eb0338"
}

This endpoint allows you to retrieve all Payment Links for a merchant.

Request
curl -X GET \
https://service.centrapay.com/merchants/1234/payment-links \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"id": "pl_WRhAxxWpTKb5U7pXyxQjjY",
"status": "created",
"name": "Front Checkout",
"merchantId": "b040b262ddb80ea8",
"paymentRequestId": "12d22ece51eb0338",
"test": true,
"createdAt": "2021-08-25T00:02:49.488Z",
"createdBy": "crn:1234abc:api-key:MyAPIKey",
"updatedAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn:1234abc:api-key:MyAPIKey"
}
],
"nextPageKey": "eyJjcmVhdGVkQXQiOiIyMDIxLTA4LTI1VDAwOjAyOjQ5LjQ4OFoifQ=="
}

This endpoint allows you to archive a Payment Link.

Request
curl -X POST \
https://service.centrapay.com/api/payment-links/1234/archive \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "1234",
"name": "Front Checkout",
"merchantId": "b040b262ddb80ea8",
"status": "archived",
"createdBy": "crn:1234abc:api-key:MyAPIKey",
"createdAt": "2021-08-25T00:02:49.488Z",
"updatedBy": "crn:1234abc:api-key:MyAPIKey",
"updatedAt": "2022-08-25T00:02:49.488Z"
}