Download the PHP package binderbyte/binderpay-php without Composer
On this page you can find all versions of the php package binderbyte/binderpay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binderbyte/binderpay-php
More information about binderbyte/binderpay-php
Files in binderbyte/binderpay-php
Package binderpay-php
Short Description Official BinderPay SNAP API SDK for PHP (Virtual Account & QRIS)
License MIT
Homepage https://binderpay.id
Informations about the package binderpay-php
binderbyte/binderpay-php
Official BinderPay SNAP API SDK for PHP — Virtual Account & QRIS.
Implements RSA-SHA256 (SNAP Bank Indonesia) signature automatically on every request and provides callback verification helpers.
Installation
Requires PHP >= 8.1.0, ext-json, ext-openssl, ext-curl (for HTTP).
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
partnerId |
string | — | Registered partner ID (required) |
privateKey |
string | — | RSA private key PEM (required) |
channelId |
string | — | Bank channel code, e.g. BCA (required) |
isProduction |
bool | false |
false = sandbox, true = production |
baseUrl |
string | — | Override base URL |
Default base URLs: Sandbox https://api-sandbox.binderpay.id, Production https://api.binderpay.id.
Virtual Account
VA types: C (one-off), O (open recurring), R (close recurring).
Channels: BRI, BNI, MANDIRI, MANDIRIPC, PERMATA, BSI, MUAMALAT, BCA, CIMB, SINARMAS, BNC, MAYBANK.
QRIS
Webhook / Callback Validation
Callbacks from BinderPay are sent with the X-TIMESTAMP, X-SIGNATURE, and X-PARTNER-ID headers. Verify the signature with the BinderPay public key (download from https://binderpay.id/docs/binderpay-public.pem, not your private key).
There are three separate path concepts:
- Merchant callback route: your application-owned route, for example
/api/binderpay/callback. - Signed callback path: the exact path BinderPay includes in the callback string-to-sign:
/v1.0/transfer-va/paymentfor VA or/v1.0/qr/qr-mpm-notifyfor QRIS. - Outbound API endpoint: an SDK request path such as
/v1.0/transfer-va/create-va.
parseCallback() inspects the payload and validates the required fields of the detected type — a VA callback (has trxId) or a QRIS callback (has originalReferenceNo). It throws ValidationException with the detected type in the message when a required field is missing, and rejects payloads that match neither type. Use Webhook::successResponse($callback['type']) to acknowledge — it returns 2002500 for va and 2005200 for qris.
For a standard VA or QRIS callback, use the same Webhook::verifyCallbackSignature(...) method. It automatically checks /v1.0/transfer-va/payment and /v1.0/qr/qr-mpm-notify, and accepts Laravel/Symfony header arrays. For non-standard integrations, use Webhook::verifyCallbackSignatureForPath(...) with an explicit path. You can also use Webhook::validatePublicKey($publicKey) to validate public key presence and RSA format upfront.
Important:
$rawBodymust be exactly as received by the server; do not decode and re-serialize it before verification.$binderpayPublicKeyis strictly validated; passing an empty/missing key or invalid PEM throws aValidationException.- The merchant route remains application-owned; the unified helper selects the BinderPay signed callback path automatically.
- Replay prevention and idempotent transaction handling remain the merchant application's responsibility.
- Return HTTP 200 with the appropriate BinderPay response code after successful processing.
Error Handling
Testing
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of binderpay-php with dependencies
ext-json Version *
ext-openssl Version *
ext-curl Version *