Open Payment Link


Required Header

Key Value
Accept application/json
Content-Type application/json
Authorization Bearer {API-KEY}

Create Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
POST /open-payment-links

Data Body

KEY TYPE RULE
currency string required
minimum_amount string required
title string required
description string optional
redirect_url string optional
reference string optional
reference_2 string optional

Update Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
PUT /open-payment-links/{open_payment_link_id}

Data Body

KEY TYPE RULE
currency string required
minimum_amount string required
title string required
description string optional
redirect_url string optional
reference string optional
reference_2 string optional
send_email boolean optional

Get Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
GET /open-payment-links/{open_payment_link_id}

Index Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
GET /open-payment-links

Delete Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
DELETE /open-payment-links/{open_payment_link_id}

Total Collection Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
GET /open-payment-links/{open_payment_link_id}/total-collection

Parameter

KEY VALUE TYPE RULE
filter[created_at_between] 2024-04-01,2024-05-15 string optional
filter[limit] 10 intger optional


Top Collection Open Payment Link

Here you may add extra information about the section.

Endpoint

Method URI
GET /open-payment-links/{open_payment_link_id}/top-collection

Example

Here you may add extra information about the section.

{
    "currency": "MYR",
    "minimum_amount": "100.00",
    "title": "Create Open Payment Link",
    "description": "Create Open payment link",
    "redirect_url": "https://www.paymenttest.com/payment/redirect",
    "reference": "reference 1",
    "reference_2": "reference 2"
}

{success} Success Response

Code 200

Response

{
    "success": true,
    "data": {
        "_id": "66423cc810e98a32690ab0bd",
        "business_id": 1,
        "currency": "MYR",
        "minimum_amount": 100.0,
        "title": "Create Open Payment Link",
        "description": "Create Open payment link",
        "redirect_url": "https://www.paymenttest.com/payment/redirect",
        "reference": "reference 1",
        "reference_2": "reference 2",
        "status_id": 1,
        "updated_at": "2024-05-12T16:16:08.423000Z",
        "created_at": "2024-05-12T16:16:08.423000Z",
        "status": true,
        "payment_url": "https://localhost:8080/payment/open-link/pay?id=66423cc810e98a32690ab0bd",
    },
    "errors": null,
    "meta": {
        "timestamp": "2024-05-12 16:07:00 UTC",
        "timezone": "UTC"
    }
}

{danger} Error Response

Code 422

Response



{
    "message" : "The given data was invalid.",
    "errors"  : {
        "currency"          : ["The currency field is required."],
        "minimum_amount"    : ["The minimum amount field is required."],
        "title"             : ["The title field is required."]
    }
}