Skip to content

Virtual Account

Virtual Account

Full VA lifecycle: management (create/update/inquire/delete) and the transaction-side calls (inquiry, payment, status, intrabank variants, report).

resp, err := transfercredit.CreateVA(ctx, transport, hb, transfercredit.CreateVARequest{
	VirtualAccountName: "Jane Doe",
	TrxID: "...",
})
if err != nil {
	// errors.Is(err, snap.ErrBadRequest), snap.ErrUnauthorized, etc.
}

CreateVA

CreateVA calls the SNAP VA - Create VA endpoint (Service Code 27, path …/{version}/transfer-va/create-va). hb must already carry every field snap.HeaderBuilder needs except Body, which CreateVA sets itself so the exact marshaled bytes are used 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 — a fresh X-EXTERNAL-ID on retry risks creating a duplicate VA.

func CreateVA(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req CreateVARequest) (CreateVAResponse, error)

Request — CreateVARequest

CreateVARequest is the request body for API VA - Create VA (Service Code 27). VirtualAccountName and TrxID are mandatory per the Guides tab; unlike every other Virtual Account endpoint, the identity triple (PartnerServiceID, CustomerNo, VirtualAccountNo) is Optional here.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
virtualAccountNamestringMandatory
trxIdstringMandatory
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

Response — CreateVAResponse

CreateVAResponse is the response body for API VA - Create VA.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*CreateVADataOptional
CreateVAData fields

CreateVAData is the “virtualAccountData” object in CreateVAResponse.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
virtualAccountNamestringOptional
trxIdstringOptional
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

UpdateVA

UpdateVA calls the SNAP VA - Update VA endpoint (Service Code 28, path …/{version}/transfer-va/update-va, HTTP PUT). hb must already carry every field snap.HeaderBuilder needs except Method and Body, which UpdateVA sets itself: Method to PUT (the method is fixed by this endpoint, not caller-configurable) and Body so the exact marshaled bytes are used 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 UpdateVA(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req UpdateVARequest) (UpdateVAResponse, error)

Request — UpdateVARequest

UpdateVARequest is the request body for API VA - Update VA (Service Code 28). PartnerServiceID, CustomerNo, VirtualAccountNo, VirtualAccountName, and TrxID are mandatory per the Guides tab — unlike Create VA, the identity triple is Mandatory here.

FieldTypePresence
partnerServiceIdstringMandatory
customerNostringMandatory
virtualAccountNostringMandatory
virtualAccountNamestringMandatory
trxIdstringMandatory
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

Response — UpdateVAResponse

UpdateVAResponse is the response body for API VA - Update VA.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*UpdateVADataOptional
UpdateVAData fields

UpdateVAData is the “virtualAccountData” object in UpdateVAResponse — Create VA’s data fields plus LastUpdateDate and PaymentDate.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
virtualAccountNamestringOptional
trxIdstringOptional
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
lastUpdateDatestringOptional
paymentDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

UpdateStatusVA

UpdateStatusVA calls the SNAP VA - Update Status VA endpoint (Service Code 29, path …/{version}/transfer-va/update-status, HTTP PUT). hb must already carry every field snap.HeaderBuilder needs except Method and Body, which UpdateStatusVA sets itself: Method to PUT (the method is fixed by this endpoint, not caller-configurable) and Body so the exact marshaled bytes are used 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 UpdateStatusVA(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req UpdateStatusVARequest) (UpdateStatusVAResponse, error)

Request — UpdateStatusVARequest

UpdateStatusVARequest is the request body for API VA - Update Status VA (Service Code 29). PartnerServiceID, CustomerNo, VirtualAccountNo, TrxID, and PaidStatus are mandatory per the Guides tab. PaidStatus values are “Y”/“N” per the research doc.

FieldTypePresence
partnerServiceIdstringMandatory
customerNostringMandatory
virtualAccountNostringMandatory
trxIdstringMandatory
paidStatusstringMandatory
additionalInfojson.RawMessageOptional

Response — UpdateStatusVAResponse

UpdateStatusVAResponse is the response body for API VA - Update Status VA.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*UpdateStatusVADataOptional
UpdateStatusVAData fields

UpdateStatusVAData is the “virtualAccountData” object in UpdateStatusVAResponse — per the research doc, “the full VA data object”, the same field set as UpdateVAData, under its own type name.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
virtualAccountNamestringOptional
trxIdstringOptional
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
lastUpdateDatestringOptional
paymentDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

InquiryVA

