Skip to content

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.

FieldTypePresence
partnerReferenceNostringOptional
bankCodestringMandatory
sourceAccountNostringMandatory
sourceAccountNamestringMandatory
maxAmount*snap.MoneyOptional
billerIdstringMandatory
billerNamestringMandatory
customerIdstringMandatory
expiredDatetimestringMandatory
additionalInfojson.RawMessageOptional

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.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
referenceNostringOptional
partnerReferenceNostringOptional
eMandateReffIdstringMandatory
additionalInfojson.RawMessageOptional

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.

FieldTypePresence
partnerReferenceNostringMandatory
currencystringOptional
customerReferencestringMandatory
feeTypestringOptional
remarkstringOptional
beneficiaryAccountNostringMandatory
beneficiaryAccountNamestringMandatory
transactionDatestringMandatory
bankCodestringMandatory
sourceAccountNostringMandatory
sourceAccountNamestringMandatory
amount*snap.MoneyOptional
eMandateReffIdstringMandatory
additionalInfojson.RawMessageOptional

Response — DirectDebitBIFASTPaymentResponse

DirectDebitBIFASTPaymentResponse is the response body for Trigger Direct Debit Transfer / Payment. referenceNo is Conditional — present only on success.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
referenceNostringOptional
partnerReferenceNostringOptional
additionalInfojson.RawMessageOptional

Direct Debit BI-FAST Notification

Inbound only — this package does not call an endpoint for this. A partner/switcher POSTs it to your callback URL; unmarshal the body into 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.

The status field here is transactionStatus, not latestTransactionStatus like everywhere else in the package — that’s the standard’s own naming, kept as-is rather than normalized.
FieldTypePresence
originalReferenceNostringMandatory
originalPartnerReferenceNostringOptional
originalExternalIdstringOptional
transactionStatusstringMandatory
transactionStatusDescstringOptional
eMandateReffIdstringMandatory
sourceAccountNostringMandatory
sourceAccountNamestringMandatory
amount*snap.MoneyOptional
traceNostringOptional
additionalInfojson.RawMessageOptional

Your handler replies with — DirectDebitBIFASTNotificationResponse

DirectDebitBIFASTNotificationResponse is envelope-only — just responseCode and responseMessage, no other fields.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory