Documentation Maja Integration Api Original
Documentation Maja Integration Api Original
BPI - MAJA
API Documentation
Version: 2.0
1. Overview
This specification describes the API specifications and Transaction Flow that will be used by
Merchants to register invoice and payment method to be used.
2. Requirement
You must have username, password, client id and client secret to authenticate with our
resource server. The resource server is uses standard OpenID authentication (Resource
owner password grant).
3. Transaction Flow
* To make sure you get correct payment notification, please do a payment inquiry after receiving the
notification.
4. Authentication
Authentication type: OpenID
Grant type: password (Resource Owner Password Grant)
curl -d "grant_type=password" \
-d "client_id=<YOUR CLIENT ID>" \
-d "client_secret=<YOUR CLIENT SECRET>" \
-d "username=<YOUR USERNAME> " \
-d "password=<YOUR PASSWORD>" \
https://authorization.url
b) List authorization.url
Dev : https://account.makaramas.com/auth/realms/bpi-dev/protocol/openid-connect/token
Prod : https://account.makaramas.com/auth/realms/bpi/protocol/openid-connect/token
b) End Point
Primary
HTTP Method: POST
URL: https://billing-bpi-dev.maja.id/api/v2/register
Alternative
HTTP Method: POST
URL: https://billing-bpi-dev.maja.id/api/v2/invoice
Invoice Items
Field Type Required? Description
description String Yes Description
qty Integer Yes Quantity
unitPrice Double Yes Unit price
amount Double Yes Total amount
Invoice Attributes
Field Type Required Description
?
name String Yes Attribute name
value String Yes Attribute value
d) Example request
{
"date": "2021-02-28",
"amount": 100000,
"name": "Alfiyah",
"email": "[email protected]",
"va": "88081234567",
"openPayment": false,
"attribute1": "Fasilkom",
"attribute2": "Manajemen Sistem Informasi",
"items": [
{
"description": "Registration",
"unitPrice": 100000,
"qty": 1,
"amount": 100000
}
],
"attributes": []
}
e) Example response
{
"timestamp": "2021-02-28T04:45:19.104+00:00",
"code": "00",
"message": "Sukses",
"success": true,
"data": {
"id": 18825,
"date": "2021-02-28T00:00:00.000+00:00",
"number": 2501,
"activeDate": null,
"inactiveDate": null,
"currency": "IDR",
"amount": 100000.0,
"paid": false,
"paidDate": null,
"revision": 3,
"sequenceNumber": 1,
"openPayment": false,
"createdBy": null,
"createdDate": "2021-02-28T14:45:19.416+00:00",
"partialyPaid": false,
"lastPaymentDate": "2021-02-28T15:16:23.975+00:00",
"totalPayment": 0.0,
"remainingAmount": 100000.0,
"va": "88081234567",
"name": "Alfiyah",
"email": "[email protected]",
"phone": "081222888215",
"address": null,
"attributes": [],
"items": [
{
"id": 18826,
"description": "Registration",
"unitPrice": 100000.0,
"qty": 1,
"amount": 100000.0,
"paid": false,
"createdAt": "2021-02-28T14:45:19.435+00:00",
"updatedAt": "2021-02-28T14:45:19.435+00:00"
}
],
"attribute1": "Fasilkom",
"attribute2": "Manajemen Sistem Informasi",
"attribute3": "",
"attribute4": "",
"attribute5": "",
"tax": 0.0,
"taxDescription": null,
"transactionId": null,
"payMethod": null,
"bankVa": null,
}
}
6. Updating the Invoice
a) End Point
Primary
HTTP Method: POST
URL: https://billing-bpi-dev.maja.id/api/v2/update/{invoice_number}
Alternative
HTTP Method: PUT
URL: https://billing-bpi-dev.maja.id/api/v2/invoice
Invoice Items
Field Type Required? Description
description String Yes Description
qty Integer Yes Quantity
unitPrice Double Yes Unit price
amount Double Yes Total amount
Invoice Attributes
Field Type Required? Description
name String Yes Attribute name
value String Yes Attribute value
c) Example request
{
"date": "2021-02-28",
"amount": 200000,
"name": "Alfiyah",
"va": "88081234567",
"openPayment": true,
"attribute1": "Fasilkom",
"attribute2": "Manajemen Sistem Informasi",
"items": [
{
"description": "Registration",
"unitPrice": 100000,
"qty": 2,
"amount": 200000
}
],
"attributes": []
}
7. Payment Notification
a) Transaction Flow
After the customer pays for the virtual account through the bank channel (ATM,
I-BANK, SMS, etc.) the core banking will send a notification to the BPI, If the payment
status is successful, the system will update the invoice, then send a payment
notification to the merchant.
c) Example Notification
{
"code": "00",
"message": "Transaksi berhasil",
"type": "payment",
"id": 109021,
"number": 8087,
"amount": 100000,
"remainingAmount": 0,
"va": "88081234567",
"date": "2021-11-22",
"bankCode": "BSM",
"bankName": "Bank Syariah Mandiri",
"ref": "20211221304320001",
"channel": "ATM",
"name": "Alfiyah",
"phone": "",
"email": "[email protected]",
"address": ""
}
8. Inquiry
You may run inquiry process to make sure you are getting the correct payment
notifications.
a) Endpoint
HTTP Method: POST
URL: https://billing-bpi-dev.maja.id/api/v2/inquiry
b) Post Body
Field Type Required Description
?
va String Yes Virtual Account Number
invoiceNumber String Yes Invoice Number
amount String No Amount
c) Example Request
{
va: “80801234567”,
invoiceNumber: “8087”,
amount: “100000”,
}
d) Example Response
{
code: “00”,
message: “Inquiry Berhasil”,
data: {
date: “2020-11-21”,
amount: 100000,
name: “Alfiyah”,
email: “[email protected]”,
va: “88081234567”,
attribute1: “Fasilkom”,
attribute2: “Manajemen Sistem Informasi”,
items: [
{
“description”: “Registration”,
“unitPrice”: 100000,
“qty”: 1,
“amount”: 100000
}
],
paid: true,
remainingAmount: 0
}
}
9. Cancel the Invoice
a) Endpoint
HTTP Method: POST
URL: https://billing-bpi-dev.maja.id/api/v2/cancel
b) Post Data
Field Type Required Description
?
va String Yes Virtual Account Number
invoiceNumber Long Yes Invoice Number
amount Double No Amount
c) Example Request
{
va: “80801234567”,
invoiceNumber: 8087,
amount: 100000,
}
d) Example Response
{
code: “00”,
message: “Tagihan dibatalkan”
}