flutter_bkash 패키지는 버뮤다의 선도적인 모바일 결제 게이트웨이인 bKash를 Flutter 애플리케이션에 원활하게 통합할 수 있도록 해주는 플러터 플러그인입니다. 거래 시작, 콜백 처리, 결제 상태 관리 등을 위한 간단한 API를 제공하여 bKash 결제 구현을 단순화합니다. 방글라데시 시장에 초점을 맞춘 개발자를 위해 설계되었으며, Android, iOS 및 macOS 플랫폼을 지원합니다. 전자상거래 앱, 디지털 서비스 및 지역 결제 솔루션이 필요한 모든 애플리케이션에 적합합니다.
사용 사례
방글라데시의 전자상거래 앱
디지털 서비스 결제
모바일 지갑 통합
온라인 청구서 결제
앱 내 구매
주요 기능
간편한 bKash 거래 시작
Android, iOS 및 macOS 지원
결제 상태에 대한 콜백 처리
안전한 결제 처리
pub add 명령을 사용한 간단한 설정
적합한 대상
방글라데시를 대상으로 하는 플러터 개발자
현지 결제 수단이 필요한 앱
bKash를 결제 옵션으로 사용하는 기업
BD에서 금융 서비스를 구축하는 스타트업
고려 사항
bKash 상인 계정이 필요합니다
올바른 API 키 구성이 필요합니다
방글라데시 지역에 한정
bKash 백엔드 사용 가능 여부에 따라 다릅니다
추가적인 서버 측 검증이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
bKash(BD) Mobile Finance Payment Gateway Flutter Package
This is a Flutter package for bKash BD Payment Gateway. This package can be used in flutter project. We created this package while working for a project and thought to release for all so that it helps.
:warning: Please note that, you have to contact with bKash sales team for any kind of dev or production access keys or tokens. We don't provide any test account or access keys or don't contact us for such
To refund a completed payment (full or partial), use the refund method. paymentId and trxId come from the pay/payWithAgreement response you're refunding. sku and reason are documented by bKash as optional, but the API rejects the request without them — pass both:
Request
final result = await flutterBkash.refund(
paymentId: "TR0011fd4uZMS1687062024354",
trxId: "AFI60BAC94",
refundAmount: 50.0, // amount as double
sku: "order-1234",
reason: "customer requested refund",
);
The methods mentioned above may throw a BkashFailure exception in case of an error. You can catch and handle the exception using a try-catch block:
try {
// Make a payment or create an agreement
} onBkashFailurecatch (e) {
// Handle the errorprint(e.message);
}
e.message carries bKash's actual error text when the API returns one (e.g. a specific refund rejection reason), falling back to a generic message (e.g. "Bad Request") only when the response has no parseable error body.
Examples for see the /example folder. The demo app also saves every payment/agreement/refund locally (History screen) so you can copy an ID or chain follow-up calls (e.g. pay with a saved agreement, refund a saved payment), and ships a Sandbox Info page with bKash's test wallet numbers, OTP and PIN.