Simple library for BillPlz Payment Software API
composer require h2akim/billplz:*
Parameters available for collection creation:
- title
- logo (optional) - (not tested)
- split_payment[email] (optional)
- split_payment[fixed_cut] (optional)
- split_payment[variable_cut] (optional)
- object (optional) - return as object (if true)
namespace H2akim\Billplz;
$billplz = new Billplz([
'api_key' => 'your-api-key'
]);
$billplz->collection()->create([
'title' => 'My Collection'
]);
Parameters available for open collection creation:
- title
- description
- amount
- fixed_amount (optional)
- fixed_quantity (optional)
- payment_button (optional)
- reference_1_label (optional)
- reference_2_label (optional)
- email_link (optional)
- tax (optional)
- photo (optional) - (not tested)
- split_payment[email] (optional)
- split_payment[fixed_cut] (optional)
- split_payment[variable_cut] (optional)
- object (optional) - return as object (if true)
namespace H2akim\Billplz;
$billplz = new Billplz([
'api_key' => 'your-api-key'
]);
$billplz->collection()->createOpen([
'title' => 'My Collection',
'description' => 'My Open Collection Description',
'amount' => 100 // RM1.00
]);
Parameters available for bill creation:
- collection_id
- mobile
- name
- amount
- callback_url
- description
- due_at (optional)
- redirect_url (optional)
- deliver (optional) - SMS if set to true (RM0.15)
- reference_1_label (optional)
- reference_1 (optional)
- reference_2_label (optional)
- reference_2 (optional)
- auto_submit (optional) - Skip BillPlz page. [ Value: fpx or paypal ]
- object (optional) - return as object (if true)
namespace H2akim\Billplz;
$billplz = new Billplz([
'api_key' => 'your-api-key'
]);
$billplz->bill()->create([
'collection_id' => 'your-collection-id',
'email' => 'your.client@email.com',
'mobile' => '60123456789',
'name' => 'Mak Jemah',
'due_at' => '1991-4-21',
'amount' => 5000, // RM50
'callback_url' => "http://my-website-with-comic-sans.com/return_url"
]);
Parameters available for bill retrieval:
- bill_id (required)
- object (optional) - return as object (if true)
- auto_submit (optional) - Skip BillPlz page. [ Value: fpx or paypal ]
namespace H2akim\Billplz;
$billplz = new Billplz([
'api_key' => 'your-api-key'
]);
$billplz->bill()->get([
'bill_id' => 'your-bill-id',
]);
Parameters available for bill deletion:
- bill_id (required)
namespace H2akim\Billplz;
$billplz = new Billplz([
'api_key' => 'your-api-key'
]);
$billplz->bill()->delete([
'bill_id' => 'your-bill-id',
]);