InquiryVA calls the SNAP VA - Inquiry VA endpoint (Service Code 30, path …/{version}/transfer-va/inquiry-va). hb must already carry every field snap.HeaderBuilder needs except Body, which InquiryVA sets itself so the exact marshaled bytes are used for both signing and the wire body.

func InquiryVA(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req InquiryVARequest) (InquiryVAResponse, error)

Request — InquiryVARequest

InquiryVARequest is the request body for API VA - Inquiry VA (Service Code 30). PartnerServiceID, CustomerNo, VirtualAccountNo, and TrxID are mandatory per the Guides tab.

FieldTypePresence
partnerServiceIdstringMandatory
customerNostringMandatory
virtualAccountNostringMandatory
trxIdstringMandatory
additionalInfojson.RawMessageOptional

Response — InquiryVAResponse

InquiryVAResponse is the response body for API VA - Inquiry VA.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*InquiryVADataOptional
InquiryVAData fields

InquiryVAData is the “virtualAccountData” object in InquiryVAResponse — per the research doc, “full VA data object (same shape as Update VA response)”, the same field set as UpdateVAData, under its own type name.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
virtualAccountNamestringOptional
trxIdstringOptional
totalAmount*snap.MoneyOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
expiredDatestringOptional
lastUpdateDatestringOptional
paymentDatestringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

DeleteVA

DeleteVA calls the SNAP VA - Delete VA endpoint (Service Code 31, path …/{version}/transfer-va/delete-va, HTTP DELETE). hb must already carry every field snap.HeaderBuilder needs except Method and Body, which DeleteVA sets itself: Method to DELETE (the method is fixed by this endpoint, not caller-configurable) and Body, since this DELETE ships a JSON request body rather than using path parameters — the exact marshaled bytes are used 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 DeleteVA(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req DeleteVARequest) (DeleteVAResponse, error)

Request — DeleteVARequest

DeleteVARequest is the request body for API VA - Delete VA (Service Code 31). PartnerServiceID, CustomerNo, and VirtualAccountNo are mandatory per the Guides tab; TrxID is Optional.

FieldTypePresence
partnerServiceIdstringMandatory
customerNostringMandatory
virtualAccountNostringMandatory
trxIdstringOptional
additionalInfojson.RawMessageOptional

Response — DeleteVAResponse

DeleteVAResponse is the response body for API VA - Delete VA.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*DeleteVADataOptional
DeleteVAData fields

DeleteVAData is the “virtualAccountData” object in DeleteVAResponse — a smaller shape than the other VA management endpoints’ data object, per the research doc.

FieldTypePresence
partnerServiceIdstringOptional
customerNostringOptional
virtualAccountNostringOptional
trxIdstringOptional
additionalInfojson.RawMessageOptional

VAInquiry

VAInquiry calls the SNAP VA - VA Inquiry endpoint (Service Code 24, path …/{version}/transfer-va/inquiry). hb must already carry every field snap.HeaderBuilder needs except Body, which VAInquiry sets itself so the exact marshaled bytes are used for both signing and the wire body.

func VAInquiry(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAInquiryRequest) (VAInquiryResponse, error)

Request — VAInquiryRequest

