Peso Net Web Service API V2
Peso Net Web Service API V2
Peso Net Web Service API V2
API Specifications
Rev 4.1 (November 19, 2018)
PESO Net Web Service API
Page 2 of 24
API Specifications
Table of Contents
Authorization Mechanism 3
Heartbeat Endpoint 5
Index Endpoint 6
Outward Message Endpoint 7
Inward Batch Endpoint 12
Inward Batch Status Update Endpoint 15
Outward Batch Status Update Endpoint 18
Outward Message Search Endpoint 23
Bank List Endpoint 24
PESO Net Web Service API
Page 3 of 24
API Specifications
All requests made via the PESO Net Web Service API follow a standard authentication
mechanism. Each request is authorized via an API Key and a Request Signature that is
calculated during each request.
Additionally, all requests must specify the Content Type of the request. Acceptable
requests follow the JSON Content Type.
Both the authorization parameters and the content type are to be included as part of the
HTTP headers of each request made to the PESO Net Web Service API.
Following are the minimum required headers for each PESO Net Web Service API
request:
Signature Calculation
For all inquiry-oriented requests (i.e. all Endpoints except for the Outward Message and
Inward Batch Status Update Endpoint), the signature is calculated by getting the SHA 256
of both the API Key and API Secret.
The signature will be calculated by concatenating getting the SHA256 value of the
concatenated API Key and Secret, for example:
7559ba0a72414e49511851b24dfba79d3ee0d693b921aa418138e309b957c223
Calculated SHA256
776530a6f1c010d2c4ae9c1883bf69ceb92de5e6c5bf2f29f43e4a30ef0b70e5
PESO Net Web Service API
Page 4 of 24
API Specifications
For all transactional requests, (i.e. Outward Message and Inward Batch Status Update
Endpoint), the signature is calculated by getting the SHA 256 of the following values
associated with the request:
• API Key
• Secret
• Transaction Amount (as stated in the Group Header)
The signature will be calculated by concatenating getting the SHA256 value of the
concatenated API Key, Secret and Transaction Amount, for example:
7559ba0a72414e49511851b24dfba79d3ee0d693b921aa418138e309b957c2231000.00
Calculated SHA256
627367cf737643b9eae0e466ff7ee4b538a08a19e6031ffa56db01fddc3f8cdc
PESO Net Web Service API
Page 5 of 24
API Specifications
Throughout this document, there are certain fields that are considered constants or are
otherwise unset, PCHC recommends that the values be set as specified in the document.
PESONet’s validation validates the correctness of the following constants as these are
material in the description of EFT transactions:
For all other constants, the values are not currently finalized and do not materially alter
the content of the instructions, and thus the defaults are used for all transactions. Setting
the said values differently from the constants defined in this document will have no effect.
This means that the validation process will not block the transactions, and the values for
these fields as received will revert to the constant values set by PCHC for these fields.
Due to the properties of JSON, there is no official schema validation being performed.
Therefore, providing additional keys in addition to those described in this document will
have no effect, and the keys and values will be ignored.
However, when the addition of the key changes the data type (e.g. from a String to a
JSON object) of an expected key, a validation issue may occur, and an error will be raised
as Invalid Message Structure.
Data Length
All data provided, when it exceeds the length for the specific field will be truncated.
Banks are responsible for ensuring that the data provided fall within the field limitations.
These field limitations are based on a legacy support for the conventional EPCS/PESONet
Inward File format. The maximum length of the fields are specified throughout this
document where applicable.
Acceptable Characters
For all String/Text fields, the following RegExp is used to match the characters:
/([a-zA-Z0-9\/\-\?:\(\)\.,'\+ ]*)/
Characters that do not match the above RegExp will be filtered and truncated.
PESO Net Web Service API
Page 6 of 24
API Specifications
Heartbeat Endpoint
Participating institutions may check the status of the PESO Net Web Service API by
sending a heartbeat request.
By receiving a successful response from the Heartbeat Endpoint, banks will know that the
Web Service API is currently functioning, and the following additional information:
Endpoint Details
Response Payload
The response payload will contain information about the current system date and the
ongoing clearing cycle. It is organized into the following JSON elements:
Index Endpoint
Participating institutions may use the Index Endpoint to obtain a list of the following:
Endpoint Details
Response Payload
The response payload will contain the Sequence Numbers of both outward and inward
batches that were sent/received by a bank during the given clearing date and cycle. It is
organized into the following JSON elements:
{
"FIToFICstmrCdtTrf": {
"GrpHdr": {
"MsgId": null,
"CreDtTm": null,
"NbOfTxs": 1,
"TtlIntrBkSttlmAmt": {
"Ccy": "PHP",
"value": "1000"
},
"IntrBkSttlmDt": null,
"SttlmInf": {
"SttlmMtd": "CLRG"
},
"InstgAgt": {
"FinInstnId": {
"BICFI": "BNORPHMMXXX"
}
},
"InstdAgt": {
"FinInstnId": {
"BICFI": "PCHCPHM1XXX"
}
}
},
"CdtTrfTxInf": [
{
PESO Net Web Service API
Page 9 of 24
API Specifications
"PmtId": {
"EndToEndId": 259790,
"TxId": "1519948326"
},
"PmtTpInf": {
"SvcLvl": {
"Prtry": "NURG"
},
"CtgyPurp": {
"Cd": "CASH"
}
},
"IntrBkSttlmAmt": {
"Ccy": "PHP",
"value": "1000"
},
"ChrgBr": "SLEV",
"Dbtr": {
"Nm": "Juan Dela Cruz",
"PstlAdr": ["PH"]
},
"DbtrAcct": {
"Id": {
"Othr": {
"Id": "0061521183200"
}
}
},
"DbtrAgt": {
"FinInstnId": {
"BICFI": "BNORPHMMXXX"
}
},
"Cdtr": {
"Nm": "Juana Sanchez",
"PstlAdr": "PH"
},
"CdtrAcct": {
"Id": {
"Othr": {
"Id": "0000012570193"
}
}
},
"CdtrAgt": {
"FinInstnId": {
"BICFI": "SETCPHMMXXX"
}
},
"RmtInf": {
"Ustrd": {
"rfi_reference_number": null,
"ofi_customer_reference_number": null,
"rfi_customer_reference_number": null
}
}
}
]
}
}
PESO Net Web Service API
Page 10 of 24
API Specifications
An ISO 20022 pacs.008 message is composed of 2 components, the Group Header and
Credit Transfer Transactions.
Up to 200 transactions may be associated with a single ISO 20022 pacs.008 message
sent via the PESO Net Web Service API.
Group Header
The Group Header contains information that is specific to a particular batch. For example,
the total amount of the transactions, as well the number of transactions in a particular
batch is declared and validated against the transactions contained in the batch.
Each ISO 20022 pacs.008 message may contain up to 200 transactions. Each transaction
is marshalled as an element of the CdtTrfTxInf element as an array.
maximum of 50 characters
PstlAdr Creditor/Beneficiary Address An
maximum of 50 characters per line, but the EPCS/PESONet
Inward file will only show the first 50 characters
array (maximum of 4 strings) of the
beneficiary’s address
CdtrAcct
Id
Othr
Id Creditor/Beneficiary Account
maximum of 16 characters Number
CdtrAgt
FinInstnId
BICFI Creditor/Beneficiary Bank BIC
RmtInf
Ustrd
rfi_reference_number RFI Reference Number
maximum of 16 characters
ofi_customer_reference_number OFI Customer Reference Number
maximum of 16 characters
rfi_customer_reference_number RFI Customer Reference Number
maximum of 16 characters
Instructions Instructions
maximum of 139 characters
Required Fields
Important Note
The structure of the above message should be observed STRICTLY. Thus, while the JSON
standard allows for the omission of certain elements with null values; the PESO Net Web
Service API will reject messages that do so.
Therefore, the full structure as stipulated above should be observed, with null values
provided to optional elements as appropriate.
PESO Net Web Service API
Page 13 of 24
API Specifications
Invoking the Inward Batch Endpoint allows a bank to retrieve a set of transactions
corresponding to a batch by using the Inward Batch Sequence Number that was retrieved
using the Index Endpoint.
Endpoint Details
"PstlAdr": [
"PO 15258,TAWAM HOSPITAL,NURSING TAWAM HOSPITAL BLD"
]
},
"DbtrAcct": {
"Id": {
"Othr": {
"Id": "0000000000000001"
}
}
},
"DbtrAgt": {
"FinInstnId": {
"BICFI": "SCBLPHMMXXX"
}
},
"Cdtr": {
"Nm": "NICHOLAS G BIE III PUROK 3 BOLONG",
"PstlAdr": [
"NICHOLAS G BIE III PUROK 3 BOLONG"
]
},
"CdtrAcct": {
"Id": {
"Othr": {
"Id": "0000002111967838"
}
}
},
"CdtrAgt": {
"FinInstnId": {
"BICFI": "BNORPHMMXXX"
}
},
"RmtInf": {
"Ustrd": {
"rfi_reference_number": "",
"ofi_customer_reference_number": "IB99991801150087",
"rfi_customer_reference_number": ""
}
}
},
{
"PmtId": {
"EndToEndId": 248023,
"TxId": "DC99991801150220"
},
"PmtTpInf": {
"SvcLvl": {
"Prtry": "NURG"
},
"CtgyPurp": {
"Cd": "CASH"
}
},
"IntrBkSttlmAmt": {
"Ccy": "PHP",
"value": "709632.11"
},
"ChrgBr": "SLEV",
"Dbtr": {
"Nm": "INTERNATIONAL COMMIT",
"PstlAdr": [
"ICRC FAD_REV/MNL 32ND FLOORPETRON MEGA PLAZA 358 S"
]
},
"DbtrAcct": {
"Id": {
"Othr": {
PESO Net Web Service API
Page 15 of 24
API Specifications
"Id": "0000132548370009"
}
}
},
"DbtrAgt": {
"FinInstnId": {
"BICFI": "SCBLPHMMXXX"
}
},
"Cdtr": {
"Nm": "PHILIPPINE RED CROSS",
"PstlAdr": [
"BONIFACIO DRIVE PORT AREA, MANILA /PHILIPPINES"
]
},
"CdtrAcct": {
"Id": {
"Othr": {
"Id": "0000004530005383"
}
}
},
"CdtrAgt": {
"FinInstnId": {
"BICFI": "BNORPHMMXXX"
}
},
"RmtInf": {
"Ustrd": {
"rfi_reference_number": "",
"ofi_customer_reference_number": "",
"rfi_customer_reference_number": ""
}
}
}
]
}
}
Response Payload
A status update message must contain transactions that belong to a SINGLE batch. This is
requirement is reflected in the Original Group Information and Status element, where the
original Inward Batch ID is defined.
{
"GrpHdr": {
"MsgId": null,
"CreDtTm": 1522676419000,
"InstgAgt": {
"FinInstnId": {
"BICFI": "BNORPHMMXXX"
}
},
"InstdAgt": {
"FinInstnId": {
"BICFI": "PCHCPHM1XXX"
}
}
PESO Net Web Service API
Page 17 of 24
API Specifications
},
"OrgnlGrpInfAndSts": {
"OrgnlMsgId": 1121,
"OrgnlMsgNmId": "pacs.008"
},
"TxInfAndSts": [
{
"OrgnlGrpInf": {
"OrgnlMsgId": 1121,
"OrgnlMsgNmId": "pacs.008"
},
"OrgnlEndToEndId": 193929,
"TxSts": "DS07",
"StsRsnInf": {
"AddtlInf": "Successfully Credited to Account"
},
"AccptncDtTm": 1522676419000,
"OrgnlTxRef": {
"Amt": {
"EqvtAmt": {
"Amt": 1000,
"CcyOfTrf": "PHP"
}
},
"Cdtr": {
"Nm": "JUAN DELA CRUZ"
},
"CdtrAcct": {
"Id": {
"Othr": {
"Id": "0000012570193"
}
}
},
"CdtrAgt": {
"FinInstnId": {
"BICFI": "SETCPHMMXXX"
}
}
}
}
]
}
Group Header
As a single invocation of the Inward Batch Status Update API requires that the transactions
all belong to the same batch, the inward batch ID/sequence number where the
transactions were received need to be indicated as part of the Original Group Information
and Status element.
The Outward Message Status Update Endpoint allows a bank to determine the status of
the transactions that it has sent.
It will return a ISO 20022 pacs.002 (Payment Status Report) message in JSON syntax.
Important Note: The message that will be returned will have some additional fields in
comparison to the input provided to the Inward Batch Status Update Endpoint.
The response is composed of a Group Header, and Transaction Information and Status
for each transaction covered by the Outward Message.
"Id": {
"Othr": {
"Id": "0000012570193"
}
}
},
"CdtrAgt": {
"FinInstnId": {
"BICFI": "SETCPHMMXXX"
}
}
}
}
]
}
Group Header
Group Status Codes refers to the Settlement Status by PESO Net. Thus, an accept status
in the Group Header would mean that the transactions have been processed, settled
and available to the RFI.
However, an accept (ACCC) status does not mean that the funds have been credited to
the beneficiaries, these statuses are reflected in individual transaction statuses.
PESO Net Web Service API
Page 21 of 24
API Specifications
Originating Financial Institutions that send an optional, Local External Code may also
perform queries to search for a specific Outward Message without the original Outward
Message Sequence Number.
This may be useful when an OFI is for any reason unable to use the original Outward
Message Sequence Number, or for verifying if a failed (or timed out) invocation was
successfully processed or not without having to reconcile and iterate messages through
the Index Endpoint.
Request Payload
{"local_external_code": "TEST"}
Banks may obtain a list of member banks at any time by invoking the Bank List endpoint.
This endpoint returns a list of banks currently registered in PESONet, along with other
pertinent information.