| Key | Value |
|---|---|
| Accept | application/json |
| Content-Type | application/json |
| Authorization | Bearer {API-KEY} |
Here you may add extra information about the section.
| Method | URI |
|---|---|
| POST | /payment-links |
| KEY | TYPE | RULE |
|---|---|---|
string |
required |
|
| currency | string |
required |
| amount | string |
required |
| title | string |
required |
| phone_no | string |
optional |
| description | string |
optional |
| redirect_url | string |
optional |
| reference | string |
optional |
| reference_2 | string |
optional |
| send_email | boolean |
optional |
Here you may add extra information about the section.
| Method | URI |
|---|---|
| PUT | /payment-links/{payment_link_id} |
| KEY | TYPE | RULE |
|---|---|---|
string |
required |
|
| currency | string |
required |
| amount | string |
required |
| title | string |
required |
| phone_no | string |
optional |
| description | string |
optional |
| redirect_url | string |
optional |
| reference | string |
optional |
| reference_2 | string |
optional |
| send_email | boolean |
optional |
Here you may add extra information about the section.
| Method | URI |
|---|---|
| GET | /payment-links/{payment_link_id} |
Here you may add extra information about the section.
| Method | URI |
|---|---|
| GET | /payment-links |
Here you may add extra information about the section.
| Method | URI |
|---|---|
| DELETE | /payment-links/{payment_link_id} |
Here you may add extra information about the section.
{
"email": "email@example.com",
"phone_no": "60123456789",
"currency": "MYR",
"amount": "100.00",
"title": "Test Payment Link",
"description": "Testing 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": "61aefffdc0e0335ed54194d5",
"email": "email@example.com",
"phone_no": "60123456789",
"currency": "MYR",
"amount": 100.0,
"title": "Test Payment Link",
"description": "Testing payment link",
"redirect_url": "https://www.paymenttest.com/payment/redirect",
"reference": "reference 1",
"reference_2": "reference 2",
"updated_at": "2021-12-07T06:32:29.757000Z",
"created_at": "2021-12-07T06:32:29.757000Z",
"status": "Active",
"payment_url": "http://localhost:8080/payment/link/pay?id=61aefffdc0e0335ed54194d5",
"business_id": 1,
"paid": false
},
"errors": null,
"meta": {
"timestamp": "2021-12-12 06:00:00 UTC",
"timezone": "UTC"
}
}
{danger} Error Response
Code 422
Response
{
"message" : "The given data was invalid.",
"errors" : {
"currency" : ["The currency field is required."],
"email" : ["The email field is required."],
"amount" : ["The amount field is required."],
"title" : ["The title field is required."]
}
}