Payee



Endpoint


Method Description URI
GET Get a List Direct Payee /api/v2/collections/{collectionId}/directPays
POST Create a direct payee /api/v2/collections/{collectionId}/directPays
PATCH Update a direct payee /api/v2/collections/{collectionId}/directPays/{ID}
DELETE Delete a direct payee /api/v2/collections/{collectionId}/directPays/{ID}


Required Headers


Key Value
Accept application/json
Content-Type application/json
Authorization Bearer {ACCESS-TOKEN}


Get a list of Direct Pays Payee

Parameters


Method URI
GET /api/v2/collections/{collectionId}/directPays

Response


{
    "success": true,
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 31,
                "collection_id": 51,
                "title": "satay",
                "description": "payment for satay",
                "amount": 10.0,
                "account_id": null,
                "ref1": null,
                "ref2": null,
                "api_redirect": 0,
                "created_at": "2019-11-26 04:04:37",
                "updated_at": "2019-11-26 04:04:37",
                "quantity": null,
                "currency": "MYR",
                "reference": null,
                "direct_pay_no": "wPCUK6Bn",
                "direct_pay_url": "http://localhost:8080donation/direct-pay?code=wPCUK6Bn",
                "total_direct_pay": "55.00",
                "collection": {
                    "id": 51,
                    "code": "NoADJKD1",
                    "name": "abc",
                    "organization_id": 1,
                    "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "created_at": "2019-08-07 05:47:53",
                    "updated_at": "2020-06-04 05:32:52"
                }
            },
            {
                "id": 40,
                "collection_id": 51,
                "title": "po",
                "description": "poi",
                "amount": 99.0,
                "account_id": null,
                "ref1": null,
                "ref2": null,
                "api_redirect": 0,
                "created_at": "2019-12-16 06:46:44",
                "updated_at": "2019-12-16 06:46:44",
                "quantity": null,
                "currency": "MYR",
                "reference": null,
                "direct_pay_no": "NyQkKi2U",
                "direct_pay_url": "http://localhost:8080donation/direct-pay?code=NyQkKi2U",
                "total_direct_pay": "55.00",
                "collection": {
                    "id": 51,
                    "code": "NoADJKD1",
                    "name": "abc",
                    "organization_id": 1,
                    "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "created_at": "2019-08-07 05:47:53",
                    "updated_at": "2020-06-04 05:32:52"
                }
            },
            {
                "id": 65,
                "collection_id": 51,
                "title": "test",
                "description": "Terima Kasih atas sumbangan anda, sumbangan anda akan di salurkan kedalam akaun Bank Islam Masjid Batang Tiga Melaka bernombor akaun 8603342207",
                "amount": 5.0,
                "account_id": null,
                "ref1": null,
                "ref2": null,
                "api_redirect": 0,
                "created_at": "2020-02-12 03:22:37",
                "updated_at": "2020-02-12 03:22:37",
                "quantity": null,
                "currency": "MYR",
                "reference": null,
                "direct_pay_no": "lwq1yIXo",
                "direct_pay_url": "http://localhost:8080donation/direct-pay?code=lwq1yIXo",
                "total_direct_pay": "55.00",
                "collection": {
                    "id": 51,
                    "code": "NoADJKD1",
                    "name": "abc",
                    "organization_id": 1,
                    "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
                    "created_at": "2019-08-07 05:47:53",
                    "updated_at": "2020-06-04 05:32:52"
                }
            }
        ],
        "first_page_url": "http://raudhahpay_api.test/api/v2/collections/NoADJKD1/directPays?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://raudhahpay_api.test/api/v2/collections/NoADJKD1/directPays?page=1",
        "next_page_url": null,
        "path": "http://raudhahpay_api.test/api/v2/collections/NoADJKD1/directPays",
        "per_page": 15,
        "prev_page_url": null,
        "to": 3,
        "total": 3
    },
    "errors": null,
    "meta": {
        "timestamp": "2020-06-26 09:15:29 UTC",
        "timezone": "UTC"
    }
}

{danger} For Error Reference, Related guide: Errors


Create direct pays payee


Parameters


Method URI
POST /api/v2/collections/{collectionId}/directPays

Body:


Key Type Required
title string Yes
description string Yes
ref1 string No
ref2 string No
amount numeric Yes minimum 5.00