VAInquiryRequest is the request body for API VA - VA Inquiry (Service Code 24). partnerServiceId, customerNo, virtualAccountNo, and inquiryRequestId are Mandatory. customerNo is json.RawMessage because a sibling endpoint’s worked example shows it as a bare JSON number, not a quoted string — supply a complete JSON value (e.g. json.RawMessage(\“98765”`)orjson.RawMessage(`98765`)`), not a bare Go string.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
trxDateInitstringOptional
channelCodejson.RawMessageOptional
languagestringOptional
hashedSourceAccountNostringOptional
sourceBankCodestringOptional
passAppstringOptional
inquiryRequestIdstringMandatory
additionalInfojson.RawMessageOptional

Response — VAInquiryResponse

VAInquiryResponse is the response body for API VA - VA Inquiry.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*VAInquiryDataOptional
VAInquiryData fields

VAInquiryData is the “virtualAccountData” object in VAInquiryResponse. Fields beyond the identity triple carry no M/O letter in the Guides tab, so all are Optional (omitempty); InquiryReason, TotalAmount, and FeeAmount are pointers since omitempty has no effect on a non-pointer struct value.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
inquiryStatusstringOptional
inquiryReason*LocalizedTextOptional
virtualAccountNamestringOptional
virtualAccountEmailstringOptional
virtualAccountPhonestringOptional
inquiryRequestIdstringOptional
totalAmount*snap.MoneyOptional
subCompanystringOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
virtualAccountTrxTypestringOptional
feeAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional

VAPayment

VAPayment calls the SNAP VA - VA Payment endpoint (Service Code 25, path …/{version}/transfer-va/payment, HTTP POST — no method override). hb must already carry every field snap.HeaderBuilder needs except Body, which VAPayment sets itself so the exact marshaled bytes are used 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 VAPayment(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAPaymentRequest) (VAPaymentResponse, error)

Request — VAPaymentRequest

VAPaymentRequest is the request body for API VA - VA Payment (Service Code 25). partnerServiceId, customerNo, virtualAccountNo, paymentRequestId, and paidAmount are Mandatory. trxId is Conditional — required if the VA was created via CreateVA. customerNo, channelCode, and paymentType are json.RawMessage since the standard’s worked examples show them as bare numbers rather than quoted strings.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
trxIdstringOptional
paymentRequestIdstringMandatory
channelCodejson.RawMessageOptional
hashedSourceAccountNostringOptional
sourceBankCodestringOptional
paidAmountsnap.MoneyMandatory
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
totalAmount*snap.MoneyOptional
trxDateTimestringOptional
referenceNostringOptional
journalNumstringOptional
paymentTypejson.RawMessageOptional
flagAdvisestringOptional
subCompanystringOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

Response — VAPaymentResponse

VAPaymentResponse is the response body for API VA - VA Payment.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*VAPaymentDataOptional
VAPaymentData fields

VAPaymentData is the virtualAccountData object in VAPaymentResponse — it mirrors the request’s fields plus paymentFlagReason and paymentFlagStatus.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
trxIdstringOptional
paymentRequestIdstringOptional
channelCodejson.RawMessageOptional
hashedSourceAccountNostringOptional
sourceBankCodestringOptional
paidAmount*snap.MoneyOptional
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
totalAmount*snap.MoneyOptional
trxDateTimestringOptional
referenceNostringOptional
journalNumstringOptional
paymentTypejson.RawMessageOptional
flagAdvisestringOptional
subCompanystringOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
paymentFlagReason*LocalizedTextOptional
paymentFlagStatusstringOptional
additionalInfojson.RawMessageOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

VAInquiryStatus

VAInquiryStatus calls the SNAP VA - VA Inquiry Status endpoint (Service Code 26, path …/{version}/transfer-va/status). hb must already carry every field snap.HeaderBuilder needs except Body, which VAInquiryStatus sets itself so the exact marshaled bytes are used for both signing and the wire body.

func VAInquiryStatus(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAInquiryStatusRequest) (VAInquiryStatusResponse, error)

Request — VAInquiryStatusRequest

VAInquiryStatusRequest is the request body for API VA - VA Inquiry Status (Service Code 26). partnerServiceId, customerNo, and virtualAccountNo (the identity triple) are Mandatory; inquiryRequestId and paymentRequestId are Optional/Conditional. This package always decodes the response as a single object, per the standard’s own type declaration.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
inquiryRequestIdstringOptional
paymentRequestIdstringOptional
additionalInfojson.RawMessageOptional

Response — VAInquiryStatusResponse

VAInquiryStatusResponse is the response body for API VA - VA Inquiry Status.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountData*VAInquiryStatusDataOptional
VAInquiryStatusData fields

VAInquiryStatusData is the virtualAccountData object in VAInquiryStatusResponse — the same shape as VAPaymentData plus transactionDate, kept as its own type since it belongs to a different Service Code.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
trxIdstringOptional
paymentRequestIdstringOptional
channelCodejson.RawMessageOptional
hashedSourceAccountNostringOptional
sourceBankCodestringOptional
paidAmount*snap.MoneyOptional
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
totalAmount*snap.MoneyOptional
trxDateTimestringOptional
referenceNostringOptional
journalNumstringOptional
paymentTypejson.RawMessageOptional
flagAdvisestringOptional
subCompanystringOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
paymentFlagReason*LocalizedTextOptional
paymentFlagStatusstringOptional
additionalInfojson.RawMessageOptional
transactionDatestringOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

VAInquiryPaymentIntrabank

VAInquiryPaymentIntrabank calls the SNAP VA - Inquiry Payment Intrabank endpoint (Service Code 32, path …/{version}/transfer-va/inquiry-intrabank). hb must already carry every field snap.HeaderBuilder needs except Body, which VAInquiryPaymentIntrabank sets itself so the exact marshaled bytes are used for both signing and the wire body.

func VAInquiryPaymentIntrabank(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAInquiryPaymentIntrabankRequest) (VAInquiryPaymentIntrabankResponse, error)

Request — VAInquiryPaymentIntrabankRequest

VAInquiryPaymentIntrabankRequest is the request body for API VA - Inquiry Payment Intrabank (Service Code 32). partnerServiceId, customerNo, and virtualAccountNo (the identity triple) are Mandatory. customerNo is json.RawMessage since the standard’s worked example for this endpoint shows it as a bare JSON number.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
partnerReferenceNostringOptional
sourceAccountNostringOptional
sourceAccountTypestringOptional
additionalInfojson.RawMessageOptional

Response — VAInquiryPaymentIntrabankResponse

VAInquiryPaymentIntrabankResponse is the response body for API VA - Inquiry Payment Intrabank.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountdata*VAInquiryPaymentIntrabankDataOptional
VAInquiryPaymentIntrabankData fields

VAInquiryPaymentIntrabankData is the virtualAccountdata object (lowercase “d” — deliberately matching the standard’s own wire key, unlike most other VA endpoints which use virtualAccountData) in VAInquiryPaymentIntrabankResponse.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
partnerReferenceNostringOptional
sourceAccountNostringOptional
sourceAccountTypestringOptional
productNamestringOptional
billAmountLabelstringOptional
billAmountValuestringOptional
additionalInfojson.RawMessageOptional

VAPaymentIntrabank

VAPaymentIntrabank calls the SNAP VA - Payment Intrabank endpoint (Service Code 33, path …/{version}/transfer-va/payment-intrabank, HTTP POST — no method override). hb must already carry every field snap.HeaderBuilder needs except Body, which VAPaymentIntrabank sets itself so the exact marshaled bytes are used 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 VAPaymentIntrabank(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAPaymentIntrabankRequest) (VAPaymentIntrabankResponse, error)

Request — VAPaymentIntrabankRequest

VAPaymentIntrabankRequest is the request body for API VA - Payment Intrabank (Service Code 33). partnerServiceId, customerNo, virtualAccountNo, partnerReferenceNo, and paidAmount are Mandatory. customerNo and referenceNo are json.RawMessage since the standard’s worked examples show both as bare numbers, even though referenceNo appears quoted in the response. paymentStatus is a free-text status string, not the package’s usual 2-digit transactionStatus code.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
sourceAccountNostringOptional
sourceAccountTypestringOptional
inquiryRequestIdstringOptional
partnerReferenceNostringMandatory
paidAmountsnap.MoneyMandatory
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
paymentStatusstringOptional
referenceNojson.RawMessageOptional
additionalInfojson.RawMessageOptional

Response — VAPaymentIntrabankResponse

VAPaymentIntrabankResponse is the response body for API VA - Payment Intrabank.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountdata*VAPaymentIntrabankDataOptional
VAPaymentIntrabankData fields

VAPaymentIntrabankData is the virtualAccountdata object (lowercase “d”) in VAPaymentIntrabankResponse — it mirrors the request’s own fields.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
sourceAccountNostringOptional
sourceAccountTypestringOptional
inquiryRequestIdstringOptional
partnerReferenceNostringOptional
paidAmount*snap.MoneyOptional
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
paymentStatusstringOptional
referenceNojson.RawMessageOptional
additionalInfojson.RawMessageOptional

VANotifyPaymentIntrabank

VANotifyPaymentIntrabank calls the SNAP VA - Notify Payment Intrabank endpoint (Service Code 34, path …/{version}/transfer-va/notify-payment-intrabank, HTTP POST — no method override). hb must already carry every field snap.HeaderBuilder needs except Body, which VANotifyPaymentIntrabank sets itself so the exact marshaled bytes are used 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 VANotifyPaymentIntrabank(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VANotifyPaymentIntrabankRequest) (VANotifyPaymentIntrabankResponse, error)

Request — VANotifyPaymentIntrabankRequest

VANotifyPaymentIntrabankRequest is the request body for API VA - Notify Payment Intrabank (Service Code 34). Unlike the RTGS/SKNBI/Interbank-Bulk notifications, this one is outbound — your code calls it, the PJP receives it — so it’s a normal calling function, not an inbound-only struct. customerNo is json.RawMessage since the standard’s worked example shows it as a bare number.

FieldTypePresence
partnerServiceIdstringMandatory
customerNojson.RawMessageMandatory
virtualAccountNostringMandatory
inquiryRequestIdstringOptional
paymentRequestIdstringOptional
partnerReferenceNostringOptional
trxDateTimestringOptional
paymentStatusstringOptional
paymentFlagReason*LocalizedTextOptional
additionalInfojson.RawMessageOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

Response — VANotifyPaymentIntrabankResponse

VANotifyPaymentIntrabankResponse is the response body for API VA - Notify Payment Intrabank.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountdata*VANotifyPaymentIntrabankDataOptional
VANotifyPaymentIntrabankData fields

VANotifyPaymentIntrabankData is the virtualAccountdata object (lowercase “d”) in VANotifyPaymentIntrabankResponse — it mirrors most of the request’s fields, plus the envelope.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
inquiryRequestIdstringOptional
paymentRequestIdstringOptional
partnerReferenceNostringOptional
trxDateTimestringOptional
paymentStatusstringOptional
paymentFlagReason*LocalizedTextOptional
additionalInfojson.RawMessageOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional

VAGetReport

VAGetReport calls the SNAP VA - Get Report endpoint (Service Code 35, path …/{version}/transfer-va/report). hb must already carry every field snap.HeaderBuilder needs except Method and Body: VAGetReport sets Method to POST itself (the standard documents this endpoint inconsistently as both GET and POST-with-body; this package always uses POST) and Body, so the exact marshaled bytes are used for both signing and the wire body.

A report covering a wide date range can return an unbounded number of array entries; the shared transport layer caps every response body at 10 MiB (see transport.go), so callers pulling large reports should page by narrower date/time ranges rather than one unbounded call.

func VAGetReport(ctx context.Context, t *snap.Transport, hb snap.HeaderBuilder, req VAGetReportRequest) (VAGetReportResponse, error)

Request — VAGetReportRequest

VAGetReportRequest is the request body for API VA - Get Report (Service Code 35). partnerServiceId is the only Mandatory field; it’s json.RawMessage here because the standard documents it as a Number for this endpoint specifically, unlike every other VA endpoint where it’s a String.

FieldTypePresence
partnerServiceIdjson.RawMessageMandatory
startDatestringOptional
startTimestringOptional
endDatestringOptional
endTimestringOptional
additionalInfojson.RawMessageOptional

Response — VAGetReportResponse

VAGetReportResponse is the response body for API VA - Get Report — the only VA response in this package whose data field is an array rather than a single object.

FieldTypePresence
responseCodestringMandatory
responseMessagestringMandatory
virtualAccountdata[]GetReportDataOptional
GetReportData fields

GetReportData is one entry in VAGetReportResponse’s virtualAccountdata array (lowercase “d”) — the same shape as VAInquiryStatusData, kept as its own type since it belongs to a different Service Code.

FieldTypePresence
partnerServiceIdstringOptional
customerNojson.RawMessageOptional
virtualAccountNostringOptional
trxIdstringOptional
paymentRequestIdstringOptional
channelCodejson.RawMessageOptional
hashedSourceAccountNostringOptional
sourceBankCodestringOptional
paidAmount*snap.MoneyOptional
cumulativePaymentAmount*snap.MoneyOptional
paidBillsstringOptional
totalAmount*snap.MoneyOptional
trxDateTimestringOptional
referenceNostringOptional
journalNumstringOptional
paymentTypejson.RawMessageOptional
flagAdvisestringOptional
subCompanystringOptional
billDetails[]BillDetailOptional
freeTexts[]LocalizedTextOptional
paymentFlagReason*LocalizedTextOptional
paymentFlagStatusstringOptional
additionalInfojson.RawMessageOptional
transactionDatestringOptional
BillDetail fields

BillDetail is one entry in the billDetails[] array (max 24 entries) used across the Virtual Account group. billReferenceNo is json.RawMessage because the standard documents it as Numeric but some issuers send it as a bare JSON number — when you set it yourself (e.g. in CreateVARequest), supply a complete JSON value like json.RawMessage(\“BILLREF1”`)orjson.RawMessage(`123`)`, not a bare Go string.

FieldTypePresence
billCodestringOptional
billNostringOptional
billNamestringOptional
billShortNamestringOptional
billDescription*LocalizedTextOptional
billSubCompanystringOptional
billAmount*snap.MoneyOptional
additionalInfojson.RawMessageOptional
billAmountLabelstringOptional
billAmountValuestringOptional
billReferenceNojson.RawMessageOptional
statusstringOptional
reason*LocalizedTextOptional
LocalizedText fields

LocalizedText is the shared {english, indonesia} bilingual text shape used across the Virtual Account sub-group (e.g. inquiryReason, paymentFlagReason, billDescription, per-bill reason, freeTexts[] entries). Both fields are String, unmarked for M/O in the source, so both carry omitempty.

FieldTypePresence
englishstringOptional
indonesiastringOptional