Payment Links

circle-exclamation

Payment Link allows you to create an order, generate a payment URL, and share it with your customers so they can complete the payment.

This feature is also available via our Public APIs, enabling you to dynamically create orders directly from your application and provide a smoother experience for your customers.

APIs

Get orders

GET https://public-api.alphax.asia/orders

Additional params:

  • page : the current page. Default: 1

  • limit : records per page. Minimum: 10 (default), maximum: 50

Responses:

{
    "orders": [
        {
            "id": "01jc0tpy0zjb0pvfh2jcej8yd6",
            "reference": "order reference",
            "description": "order description",
            "currency": "order currency",
            "paidNotificationUrl": "Your configured webhook URL",
            "dueNotificationUrl": "Your configured webhook URL",
            "paymentLink": "https://app.alphax.asia/order-payments/01jc0tpy0zjb0pvfh2jcej8yd6",
            "dueAt": "ISO Datetime String or null",
            "paidAt": "ISO Datetime String or null",
            "createdAt": "ISO Datetime String",
            "updatedAt": "ISO Datetime String",
            "lineItems": [
                {
                    "id": "01jdkh9d4hbsjyh4b9keke9e6q",
                    "name": "line item name",
                    "description": "line item description"
                    "quantity": 1,
                    "unitPrice": "15.99"
                }
            ]
        }
    ],
    "page": 1,
    "limit": 10
}

Get order by ID

Response:

Create new order

Available fields (in JSON):

  • reference: Order reference, can be a short code, identifier from your application. Must have at least 3 characters. Mandatory.

  • currency: The currency for this order. Mandatory.

    • Allowed currencies: USD, EUR, GBP, SGD, HKD

  • description: Short description.

  • paidNotificationUrl: the URL that AlphaX will call once the order has been paid by your customer.

  • dueNotificationUrl: the URL that AlphaX will call once the order has been due.

  • dueAt: Order due at. Format must be YYYY-MM-DD HH:mm:SS

  • lineItems : array of object for the line items

    • lineItems.*.name: name of the line item - mandatory

    • lineItems.*.quantity: quantity - mandatory

    • lineItems.*.unitPrice: unit price - mandatory

    • lineItems.*.description: line item description.

Example request:

Response:

Update order by ID

Available fields (in JSON):

  • reference: Order reference, can be a short code, identifier from your application. Must have at least 3 characters. Mandatory.

  • currency: The currency for this order. Mandatory.

    • Allowed currencies: USD, EUR, GBP, SGD, HKD

  • description: Short description.

  • paidNotificationUrl: the URL that AlphaX will call once the order has been paid by your customer.

  • dueNotificationUrl: the URL that AlphaX will call once the order has been due.

  • dueAt: Order due at. Format must be YYYY-MM-DD HH:mm:SS

  • lineItems : array of object for the line items

    • lineItems.*.name: name of the line item - mandatory

    • lineItems.*.quantity: quantity - mandatory

    • lineItems.*.unitPrice: unit price - mandatory

    • lineItems.*.description: line item description.

Only specify the fields that you want to update. E.g.: if you only want to update the due date, just send dueAt field only.

Example Request & Response should be as same as the Create new order API.

Note: We can only update the unpaid/unarchived orders. You will receive 403 status code when you violate that.

Archive order by ID

Note: we can only archive the unpaid/unarchived orders. You will receive 403 status code when you violate that.

Last updated