Direct Debit BI-FAST
Direct Debit BI-FAST
BI-FAST e-mandate registration and payment, with its inbound notification type.
resp, err := transferdebit.DirectDebitBIFASTPayment(ctx, transport, hb, transferdebit.DirectDebitBIFASTPaymentRequest{
PartnerReferenceNo: "2020102900000000000001",
CustomerReference: "...",
BeneficiaryAccountNo: "1234567890",
BeneficiaryAccountName: "Jane Doe",
TransactionDate: "2026-09-14T10:00:00+07:00",
BankCode: "...",
SourceAccountNo: "1234567890",
SourceAccountName: "Jane Doe",
EMandateReffID: "2026-09-14T10:00:00+07:00",
})
if err != nil {
// errors.Is(err, snap.ErrBadRequest), snap.ErrUnauthorized, etc.
}DirectDebitBIFASTEMandateRegistration
DirectDebitBIFASTEMandateRegistration calls the SNAP Registrasi e-Mandate endpoint (Service Code 70, HTTP POST). Pass hb with everything except Body already set — DirectDebitBIFASTEMandateRegistration marshals the request itself and uses those exact bytes for both signing and the wire body.
This operation is not idempotent and this package does not retry. Callers that retry a failed or timed-out call should reuse the same X-EXTERNAL-ID, since the server’s own duplicate-detection keys on it.
func DirectDebitBIFASTEMandateRegistration(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req DirectDebitBIFASTEMandateRegistrationRequest) (DirectDebitBIFASTEMandateRegistrationResponse, error)Request — DirectDebitBIFASTEMandateRegistrationRequest
DirectDebitBIFASTEMandateRegistrationRequest is the request body for Registrasi e-Mandate. bankCode, sourceAccountNo, sourceAccountName, billerId, billerName, customerId, and expiredDatetime are Mandatory.
| Field | Type | Presence |
|---|---|---|
partnerReferenceNo | string | Optional |
bankCode | string | Mandatory |
sourceAccountNo | string | Mandatory |
sourceAccountName | string | Mandatory |
maxAmount | *snap.Money | Optional |
billerId | string | Mandatory |
billerName | string | Mandatory |
customerId | string | Mandatory |
expiredDatetime | string | Mandatory |
additionalInfo | json.RawMessage | Optional |
Response — DirectDebitBIFASTEMandateRegistrationResponse
DirectDebitBIFASTEMandateRegistrationResponse is the response body for Registrasi e-Mandate. referenceNo is Conditional — present only on success. eMandateReffId is Mandatory; use it in the payment call below.
| Field | Type | Presence |
|---|---|---|
responseCode | string | Mandatory |
responseMessage | string | Mandatory |
referenceNo | string | Optional |
partnerReferenceNo | string | Optional |
eMandateReffId | string | Mandatory |
additionalInfo | json.RawMessage | Optional |
DirectDebitBIFASTPayment
DirectDebitBIFASTPayment calls the SNAP Trigger Direct Debit Transfer / Payment endpoint (Service Code 71, HTTP POST). Pass hb with everything except Body already set — DirectDebitBIFASTPayment marshals the request itself.
This operation is not idempotent and this package does not retry. Callers that retry a failed or timed-out call should reuse the same X-EXTERNAL-ID, since the server’s own duplicate-detection keys on it.
func DirectDebitBIFASTPayment(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req DirectDebitBIFASTPaymentRequest) (DirectDebitBIFASTPaymentResponse, error)Request — DirectDebitBIFASTPaymentRequest
DirectDebitBIFASTPaymentRequest is the request body for Trigger Direct Debit Transfer / Payment. eMandateReffId comes from a prior e-Mandate Registration call.
| Field | Type | Presence |
|---|---|---|
partnerReferenceNo | string | Mandatory |
currency | string | Optional |
customerReference | string | Mandatory |
feeType | string | Optional |
remark | string | Optional |
beneficiaryAccountNo | string | Mandatory |
beneficiaryAccountName | string | Mandatory |
transactionDate | string | Mandatory |
bankCode | string | Mandatory |
sourceAccountNo | string | Mandatory |
sourceAccountName | string | Mandatory |
amount | *snap.Money | Optional |
eMandateReffId | string | Mandatory |
additionalInfo | json.RawMessage | Optional |
Response — DirectDebitBIFASTPaymentResponse
DirectDebitBIFASTPaymentResponse is the response body for Trigger Direct Debit Transfer / Payment. referenceNo is Conditional — present only on success.
| Field | Type | Presence |
|---|---|---|
responseCode | string | Mandatory |
responseMessage | string | Mandatory |
referenceNo | string | Optional |
partnerReferenceNo | string | Optional |
additionalInfo | json.RawMessage | Optional |
Direct Debit BI-FAST Notification
DirectDebitBIFASTNotificationRequest after verifying it with snap.ServerVerifier (see Verifying inbound requests), then reply with the shape below.Received — DirectDebitBIFASTNotificationRequest
DirectDebitBIFASTNotificationRequest is the request body for Notify (Service Code 72) — a settlement callback the PJP receives, not a call this package makes. Wire your own HTTP handler for this path, authenticate the inbound call with ServerVerifier.VerifyTransactionRequest, then json.Unmarshal the body into this type.
originalReferenceNo, transactionStatus, eMandateReffId, sourceAccountNo, and sourceAccountName are Mandatory; every other field is Optional.
transactionStatus, not latestTransactionStatus
like everywhere else in the package — that’s the standard’s own naming,
kept as-is rather than normalized.| Field | Type | Presence |
|---|---|---|
originalReferenceNo | string | Mandatory |
originalPartnerReferenceNo | string | Optional |
originalExternalId | string | Optional |
transactionStatus | string | Mandatory |
transactionStatusDesc | string | Optional |
eMandateReffId | string | Mandatory |
sourceAccountNo | string | Mandatory |
sourceAccountName | string | Mandatory |
amount | *snap.Money | Optional |
traceNo | string | Optional |
additionalInfo | json.RawMessage | Optional |
Your handler replies with — DirectDebitBIFASTNotificationResponse
DirectDebitBIFASTNotificationResponse is envelope-only — just responseCode and responseMessage, no other fields.
| Field | Type | Presence |
|---|---|---|
responseCode | string | Mandatory |
responseMessage | string | Mandatory |