{success} Success code : 200

Response


{
    "success": true,
    "data": {
        "id": 158,
        "collection_id": 51,
        "title": "title",
        "description": "description",
        "amount": 5.0,
        "account_id": null,
        "ref1": "ref1",
        "ref2": "ref2",
        "api_redirect": 1,
        "created_at": "2020-06-26 09:35:48",
        "updated_at": "2020-06-26 09:35:48",
        "quantity": null,
        "currency": "MYR",
        "reference": null,
        "direct_pay_no": "n6SsUmml",
        "direct_pay_url": "http://localhost:8080donation/direct-pay?code=n6SsUmml",
        "total_direct_pay": "55.00",
        "collection": {
            "id": 51,
            "code": "NoADJKD1",
            "name": "abc",
            "organization_id": 1,
            "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "created_at": "2019-08-07 05:47:53",
            "updated_at": "2020-06-04 05:32:52"
        }
    },
    "errors": null,
    "meta": {
        "timestamp": "2020-06-26 09:35:48 UTC",
        "timezone": "UTC"
    }
}

{danger} For Error Reference, Related guide: Errors


Update direct pays payee


Parameters


Method URI
PATCH /api/v2/collections/{collectionId}/directPays/{ID}

Body:


Key Type Required
title string no
description string no
ref1 string No
ref2 string No
amount numeric no if yes minimum 5.00

{success} Success code : 200

Response


{
    "success": true,
    "data": {
        "id": 158,
        "collection_id": 51,
        "title": "title",
        "description": "description update",
        "amount": 10.0,
        "account_id": null,
        "ref1": "ref1",
        "ref2": "ref2",
        "api_redirect": 1,
        "created_at": "2020-06-26 09:35:48",
        "updated_at": "2020-06-26 09:55:17",
        "quantity": null,
        "currency": "MYR",
        "reference": null,
        "direct_pay_no": "n6SsUmml",
        "direct_pay_url": "http://localhost:8080donation/direct-pay?code=n6SsUmml",
        "total_direct_pay": "55.00",
        "collection": {
            "id": 51,
            "code": "NoADJKD1",
            "name": "abc",
            "organization_id": 1,
            "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "created_at": "2019-08-07 05:47:53",
            "updated_at": "2020-06-04 05:32:52"
        }
    },
    "errors": null,
    "meta": {
        "timestamp": "2020-06-26 09:55:17 UTC",
        "timezone": "UTC"
    }
}

{danger} For Error Reference, Related guide: Errors


Delete direct pays payee


Parameters


Method URI
Delete /api/v2/collections/{collectionId}/directPays/{ID}

{success} Success code : 200

Response


{
    "success": true,
    "data": [],
    "errors": null,
    "meta": {
        "timestamp": "2020-06-26 09:58:54 UTC",
        "timezone": "UTC"
    }
}

{danger} For Error Reference, Related guide: Errors


Show Direct Pays Payee by Code


Parameters


Method URI
GET /api/v2/collections/{collectionId}/directPays/{ID}

{success} Success code : 200

Response


{
    "success": true,
    "data": {
        "id": 31,
        "collection_id": 51,
        "title": "satay",
        "description": "payment for satay",
        "amount": 10.0,
        "account_id": null,
        "ref1": null,
        "ref2": null,
        "api_redirect": 0,
        "created_at": "2019-11-26 04:04:37",
        "updated_at": "2019-11-26 04:04:37",
        "quantity": null,
        "currency": "MYR",
        "reference": null,
        "direct_pay_no": "wPCUK6Bn",
        "direct_pay_url": "http://localhost:8080donation/direct-pay?code=wPCUK6Bn",
        "total_direct_pay": "55.00",
        "collection": {
            "id": 51,
            "code": "NoADJKD1",
            "name": "abc",
            "organization_id": 1,
            "webhook_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "redirect_url": "https://www.jombmf.com/wc-api/WC_Raudhahpay_Gateway",
            "created_at": "2019-08-07 05:47:53",
            "updated_at": "2020-06-04 05:32:52"
        }
    },
    "errors": null,
    "meta": {
        "timestamp": "2020-06-26 10:00:57 UTC",
        "timezone": "UTC"
    }
}

{danger} For Error Reference, Related guide: Errors