SNAP Virtual Account
**Please note that this SNAP documentation is still in beta version.


Header for transaction request
Field | M/O/C | Type | Description |
---|---|---|---|
Content-Type | Mandatory | String | String represents indicate the media type of the resource (e.g. application/json, application/pdf) |
X-TIMESTAMP | Mandatory | String | Client's current local time in yyyy-MM-ddTHH:mm:ssTZD format |
X-SIGNATURE | Mandatory | String | Represents signature of a request. Signature Type used: Asymetric-Signature : SHA256withRSA (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +”:“+ EndpointUrl +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + TimeStamp |
ORIGIN | Optional | String | Origin Domain www.yourdomain.com |
X-PARTNER-ID | Mandatory | String (36) | Unique ID for a partner. merchant_id mapped here |
X-EXTERNAL- ID | Mandatory | String (36) | Numeric String. Reference number that should be unique in the same day |
CHANNEL-ID | Mandatory | String (36) | PJP’s channel id Device identification on which the API services is currently being accessed by the end user (customer) |
Field | Attribute | Type | Description |
---|---|---|---|
Content-Type | Mandatory | String | application/json |
X-TIMESTAMP | Mandatory | String | Client's current local time in yyyy-MM-ddTHH:mm:ssTZD format |
Header Request Sample
Header Response Sample
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 88001
Content-type: application/json
X-TIMESTAMP: 2020-12-21T10:30:34+07:00
post
/{version}/transfer-va
/create-va
Create Virtual Account (VA)
Parameter | Data Type | M/O/C | Description |
---|---|---|---|
responseCode | String (7) | Mandatory | Response Code |
responseMessage | String (150) | Mandatory | Response Description |
virtualAccountData | Object | Mandatory | |
partnerServiceId | String (8) | Mandatory | Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
customerNo | String (20) | Mandatory | Unique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountNo | String (28) | Mandatory | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountName | String (128) | Mandatory | Customer name |
virtualAccountEmail | String (128) | Optional | Customer email |
virtualAccountPhone | String (30) | Optional | Customer's phone number. Format: 62xxxxxxxxxxxxx |
trxId | String (32) | Mandatory | from Create VA Request |
totalAmount | Object | Optional | |
value | String (ISO4217) (16,2) | Mandatory | Transaction Amount. Total Amount with 2 decimal. |
currency | String (3) | Mandatory | Currency. Currency of amount based on ISO 4217. |
expiredDate | String (25) | Mandatory | Expiration date for Virtual Account. ISO-8601 |
additionalInfo | Object | Optional | Additional Information for custom use |
billDate | Datetime (25) | Mandatory | Transaction/ Order Date |
channelCode | Numeric (32) | Mandatory | Payment Channel Code VA ONLY |
billDescription | String (18) | Mandatory | Bill description |
redirectUrl | String | Optional | Merchant call back URL |
Create VA - Sample Request
Create VA-Sample Response
{
"virtualAccountName":"Jokul Doe",
"virtualAccountEmail":"[email protected]",
"virtualAccountPhone":"6281828384858",
"trxId":"abcdefgh1234",
"totalAmount":{
"value":"12345678.00",
"currency":"IDR"
},
"expiredDate":"2020-12-31T23:59:59-07:00",
"additionalInfo":{
"billDate":"2020-12-31T23:59:59-07:00",
"channelCode":"6011",
"billDescription":"Maintenance"
}
}
{
"responseCode":"2002500",
"responseMessage":"Success",
"virtualAccountData":{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":"08889912345678901234567890",
"virtualAccountName":"Jokul Doe",
"virtualAccountEmail":"[email protected]",
"virtualAccountPhone":"6281828384858",
"trxId":"abcdefgh1234",
"totalAmount":{
"value":"12345678.00",
"currency":"IDR"
},
"expiredDate":"20201231T235959Z",
"additionalInfo":{
"billDate":"2020-12-31T23:59:59-07:00",
"channelCode":"6011",
"billDescription":"Maintenance",
"redirectUrl":"https://dev.faspay.co.id/pws/100003/0830000010100000/5807a17ccd950904ec0a303725fa8a4b36c89e2f?trx_id=9876530200004184&merchant_id=98765&bill_no=98765123456789"
}
}
post
/{version}/transfer-va
/inquiry
Inquiry
Parameter | Data Type | M/O/C | Description |
---|---|---|---|
responseCode | String (7) | Mandatory | Response Code |
responseMessage | String (150) | Mandatory | Response Description |
virtualAccountData | Object | Mandatory | |
partnerServiceId | String (8) | Mandatory | Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
customerNo | String (20) | Mandatory | Unique number. (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountNo | String (28) | Mandatory | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountName | String (50) | Mandatory | Customer name |
virtualAccountEmail | String (255) | Mandatory | Customer email |
virtualAccountPhone | String (30) | Mandatory | Customer's phone number. Format: 62xxxxxxxxxxxxx |
inquiryRequestId | String (128) | Mandatory | From Inquiry Request |
totalAmount | Object | Mandatory | |
value | String (ISO4217) (16,2) | Mandatory | Transaction Amount. Total Amount with 2 decimal |
currency | String (3) | Mandatory | Currency |
subCompany | String (5) | Optional | Sub Company code generated by Partner |
Inquiry-Sample Request
Inquiry-Sample Response
{
"partnerServiceId":" 88899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"inquiryRequestId":"abcdef-123456-abcdef"
}
{
"responseCode":"2002400",
"responseMessage":"Success",
"virtualAccountData":{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"virtualAccountName":"Johnny Suh",
"virtualAccountEmail":"[email protected]",
"virtualAccountPhone":"6281828384858",
"inquiryRequestId":"abcdef-123456-abcdef",
"totalAmount":{
"value":"12345678.00",
"currency":"IDR"
},
"subCompany":"12345",
}
}
}
post
/{version}/transfer-va
/payment
Payment
Parameter | Data Type | M/O/C | Description |
---|---|---|---|
responseCode | String (7) | Mandatory | Response Code |
responseMessage | String (150) | Mandatory | Response Description |
virtualAccountData | Object | Mandatory | |
partnerServiceId | String (8) | Mandatory | Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
customerNo | String (20) | Mandatory | Unique number. (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountNo | String (28) | Mandatory | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountName | String (255) | Mandatory | Customer name |
trxId | String (32) | Mandatory | From Payment Request |
paymentRequestId | String (128) | Mandatory | From Payment Request |
paidAmount | Object | Mandatory | |
value | String (ISO4217) (16,2) | Mandatory | Transaction Amount. From Payment Request |
currency | String (3) | Mandatory | Currency |
Payment-Sample Request
Payment-Sample Response
{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"trxId":"abcdefgh1234",
"paymentRequestId":"abcdef-123456-abcdef",
"paidAmount":{
"value":"12345678.00",
"currency":"IDR"
},
"trxDateTime":"20201231T235959Z"
"referenceNo":"123456789012345"
}
{
"responseCode":"2002500",
"responseMessage":"Success",
"virtualAccountData":{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"virtualAccountName":"Johnny Suh",
"trxId":"abcdefgh1234",
"paymentRequestId":"abcdef-123456-abcdef",
"paidAmount":{
"value":"12345678.00",
"currency":"IDR"
}
}
}
get
/{version}/transfer-va
/status
Inquiry Status
Parameter | Data Type | M/O/C | Description |
---|---|---|---|
responseCode | String (7) | Mandatory | Response Code |
responseMessage | String (150) | Mandatory | Response Description |
virtualAccountData | Object | Mandatory | |
paymentFlagReason | Object | Mandatory | Reason for Payment Status multi language |
english | String (32) | Mandatory | Reason for Payment Status in English |
partnerServiceId | String (8) | Mandatory | Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
customerNo | String (20) | Mandatory | Unique number (up to 20 digits) |
virtualAccountNo | String (28) | Mandatory | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits) |
inquiryRequestId | String (128) | Conditional | Unique identifier from Inquiry |
paymentRequestId | String (16) | Conditional | Unique identifier for this Payment from Faspay. Mandatory if Payment happened. |
paidAmount | Object | Mandatory | |
value | String (ISO4217) (16,2) | Mandatory | Paid Amount with 2 decimal |
currency | String (3) | Mandatory | Currency. Currency of amount based on ISO 4217 |
transactionDate | Date (25) | Conditional | Mandatory when the payment happened |
paymentFlagStatus | String (2) | Mandatory | Status for Payment Flag |
additionalInfo | Object | Mandatory | |
channelCode | String (32) | Mandatory | Payment Channel Code VA ONLY |
Inquiry Status-Request Sample
Inquiry Status-Response Sample
{
"partnerServiceId":"088899",
"customerNo":12345678901234567890,
"virtualAccountNo":"08889912345678901234567890",
"inquiryRequestId":"abcdef-123456-abcdef",
"additionalInfo":{
"channelCode":"6011",
"trxId":"9876540000001115"
}
}
{
"responseCode":"2002600",
"responseMessage":"Success",
"virtualAccountData":{
"paymentFlagReason":{
"english":"Success",
},
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"inquiryRequestId":"abcdef-123456-abcdef",
"paymentRequestId":"abcdef-123456-abcdef",
"paidAmount":{
"value":"12345678.00",
"currency":"IDR"
},
"transactionDate":"20201231T235959Z",
"paymentFlagStatus":"00",
"additionalInfo":{
"channelCode":"6011"
}
}
}
delete
/{version}/transfer-va
/delete-va
Delete Virtual Account
Parameter | Data Type | M/O/C | Description |
---|---|---|---|
responseCode | String (7) | Mandatory | Response Code |
responseMessage | String (150) | Mandatory | Response Description |
virtualAccountData | Object | Mandatory | |
partnerServiceId | String (8) | Mandatory | Derivative of X-PARTNER-ID, similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
customerNo | String (20) | Mandatory | Unique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountNo | String (28) | Mandatory | partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
additionalInfo | Object (unlimited) | Optional | From Inquiry Response |
billNo | String (32) | Mandatory | Bill number from partner |
trxStatusCode | String (5) | Mandatory | Transaction Status |
trxStatusDesc | String (32) | Mandatory | Transaction Status Description |
Delete VA-Request Sample
Delete VA-Response Sample
{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"additionalInfo":{
"reason":"Barang Habis"
}
}
{
"responseCode":"2003100",
"responseMessage":"Success",
"virtualAccountData":{
"partnerServiceId":" 088899",
"customerNo":"12345678901234567890",
"virtualAccountNo":" 08889912345678901234567890",
"additionalInfo":{
"billNo":"98765123456789",
"trxStatusCode":"3",
"trxStatusDesc":"Order Canceled"
}
}
}
Payment notification from Faspay to merchant backend will also be triggered an event of transaction status getting updated, to ensure merchant is securely informed. Please provide the URL and make sure it's already registered on Faspay system.
Component | Data Type | Length | Description |
---|---|---|---|
responseCode | String | 7 | response code = HTTP status code + service code + case code |
responseMessage | String | 150 | |
Category | HTTP Code | Service Code | Case Code | Response Message | Description |
---|---|---|---|---|---|
Success | 200 | any | 0 | Successful | Successful |
Success | 202 | any | 0 | Request In Progress | Transaction still on process |
System | 400 | any | 0 | Bad Request | General request failed error, including message parsing failed. |
Message | 400 | any | 1 | Invalid Field Format {field name} | Invalid format |
Message | 400 | any | 2 | Invalid Mandatory Field {field name} | Missing or invalid format on mandatory field |
System | 401 | any | 0 | Unauthorized. [reason] | General unauthorized error (No Interface Def, API is Invalid, Oauth Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown Client, Key not Found) |
System | 401 | any | 1 | Invalid Token (B2B) | Token found in request is invalid (Access Token Not Exist, Access Token Expiry) |
System | 401 | any | 2 | Invalid Customer Token | Token found in request is invalid (Access Token Not Exist, Access Token Expiry) |
System | 401 | any | 3 | Token Not Found (B2B) | Token not found in the system. This occurs on any API that requires token as input parameter |
System | 401 | any | 4 | Customer Token Not Found | Token not found in the system. This occurs on any API that requires token as input parameter |
Business | 403 | any | 0 | Transaction Expired | Transaction expired |
System | 403 | any | 1 |