Collection

Collection is a group of your payments.



Endpoint


Method Desciption URI
POST Create Collection /api/collections
GET Get Collections /api/collections
GET Get Collection By Code /api/collections/{CODE)
PATCH Update Collection /api/collections/{ID}



Required Headers


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


Create Collection

Parameters


Method URI
POST /api/collections

Body:


Key Type Required
Name string Yes

Include Parameter:


Key Type
organization /api/collections?include=organization

Example :

{
    'name' : 'Collection Name'
}

Response


{success} Success code : 200

{
    "name": "Collection Name",
    "code": "HcGmbt3f",
    "organization_id": 1,
    "webhook_url": "https://raudhahpay.com/raudhahpay_gateway",
    "redirect_url": "https://raudhahpay.com/raudhahpay_gateway",
    "updated_at": "2020-06-23 13:03:15",
    "created_at": "2020-06-23 13:03:15",
    "id": 1
}

{info} For Error Reference, Related guide: Errors



Get Collections

Parameters


Method URI
GET /api/collections

Response


{success} Success code : 200

{
    "current_page": 1,
    "data": [
        {
            "name": "Collection Name",
            "code": "HcGmbt3f",
            "organization_id": 1,
            "webhook_url": "{SERVER_URI}/raudhahpay_gateway",
            "redirect_url": "{SERVER_URI}/raudhahpay_gateway",
            "updated_at": "2020-06-23 13:03:15",
            "created_at": "2020-06-23 13:03:15",
            "id": 1
        }
    ],
    "first_page_url": "{SERVER_URI}/api/collections?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "{SERVER_URI}/api/collections?page=1",
    "next_page_url": null,
    "path": "{SERVER_URI}/api/collections",
    "per_page": 1,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}

{info} For Error Reference, Related guide: Errors



Get Collection

Parameters


Method URI
GET /api/collections/{CODE)

Response


{success} Success code : 200

{
    "name": "Collection Name",
    "code": "HcGmbt3f",
    "organization_id": 1,
    "webhook_url": "https://raudhahpay.com/webhook_url",
    "redirect_url": "https://raudhahpay.com/redirect_url",
    "updated_at": "2020-06-23 13:03:15",
    "created_at": "2020-06-23 13:03:15",
    "id": 1
}

{info} For Error Reference, Related guide: Errors



Update Collection

Parameters


Method URI
PATCH /api/collection/{ID)

Response


{success} Success code : 200

{
    "name": "Collection Name",
    "code": "HcGmbt3f",
    "organization_id": 1,
    "webhook_url": "https://raudhahpay.com/webhook_url",
    "redirect_url": "https://raudhahpay.com/redirect_url",
    "updated_at": "2020-06-23 13:03:15",
    "created_at": "2020-06-23 13:03:15",
    "id": 1
}

{info} For Error Reference, Related guide: Errors