NAV
shell javascript

Introduction

Welcome to OY! API Documentation. Our API services are organized around REST, accepts form-encoded request bodies and returns JSON-encoded responses.

Definition

/**
 * Welcome to Documentation page of
 * OY! API Services
 *
 * Here, you can get necessary info
 * for integration with OY! API
 *
 * Happy coding!
 ** /

For the purpose of standardization and to prevent any misunderstanding, below our the terms we are going to use in this documentation:

Business Flow

Signup for Trial

After partner has acquired access to OY! API Services, then:

  1. Partner can topup OY! Account Deposit via Virtual Accounts
  2. Once Deposit balance is active, Partner can use the API services provided

Authentication

OY! API uses pair of API Key and IP Address to authenticate a partner request. Partner needs to register a unique IP Address which will be used as originating request for the API Services.

HTTPS Request

Disbursement API can be requested through HTTPS Request to OY! API Base URL endpoint. The HTTPS Header has to be used to allow proper authentication, additionally HTTPS Request should only be made from IP Address which has been registered in OY! System.

API Base URL

Development Environment: https://sandbox.oyindonesia.com/staging/partner Production Environment: https://partner.oyindonesia.com

HTTPS Header

Use following HTTPS Headers when you make a call to OY! API

Header Type Description
Content-Type application/json The Content-Type field indicates that JSON type is acceptable to send to the recipient
Accept application/json The Accept field is used to specify that JSON type is acceptable for the response
X-OY-Username String(64) Partner Username to access OY! API services
X-Api-Key String(255) Partner API Key to access OY! API services

Fund Disbursement

Disbursement APIs allow you to instruct OY to disburse fund to any bank accounts in Indonesia easily and real-time.

Bank Account Inquiry

curl -X POST https://partner.oyindonesia.com/api/inquiry -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:987654' -d '{"recipient_bank": "014", "recipient_account": "1239812390"}'

The above command returns JSON structured similar like this:

{
  "status":{
    "code":"000",
    "message":"Success"
  },
  "recipient_bank":"014",
  "recipient_account":"1239812390",
  "recipient_name":"John Doe",
  "timestamp":"16-10-2019 09:55:31"
}

This API is mandatory to hit before remit API. Use this API to get beneficiary account details.

HTTPS Request

POST BASE_URL/api/inquiry

Request Parameters

Parameter Type Required Description
recipient_bank String(3) TRUE Bank Code of the Beneficiary account, see Disbursement Bank Codes
recipient_account String(255) TRUE Beneficiary account number, numeric only

Response Parameters

Parameter Type Description
status Object Status of Payout in Object {code: <status_code>, message: <status_message>}
recipient_bank String(3) Bank Code of the Beneficiary account, see Disbursement Bank Codes
recipient_account Numeric(255) Account Number of the Beneficiary Account
recipient_name String(255) Account Name of the Beneficiary Account
timestamp Timestamp Timestamp api hit (format: dd-MM-yyyy HH:mm:ss)

Disbursement

curl -X POST https://partner.oyindonesia.com/api/remit -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321' -d '{"recipient_bank": "014", "recipient_account": "1239812390", "amount":125000, "note":"Split lunch bill", "partner_trx_id":"1234-asdf","email" :"napoleon@email.com test@email.com"}'

The above command returns JSON structured similar like this:

{
  "status":{
    "code":"101",
    "message":"Request is Processed"
  },
  "amount":125000,
  "recipient_bank":"014",
  "recipient_account":"1239812390",
  "trx_id":"ABC-456",
  "partner_trx_id":"1234-asdf",
  "timestamp":"16-10-2019 10:23:42"
}

Use this API to start disbursing money to a specific beneficiary account.

HTTPS Request

POST BASE_URL/api/remit

Request Parameters

Parameter Type Required Description
recipient_bank String(3) TRUE Bank Code of the Beneficiary account, see Disbursement Bank Codes
recipient_account String(255) TRUE Beneficiary account number, numeric only
amount BigDecimal TRUE Amount of disbursement (Accept non fraction number), min amount 10000
note String(255) TRUE Add Note to the payout
partner_trx_id String(255) TRUE Unique Payout ID for a specific request, generated by partner
email String(255) FALSE Email for invoice notification (Optional). Email can be more than one but not more that five separated by a whitespace.

Response Parameters

Parameter Type Description
status Object Status of Payout in Object {code: <status_code>, message: <status_message>}
amount BigDecimal Amount of disbursement (Accept non fraction number)
recipient_bank String(3) Bank Code of the Beneficiary account, see Disbursement Bank Codes
recipient_account String(255) Beneficiary account number
trx_id String(36) Unique Payout ID from OY!. Partner can use this ID for settlement
partner_trx_id String(255) Unique Payout ID which partner put on the Request
timestamp String(19) Execution time of Disbursement in OY! system ("dd-MM-yyyy HH:mm:ss")

Get Disbursement Status

curl -X POST https://partner.oyindonesia.com/api/remit-status -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321' -d '{"partner_trx_id": "1234-asde"}'

The above command returns JSON structured similar like this:

{
  "status":{
    "code":"000",
    "message":"Success"
  },
  "amount":125000,
  "recipient_name":"John Doe",
  "recipient_bank":"008",
  "recipient_account":"1234567890",
  "trx_id":"ABC-456",
  "partner_trx_id":"1234-asde",
  "timestamp":"16-10-2020 10:34:23",
  "created_date": "24-01-2020 06:48:08",
  "last_updated_date": "24-01-2020 06:48:39"
}

To get status of a disbursement request, you can call this API. You may need to call this API few times until getting a final status (success / failed)

HTTPS Request

POST BASE_URL/api/remit-status

Request Parameters

Parameter Type Required Description
partner_trx_id String(255) TRUE Unique Payout ID for a specific request, generated by partner

Response Parameters

Parameter Type Description
status Object Status of Payout in Object {code: <status_code>, message: <status_message>}
amount BigDecimal Amount of disbursement (Accept non fraction number)
recipient_name String(255) Account holder name of Beneficiary account number
recipient_bank String(3) Bank Code of the Beneficiary account, see Disbursement Bank Codes
recipient_account String(255) Beneficiary account number
trx_id String(36) Unique Payout ID from OY!. Partner can use this ID for settlement
partner_trx_id String(255) Unique Payout ID which partner put on the Request, generated by partner
timestamp String(19) Execution time of API remit status in OY! system ("dd-MM-yyyy HH:mm:ss")
created_date String(19) Executionn time of Disbures in OY! system ("dd-MM-yyyy HH:mm:ss")
last_updated_date String(19) Latest status change of a disbursement. Example from 'Pending' to 'Success' ("dd-MM-yyyy HH:mm:ss")

Get Balance

curl -X GET 'https://partner.oyindonesia.com/api/balance' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-OY-Username: janedoe' -H 'X-Api-Key: 7654321'

The above command returns JSON structured similar like this:

{
  "status":{
    "code":"000",
    "message":"Success"
  },
  "balance":100000000.0000,
  "overdraftBalance":500000.0000,
  "overbookingBalance":200000.0000,
  "pendingBalance":2000000.0000,
  "availableBalance":98500000.0000,
  "timestamp":"10-12-2019 12:15:37"
}

Use this API to get partner balance.

HTTPS Request

GET BASE_URL/api/balance

Response Parameters

Parameter Type Description
status Object Status of Payout in Object {code: <status_code>, message: <status_message>}
balance BigDecimal Remaining balance (Accept non fraction number)
overdraftBalance BigDecimal Remaining overdraft balance (Accept non fraction number)
overbookingBalance BigDecimal Remaining overbooking balance (Accept non fraction number)
pendingBalance BigDecimal The cumulative balance of your pending transactions.
availableBalance BigDecimal The total cumulative money of Balance + Available Overdraft - Pending Balance that you can use for disbursement.
timestamp String(19) Execution time of Disbursement in OY! system ("dd-MM-yyyy HH:mm:ss").

Mock number Staging API

To get response code status of a disbursement inquiry request, you can use this mock:

Parameter Expected Result
2222222222 (recipient_account) BANK_CODE_NOT_FOUND("205", "Bank Code is not found")
8888888888 (recipient_account) BANK_ACCOUNT_NOT_FOUND("209", "Bank Account is not found")
other value (recipient_account) SUCCESS("000", "Success")

To get response code status of a disbursement remit request, you can use this mock:

Parameter Expected Result
1234567890 (recipient_account) INTERNAL_SERVER_ERROR("999", "Internal Server Error")
1111111111 (recipient_account) DUPLICATE_PARTNER_TX_ID("203", "Duplicate Partner Tx Id")
2222222222 (recipient_account) BANK_CODE_NOT_FOUND("205", "Bank Code is not found")
3333333333 (recipient_account) TX_ID_NOT_FOUND("204", "Tx Id is not found")
4444444444 (recipient_account) USER_IS_NOT_FOUND("201", "User is not found")
5555555555 (recipient_account) USER_IS_NOT_ACTIVE("202", "User is not active")
other value (recipient_account) PROCESSED("101", "Request is Processed")

To get response code status of a disbursement remit status request, you can use this mock:

Parameter Expected Result
1234567890 (recipient_account) INTERNAL_SERVER_ERROR("999", "Internal Server Error")
6666666666 (recipient_account) IN_PROGRESS("102", "Request is In progress")
7777777777 (recipient_account) FAILED("300", "Failed")
8888888888 (recipient_account) BANK_ACCOUNT_NOT_FOUND("209", "Bank Account is not found")
9999999999 (recipient_account) SUSPECT(“301”, “Suspect”)
other value (recipient_account) SUCCESS("000", "Success")

To get response code status of a disbursement balance request, you can use this mock:

Parameter Expected Result
<Partner Username> (X-OY-Username) SUCCESS("000", "Success")
other value (X-OY-Username) USER_IS_NOT_FOUND("201", "User is not found")

Disbursement Bank Codes

Supported Bank Codes to be used in the Disbursement Request:

Bank Codes Bank Name
002 Bank BRI
008 Bank Mandiri
009 Bank BNI
011 Bank Danamon
013 Bank Permata
014 Bank BCA
016 BII Maybank
019 Bank Panin
022 CIMB Niaga
023 Bank UOB INDONESIA
028 Bank OCBC NISP
031 CITIBANK
036 Bank Windu Kentjana International
037 Bank ARTHA GRAHA
042 Bank TOKYO MITSUBISHI UFJ
046 Bank DBS
050 Standard Chartered
054 Bank CAPITAL
061 ANZ Indonesia
069 Bank OF CHINA
076 Bank Bumi Arta
087 Bank HSBC
088 Bank Antardaerah
089 Bank Rabobank
095 Bank JTRUST INDONESIA
097 Bank MAYAPADA
110 Bank Jawa Barat
111 Bank DKI
112 Bank BPD DIY
113 Bank JATENG
114 Bank Jatim
115 Bank Jambi
116 Bank Aceh
117 Bank SUMUT
118 Bank NAGARI
119 Bank Riau
120 Bank SUMSEL BABEL
121 Bank Lampung
122 Bank KALSEL
123 Bank KALBAR
124 Bank BPD Kaltim
125 Bank BPD Kalteng
126 Bank SULSELBAR
127 Bank Sulut
128 Bank NTB
129 Bank BPD Bali
130 Bank NTT
131 Bank Maluku
132 Bank BPD Papua
134 Bank SULTENG
135 Bank Sultra
137 Bank BANTEN
145 Bank Nusantara Parahyangan
146 Bank Of India Indonesia
147 Bank Muamalat
151 Bank Mestika
152 Bank SHINHAN
153 Bank Sinarmas
157 Bank Maspion
161 Bank Ganesha
164 Bank ICBC
167 Bank QNB indonesia
200 Bank BTN
212 Bank Woori Saudara
213 Bank BTPN
405 Bank Victoria Syariah
422 Bank BRI Syariah
425 Bank Jabar Banten Syariah
426 Bank Mega
427 Bank BNI SYARIAH
441 Bank Bukopin
451 Bank Syariah Mandiri
472 Bank Jasa Jakarta
484 Bank KEB HANA
485 Bank MNC INTERNATIONAL
490 Bank YUDHA BHAKTI
494 Bank Rakyat Indonesia AGRONIAGA
498 Bank SBI Indonesia (Indomonex)
501 Bank Royal
503 Bank National Nobu
506 Bank MEGA SYARIAH
513 Bank INA
517 Bank PANIN SYARIAH
520 PRIMA MASTER BANK
521 Bank SYARIAH BUKOPIN
523 Bank Sahabat Sampoerna
526 Bank DINAR
535 Bank KESEJAHTERAAN EKONOMI
536 Bank BCA SYARIAH
542 Bank ARTOS
547 Bank BTPN SYARIAH
548 Bank MULTIARTA SENTOSA
553 Bank Mayora
555 Bank INDEX
559 CNB
564 Bank MANTAP
566 Bank VICTORIA INTL
567 HARDA
945 IBK
949 Bank CTBC Indonesia
950 Bank COMMONWEALTH
ovo OVO
linkaja LinkAja
dana Dana
gopay Gopay

Response Codes

These are the list of possible status codes for fund disbursement:

Payment Status State Meaning
000 Final Disbursement Request has been completed (success)
101 Non-Final Request is Processed
102 Non-Final Request is In Progress
201 Final Request is Rejected (User ID is not Found)
202 Final Request is Rejected (User ID is not Active)
203 Final Request is Rejected (Duplicate Partner Tx ID)
204 Final Request is Rejected (Partner Tx ID is Not Found)
205 Final Request is Rejected (Beneficiary Bank Code is Not Supported)
206 Final Request is Rejected (Partner Deposit Balance is Not Enough)
207 Final Request is Rejected (Request IP Address is not Registered)
208 Final Request is Rejected (API Key is not Valid)
209 Final Request is Rejected (Bank Account is not found)
210 Final Request is Rejected (Amount is not valid)
211 Final Request is Rejected (Bank code is not available for this service)
212 Final Request is Rejected (Given amount are lesser than allowed value for static va)
213 Final Request is Rejected (Given amount are greater than allowed value for static va)
214 Final Request is Rejected (Failed to generate static va)
215 Final Request is Rejected (Max amount per transaction exceed for disburse)
216 Final Request is Rejected (VA Id is empty)
217 Final Request is Rejected (VA Number is still active for this partner user id)
300 Final Disbursement is FAILED
301 Non-Final Pending (When there is a unclear answer from Banks Network)
990 Final Request is Rejected (Request Parameter is not Valid)
999 Non-Final Internal Server Error

Static VA

Static VA API allows you to create a unique VA number as a payment method for your customers..

API Base URL

Currently API static VA generator is only available in our Production Environment: https://partner.oyindonesia.com (Staging Environment will be available soon)

Create VA

Use this API to create new VA number

curl -X POST https://partner.oyindonesia.com/api/generate-static-va -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321' -d '{"partner_user_id": "oy00000001","bank_code": "002","amount": 500000}'

The above command returns JSON structured similar like this:

{
    "id": "12345b1-23be-45670-a123-5ca678f12b3e",
    "status": {
        "code": "000",
        "message": "Success"
    },
    "amount": 10000,
    "va_number": "123456789182827272",
    "bank_code": "002",
    "is_open": false,
    "is_single_use": false,
    "expiration_time": 1582783668175,
    "va_status": "WAITING_PAYMENT",
    "username_display": "va name"
}

HTTPS Request

POST BASE_URL/api/generate-static-va

Request Parameters

Parameter Type Required Default Description
partner_user_id String(255) TRUE - Your unique ID for specific user
bank_code String(3) TRUE - Bank code which the VA number will be generated
amount BigDecimal FALSE 0 Amount your user must paid to complete the transaction, if is_open is false, amount is required.
is_open Boolean FALSE true If set true means VA number can accept any amount, field amount can be optional, if set false means VA number only accept the specified amount in the field amount. When you set is_open to false, you must specify amount field.
is_single_use Boolean FALSE false True means that this VA should be closed once there is a successful payment that is being made to this VA.
expiration_time Int FALSE - Expiration time of the VA in minutes, if empty VA will be expired in 24 hour
is_lifetime Boolean FALSE false If it is set to FALSE (default) then VA will expire based on the expiration time. Otherwise, it will remain active.
username_display String(255) FALSE username VA Name, default is using username
email String(50) FALSE - Email of user, using email standard format

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}
amount BigDecimal Amount of VA transaction
va_number String(20) Generated VA number
id String(36) Unique VA ID
bank_code String(3) Bank code for VA, see VA Bank Code
is_open Boolean True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use Boolean True means that this VA should be closed/complete once there is a successful payment that is being made to this VA.
expiration_time Int Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time.
va_status String(16) Status of VA, see VA Status
username_display String(255) VA Name, default is using username

Get VA Info

Get VA info using Unique VA id.

curl -X GET https://partner.oyindonesia.com/api/static-virtual-account/1414255-12121-21212121-212121 -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321'

The above command returns JSON structured similar like this:

{
    "id": "1414255-12121-21212121-212121",
    "status": {
        "code": "000",
        "message": "Success"
    },
    "amount": 10000.0000,
    "va_number": "1233456000000000001",
    "bank_code": "002",
    "is_open": true,
    "is_single_use": false,
    "expiration_time": 1582790250609,
    "va_status": "WAITING_PAYMENT",
    "username_display": "username",
    "amount_detected": 0,
    "partner_user_id": "123456"
}

HTTPS Request

GET BASE_URL/api/static-virtual-account/<ID>

URL Parameters

Parameter Type Required Default Description
ID String(255) TRUE - Unique VA id, you can get this once you success created VA

Response Parameters

Parameter Type Description
id String Unique VA id
status Object Status of response in Object {code: <status_code>, message: <status_message>}
amount BigDecimal Amount of VA transaction
va_number String(20) Generated VA number
bank_code String(3) Bank code for VA
is_open Boolean True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use Boolean True means that this VA should be closed once there is a successful payment that is being made to this VA.
expiration_time Int Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time.
va_status String(16) Status of VA, see VA Status
username_display String(255) VA Name, default is using username
partner_user_id String(255) Your unique ID for specific user

Update VA

Update VA using unique VA id.

curl -X PUT https://partner.oyindonesia.com/api/static-virtual-account/1414255-12121-21212121-212121 -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321' -d '{"is_open" : true,"amount": 50000,"is_single_use" : false,"expiration_time": 30,"username_display" : "test","bank_code": "002"}'
{
    "id": "1414255-12121-21212121-212121",
    "status": {
        "code": "000",
        "message": "Success"
    },
    "amount": 50000,
    "va_number": "1001234000000000001",
    "bank_code": "002",
    "is_open": true,
    "is_single_use": false,
    "expiration_time": 1582802205412,
    "va_status": "WAITING_PAYMENT",
    "username_display": "vaname",
    "partner_user_id": "12345677"
}

HTTPS Request

PUT BASE_URL/api/static-virtual-account/<ID>

URL Parameter

Parameter Type Required Default Description
ID String(36) TRUE - Unique VA ID, you can get this once you success created VA

Request Parameters

Parameter Type Required Default Description
amount BigDecimal FALSE - Amount your user must paid to complete the transaction
is_open Boolean FALSE true True means VA number can accept any amount, field amount can be optional, False means VA number only accept the specified amount in the field amount. When you set is_open to false, you must specify amount field.
is_single_use Boolean FALSE false True means that this VA should be closed once there is a successful payment that is being made to this VA.
expiration_time Int FALSE - Expiration time of the VA in minutes, if empty VA will be expired in 24 hour
is_lifetime Boolean FALSE - false
email String(50) FALSE - Email of user, using email standard format

Response Parameters

Parameter Type Description
id String Unique VA id
status Object Status of response in Object {code: <status_code>, message: <status_message>}
amount BigDecimal Amount of VA transaction
va_number String(20) Generated VA number
bank_code String(3) Bank code for VA
is_open Boolean True means VA number can accept any amount, False means VA number only accept the specified amount in the field amount
is_single_use Boolean True means that this VA should be closed once there is a successful payment that is being made to this VA.
expiration_time Int Expiration time of VA on Unix timestamp in milliseconds, -1 means no expiration time.
va_status String(16) Status of VA, see VA Status
username_display String(255) VA Name, default is using username
partner_user_id String(255) Your unique ID for specific user

Get list of created VA

Get list of created VA

curl -X GET https://partner.oyindonesia.com/api/static-virtual-account?offset=0&limit=10 -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321'

The above command returns JSON structured similar like this:

{
    "total": 5,
    "data": [
        {
            "id": "9a660428-3373-436b-b929-ef69698dd26f",
            "amount": 12000.0000,
            "va_number": "100536000000000006",
            "bank_code": "002",
            "is_open": true,
            "is_single_use": false,
            "expiration_time": 1582791896416,
            "va_status": "EXPIRED",
            "username_display": "username",
            "amount_detected": 400000,
            "partner_user_id": "12345"
        },
        {
            "id": "de51383f-1557-409c-8542-dcb74ca76375",
            "amount": 12000.0000,
            "va_number": "100536000000000005",
            "bank_code": "002",
            "is_open": true,
            "is_single_use": false,
            "expiration_time": 1582790250609,
            "va_status": "EXPIRED",
            "username_display": "username",
            "amount_detected": 500000,
            "partner_user_id": "54321"
        }
    ],
    "status": {
        "code": "000",
        "message": "Success"
    }
}

HTTPS Request

GET BASE_URL/api/static-virtual-account?offset=<offset>&limit=<limit>

Request Parameters

Parameter Type Default Description
offset Integer 0 start offset, default is 0, if empty will used default value
limit Integer 10 max item to fetch, default is 10, if empty will used default value

Response Parameters

Parameter Type Description
total Integer total items
data Array of object List of Object {id: <id>, amount: <amount>, va_number: <va_number>, bank_code: <bank_code>, is_open: <is_open>, is_single_user: <is_single_user>, expiration_time: <expiration_time>, va_status: <va_status>, username_display: <username_display>, amount_detected: <amount_detected>, partner_user_id: <partner_user_id>}
status Object Status of response in Object {code: <status_code>, message: <status_message>}

Get List of Transaction for VA

Get list of incoming transaction for specific va number.

curl -X GET https://partner.oyindonesia.com/api/va-tx-history/12345676788898?offset=0&limit=10 -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:7654321'

The above command returns JSON structured similar like this:

{
    "id": "12345676788898",
    "status": {
        "code": "000",
        "message": "Success"
    },
    "data": [
        {
            "id": "d9c2963f-be14-4558-9380-5ba1db8ed156",
            "created": "2020-02-27 07:48:01",
            "name": "Static VA by username",
            "amount": 10000,
            "create_by": "Static VA by username",
            "last_update_by": "Static VA by username",
            "last_updated": 1582789681439,
            "admin_fee": 1000,
            "va_number": "123456000000000001"
        }
    ],
    "number_of_transaction": 1
}

HTTPS Request

GET BASE_URL/api/va-tx-history/<ID>?offset=<offset>&limit=<limit>

URL Parameter

Parameter Type Required Default Description
ID String(36) TRUE - Unique VA ID, you can get this once you success created VA

Request Parameters

Parameter Type Required Default Description
offset Integer FALSE 0 start offset, default is 0, if empty will used default value
limit Integer FALSE 10 max item to fetch, default is 10, if empty will used default value

Response Parameters

Parameter Type Description
id Integer Unique VA id
status Object Status of response in Object {code: <status_code>, message: <status_message>}
data Array of Object List of Object {id: <id>, created: <created>, name: <name>, amount: <amount>, create_by: <create_by>, last_update_by: <last_update_by>, last_updated: <last_updated>, admin_fee: <admin_fee>, va_number: <va_number>}
numberOfTransaction Integer Total transaction

Partner Callback

Response callback:

{
    "va_number": "1234567",
    "amount": 100000,
    "partner_user_id": "oy0000000001",
    "success": true
}

Once user successfully do the payment, our system will make a callback to your system

Callback Parameters

Parameter Type Description
va_number String(20) Generated VA number
amount BigDecimal Amount of VA transaction
partner_user_id String(255) Your unique ID for specific user
success boolean payment status if success or not

Static VA Bank Code

Available Bank for Static VA

Bank Code Bank Name
002 Bank BRI
013 Bank Permata
022 Bank CIMB Niaga
008 Bank Mandiri
009 Bank BNI

Static VA Status

Available Status for Static VA

Status Description
WAITING_PAYMENT This status means that VA is active and can receive a payment
PAYMENT_DETECTED This status means that there are incoming payment to VA Number
EXPIRED This status means that VA is expired. You cannot accept or make update to VA Number with this status.
COMPLETE This status means that VA is closed/complete after get incoming payment. You cannot accept or make update to VA Number with this status. Only Static VA with attribute is_single_use true can have this status.

KYC

KYC APIs will allow you to verify whether the user-supplied identity card is valid or not. KYC API can be requested through HTTPS Request to OY! API Base URL endpoint.

Contact us if you are interested!

Verify ID-Card

Verification using id-card will be handle asynchronous, and we will send KYC response via callback url. For detail callback, you can see KYC Response Callback

curl -X POST https://partner.oyindonesia.com/api/kyc/id-card -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:987654' -d '{"personal_information": "rsa_encrypted_personal_information", "address": "rsa_encrypted_address", "id_card_photo": "aes_encrypted_base64_encode_of_id_card_photo", "selfie_card_photo": "aes_encrypted_base64_encode_of_selfie_with_id_card_photo"}'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message" : "Request processed"
    }
}

HTTPS Request

POST BASE_URL/api/kyc/id-card

Request Attribute

Parameter Type Required Description
name String True Name of user
address String True Home address based on ID Card
nik String True ID card number
id_card_photo String True Id Card Photo, encode to base64 string
selfie_card_photo String True Selfie with id card, encode to base64 String
phone_number String True Phone number to be verified
email String False Email
business_address String True Business address

Request Body

Parameter Type Description Encryption
personal_information String User personal information consisting of {name: <name>, email: <email>, phone_number: <phone_number>, nik: <nik>, secret: <secret>} RSA
address String Address information consisting of {home: <home>, business: <business>} RSA
id_card_photo String Base64 encode of Id card photo AES
selfie_card_photo String Base64 encode of selfie card photo AES

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see KYC Response Codes

Verify Phone Number

Verification using phone number.

curl -X POST https://partner.oyindonesia.com/kyc/id-card -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:987654' -d '{"name": "name of user", "address": "home address", "nik" : "id card number", "phone_number": "phone number"}'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message" : "Request processed"
    }
}

HTTPS Request

POST BASE_URL/kyc/phone-number

Request Attributes

Parameter Type Required Description
name String True Name of user
address String True Home address
nik String True ID card number
phone_number String False Phone number of user, use +62 format

Request Body

Parameter Type Description Encryption
personal_information String Personal information consisting of {name: <name>, phone_number: <phone_number>, nik: <nik>} RSA
address String Address consisting of {home: <home>} RSA

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see KYC Response Codes

Check Status KYC

There are some cases send callback can be failed, so client cannot get kyc status from callback, to handle this we suggest to check kyc status using this API.

curl -X POST https://partner.oyindonesia.com/kyc/status -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-api-key:987654' -d '{"personal_information": "rsa_encryption_personal_information"}'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message" : "verified"
    },
    "data" : {
        "nik" : "ENCRYPTED_NIK",
        "signature" : "OY_GENERATE_SIGNATURE"
    }
}

HTTPS Request

POST BASE_URL/kyc/status

Request Attributes

Parameter Type Required Description
nik String True ID card number

Request Body

Parameter Type Description Encryption
personal_information String Personal information consisting of {nik: <nik>} RSA

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see KYC Response Codes
data Object Detail data of response in Object {nik: <encrypted nik>, signature: <OY! signature>}

KYC Response Callback

Response callback:

{
    "status": {
        "code": "000",
        "message" : "verified"
    },
    "data" : {
        "nik" : "ENCRYPTED_NIK",
        "signature" : "OY_GENERATE_SIGNATURE"
    }
}

Once data have been verified, our system will make a callback to your system.

Callback Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see KYC Response Codes
data Object Detail data of response in Object {nik: <encrypted nik>, signature: <OY! signature>}

KYC Response Codes

These are the list of possible status codes for KYC response status:

Status Code State Meaning
000 Final Response success without error
001 Final Data on request body is empty or invalid
002 Final Request is rejected (Name is not the same as id card)
003 Final Request is Rejected (Address is not the same as id card)
004 Final Request is Rejected (NIK is not the same as id card)
005 Final Request is Rejected (ID card photo is not clear)
006 Final Request is Rejected (Face is not the same as photo on id card)
007 Final Data not found. ID Card number not registered
008 Final Image size more than 1MB
999 Final Internal Server Error

PFM

PFM APIs will allow you to connect with internet banking account. You can use it to check accounts, balance and mutations. PFM API can be requested through HTTPS Request to OY! API Base URL endpoint.

Contact us if you are interested!

Connect internet banking

Login and connect internet banking. This process is asynchronous, we will send response using callback url that you registered to us. For detail of callback response, see PFM Callback Response

curl -X POST https://partner.oyindonesia.com/api/ibank/login -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-oy-apikey:987654' -d '{"data": "<ENCRYPTED_USERNAME_PASSWORD>","bank_code": "008","phone_number" : "+62821123456789","email" : "","tx_history_start_date": 1586734844000,"tx_history_end_date": 1584056444000,"user_consent": true}'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message": "Processing login to internet banking"
    },
    "data" : {
        "id": "1234-12341-1231-1231"
    }
}

HTTPS Request

POST BASE_URL/api/ibank/login

Request Parameters

Parameter Type Required Description
data String True Encripted json of username and password.
bank_code String True Code of bank, For list of bank code, see PFM Bank Codes
phone_number String True Phone number of user
email String False Email of user
tx_history_start_date Long False Start date mutations on millisecond, if empty will be used current date - 7
tx_history_end_date Long False End date mutation on millisecond, if empty will be used current date
tx_history_month Integer False Get mutation using month, 1 is for January, 2 for February and so on
user_consent Boolean True User consent to share specific information about user and user's account to OY! Indonesia for processing the user's data, if false we are unauthorized to process the data further

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see PFM Response Codes
data Object Data of response in Object {id:<request_id>}

Get connected accounts

Get all connected accounts on specific Internet banking id (ibank ID)

curl -X GET https://partner.oyindonesia.com/api/ibank/:ibankId/accounts -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-oy-apikey:987654'

The above command returns JSON structured similar like this:

{
    "status": {
        "code" : "000",
        "message": "success"
    },
    "data": [
        {
            "id": "12345-132131-13213-1312131",
            "account_number": "12345678900",
            "account_type": "SAVING",
            "bank": {
                "code": "014",
                "name": "BCA"
            }
        },
        {
            "id": "2134-4315-1234-5123-12331411",
            "account_number": "************1234",
            "account_type": "CREDIT-CARD",
            "bank": {
                "code": "014",
                "name": "BCA"
            }
        }
    ]
}

HTTPS Request

GET BASE_URL/api/ibank/:ibankId/accounts

URL Parameter

Parameter Type Description
ibankId String Unique internet banking id

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see PFM Response Codes
data Array of Object List of object {id: <id>, account_number: <account_number>, account_type: <account_type>, bank: { code: <code>, name: <name>}}

Get Balance

Get balance for specific account. This is required account ID as parameter.

curl -X GET https://partner.oyindonesia.com/api/accounts/:accountId/balance -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-oy-apikey:987654'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message": "success"
    },
    "data": {
        "id": "12345-132131-13213-1312131",
        "account_number": "12345678900",
        "account_type": "SAVING",
        "bank": {
            "code": "014",
            "name": "BCA"
        },
        "balance": 150000000,
        "last_updated": 150091892829299
    }
}

HTTPS Request

GET BASE_URL/api/accounts/:accountId/balance

URL Parameter

Parameter Type Description
accountId String Unique account id

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see PFM Response Codes
data Object Object of {id: <id>, account_number: <account_number>, account_type: <account_type>, bank: { code: <code>, name: <name>}, balance: <balance>, last_updated: <last_updated>}

Get Mutations

Get mutations for specific account with time range. This is required account ID as parameter,

curl -X GET https://partner.oyindonesia.com/api/accounts/:accountId/mutations?startDate=2020-01-01&endDate=2020-01-30 -H 'content-type: application/json, accept: application/json, x-oy-username:myuser, x-oy-apikey:987654'

The above command returns JSON structured similar like this:

{
    "status": {
        "code": "000",
        "message": "success"
    },
    "data": [
        {
            "id": "1234-123131-132132-131231",
            "category": "food",
            "amount": 50000,
            "balance_flow": -1,
            "transaction_date": 15818182101011,
            "description": "DB DEBIT DOMESTIK TANGGAL :21/09 TRN DEBIT DOM 008 KFC DRIVE THRU SAM",
            "status": "complete"
        },
        {
            "id": "1234-123131-132132-131231",
            "category": "food",
            "amount": 35000,
            "balance_flow": -1,
            "transaction_date": 15881818220012,
            "description": "DB DEBIT DOMESTIK TANGGAL :24/11 TRN DEBIT DOM 022 PANCIOUS PANCAKE H",
            "status": "pending"
        }
    ]
}

HTTPS Request

GET BASE_URL/api/account/:accountId/mutations

URL Parameters

Parameter Type Description
accountId String Unique account id

Query Parameters

Parameter Type Description
startDate String Start date of transaction, using format yyyy-MM-dd
endDate String End date of transaction, using format yyyy-MM-dd

Response Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see PFM Response Codes
data Object Object of {id: <id>, category: <category>, amount: <amount>, balance_flow: <balance_flow>, transaction_date: <transaction_date>, description: <description>, status: <status>}

PFM Callback Response

Response Callback

{
    "status": {
        "code" : "000",
        "message": "Succeess"
    },
    "data": "encrypted callback response"
}

Once data have been connected, our system will make a callback to your system.

Callback Parameters

Parameter Type Description
status Object Status of response in Object {code: <status_code>, message: <status_message>}. For list of status code, see PFM Response Codes
data Object Data of response in Object in encrypted of {"id":"1234-1234-1234-1241","phone_number":"<phone_number>","bank_code":"<bank_code>","tx_history_start_date":<start_date_of_mutation>,"tx_history_end_date":<end_date_of_mutations>,"accounts":[{"id":"<account_id>","account_number":"<account_number>","account_type":"<account_type>","bank":{"code":"<bank_code>","name":"<bank_name>"},"balance":<current_balance>,"last_updated":<last_updated_date>,"mutation":[{"id":"<transaction_id>","category":"<category>","amount":<balance>,"balance_flow":<flow>,"transaction_date":<transaction_date>,"description":"<description>","status":"<status>"}]}]}

PFM Bank Codes

These are the lis of available bank on our PFM service:

Bank Code Bank Name
008 Mandiri
014 BCA
009 BNI
002 BRI
022 CIMB
013 Permata

PFM Response Codes

These are the list of possible status codes for PFM response status:

Status Code State Meaning
000 Final Response success without error
001 Final Processing login to internet banking
300 Final Failed
301 Final Failed Authentication
302 Final Error wrong encryption
303 Final Bank code is not valid
304 Final User consent is false
999 Final Internal Server Error

Fund Acceptance (Coming Soon)

There are two products that fall under the category of funds acceptance which are Payment Checkout and Invoicing.

Payment Checkout product will allow you to receive funds from your customers by choosing from our various payment channels such as bank transfer or credit/debit card.

Similarly, Invoicing will let you to bill your customers for service/items purchased by sending a payment checkout link to your customer's email by attatching/creating an invoice via our API.

All payment link and/or details can be monitored by using our dashboard and various API endpoints.

API Create (Payment Checkout)

An endpoint to create payment checkout URL which return parameters by encapsulation.

curl -X POST \
  https://partner.oyindonesia.com/api/payment-checkout/create \
  -H 'cache-control: no-cache' -H 'content-type: application/json' \
  -H 'x-api-key: apikeymu' -H 'x-oy-username: yourusername' \
  -d '{"username":"testaccount","partner_tx_id":"ABC123456527","sender_name":"Roberto F",
        "sender_note":"bill payment","sender_phone": "082114845847", "amount":75000,"is_open":false,"step":"select-payment-method",
        "list_disabled_payment_methods":"CC"; "DC" , "list_enabled_payment_banks": "008"; "014", "included_admin_fee": true, "expiration": 7,
        "description":"payment for March 2020"
    }'

HTTPS Request

POST https://partner.oyindonesia.com/api/payment-checkout/create

Json Response

{
        "success": true,
        "url": "https://pay.oyindonesia.com/v2?743826nfo3897hfdk113334"
}

Request Headers

Parameters Type Description
x-api-key String API Key for establishing connection to this particular endpoint
x-oy-username String The registered partner username which access is enabled for payment checkout product

Request Parameters

Parameters Type Description Limitation
username String The username used by partner for registration with OY! -
partner_tx_id String A unique transaction ID provided by partner. A partner_tx_id that has been succesfully paid cannot be used anymore under the same username and only accepts alphanumerics.
amount Integer The amount of a transaction to be paid. The amount that can be processed is between IDR 15,000 and IDR 25,000,000.
sender_name String Name of the payer for a transaction. Only accepts alphabets (A-Z) and space as input and cannot be empty.
sender_phone Numeric Phone number of the payer for a transaction. Do not use special character (e.g. "+") and cannot be empty.
sender_note String Additional notes from the payer for a transaction. Only accepts alphabets (A-Z), numeric (0-9) and space as input.
description String Description of the payment checkout link. Only accepts alphabets (A-Z), numeric (0-9) and space as input.
email String The email address where the payment checkout link will be sent to. -
include_admin_fee Boolean Admin fee will be added to the specified amount or amount inputted by user if this parameter is set as TRUE. -
list_disabled_payment_methods String To configure payment methods to be disabled (e.g. VA, CC, DC) There must be at least 1 payment method is enabled.
list_enabled_banks String To configure banks to be enabled for VA payment method. -
expiration Integer To set the expiration of the payment link in day(s). -
is_open Boolean Enable open/closed amount transaction method. If is_open = TRUE and the amount parameter is defined, then a payer can pay any amount (greater than IDR 15,000) up to the defined amount. And in the case that is_open=false, then the amount and partner_tx_id parameters must be defined. Once a partner_tx_id has ever been defined with is_open=false, the amount and the is_open parameters cannot be updated unless the transaction is completed for that particular partner_tx_id.
step String Accessing specific page of the payment checkout URL. Possible values for this parameter are either (input-amount, input-personal-info, select-payment-method). If step = input-personal-info then the amount parameter must be defined. And if step = select-payment-method then the amount and sender_name parameters must be defined.

Response Parameters

Parameter Type Description
success Boolean The username used by partner for registration with OY!
url String A unique transaction ID provided by partner

API Create (Invoicing)

Our Invoicing product is leveraging most parameters that are defined for our payment checkout in the above section with some additional parameters that are only applicable for Inovicing product.

curl -X POST \
  https://partner.oyindonesia.com/api/TBD\
  -H 'cache-control: no-cache' -H 'content-type: application/json' \
  -H 'x-api-key: apikeymu' -H 'x-oy-username: yourusername' \
  -d '{"username":"testaccount","partner_tx_id":"ABC123456527","sender_name":"Roberto F",
        "sender_note":"bill payment","sender_phone": "082114845847", "amount":75000,"is_open":false,"step":"select-payment-method",
        "list_disabled_payment_methods":"CC"; "DC" , "list_enabled_payment_banks": "008"; "014", "included_admin_fee": true, "expiration": 7,
        "description":"payment for March 2020", "partner_user_id": "merchant A", "is_va_lifetime" : true , "email" : "johnsmith@example.com"
    }'

HTTPS Request

POST https://partner.oyindonesia.com/api/TBD

Json Response

{
        "success": true,
        "url": "https://pay.oyindonesia.com/v2?783465983fnvsnjk73fsdf",
        "email_status" : "delivered"
}

Request Parameters

*Note: all parameters from API Create (Payment Checkout) are still applicable. Below is the list of the additional specific parameters for Invoicing product.

Parameters Type Description Limitation
full_name String The customer's full name. -
partner_user_id String Username assigned to the customer by partner. -
is_va_lifetime Boolean To enable VA static confirugation for a payment . If this is set as true and the partner_user_id is already associated to specific VAs, then the same VA numbers will be used for this partner_tx_id instead of generating new VA number. Partner_user_id and VA payment method must be specified to use this parameter.
invoice_items List List of items to be invoiced that can be generated via API in the following format: [item name, description, quantity, date of purchase, price per item ] -
attachments - Upload attachment to be sent by email and can be downloaded via the webview -

API Create (Recurring Invoice)

This endpoint is to enable the capability to send recurring invoice with the same invoice configuration (e.g. payment method, amount, attachments) via email.

curl -X POST \
  https://partner.oyindonesia.com/api/TBD\
  -H 'cache-control: no-cache' -H 'content-type: application/json' \
  -H 'x-api-key: apikeymu' -H 'x-oy-username: yourusername' \
  -d '{"username":"testaccount","partner_tx_id":"ABC123456527","sender_name":"Roberto F",
        "sender_note":"bill payment","sender_phone": "082114845847", "amount":75000,"is_open":false,"step":"select-payment-method",
        "list_disabled_payment_methods":"CC"; "DC" , "list_enabled_payment_banks": "008"; "014", "included_admin_fee": true, "expiration": 7,
        "description":"payment for March 2020", "partner_user_id": "merchant A", "is_va_lifetime" : true , "email" : "johnsmith@example.com",
        "recurring_start_date" : "10/11/2020", "recurring_end_date": "10/11/2021", "recurring_frequency": 30
    }'

HTTPS Request

POST https://partner.oyindonesia.com/api/TBD

Json Response

{
        "success": true,
        "url": "https://pay.oyindonesia.com/v2?98999987uydfuiwk73636hehnrm",
        "email_status" : "delivered"
}

Request Parameters

*Note: all parameters from API Create (Payment Checkout and Invoicing) are still applicable. Below is the list of the additional specific parameters for Recurring Invoice feature.

Parameters Type Description Limitation
recurring_start_date String Defining the date when the first invoice will be sent. -
recurring_end_date String Username assigned to the customer by partner. -
recurring_frequency Integer The interval of a recurring invoice to be sent to customers (in days). -

Callback Parameters

The data on the callback will be sent using JSON format via POST data to your web hook. Check here for example: example

Parameter Type Description
partner_tx_id String A unique transaction ID provided by partner
tx_ref_number String OY's internal unique transaction ID
amount BigDecimal The amount of a transaction that is paid
sender_name String Name of a payer for a transaction
sender_phone String Phone number of a payer for a transaction
sender_note String Additional notes from a payer for a transaction
status String The status of a transaction (e.g. success/failed/processing)
sender_bank String The bank code used by a payer to do payment
payment_method String The payment method used in a transaction such as CC (Credit Card), DC (Debit Card) or VA (Virtual Account)
va_number String VA number to be used on payment if using Virtual Account
settlement_type String Indicate if a transaction will be settled in realtime/non-realtime
created DateTime The timestamp which indicates the creation time of a payment checkout link
updated DateTime The timestamp which indicates the latest updated time of a payment checkout link due to status update

Callback Response Codes

Payment Status Type Payment Method Description
waiting_payment String Bank Transfer Payer triggers a payment status check for an unpaid VA
expired_va String Bank Transfer An unpaid VA has expired and payer can retry a payment
charge_in_progress String Card OTP for card payment method has been succesfully entered and processed
charge_sucess String Bank Transfer/Card A payment has been successfully received by OY
charge_failed String Card OTP for card payment method has been succesfully entered but payment is rejected
disburse_in_progress String Bank Transfer/Card For "Realtime" settlement option, disbursement is currently in progress to partner's registered bank account
complete String Bank Transfer/Card For "Realtime" settlement option, disbursement has been succesfully executed and received by partner
closed String N/A Payment checkout link is deleted

API Callback

An endpoint to retrieve and/or re-send the latest callback status of a transaction. We can also provide a static IP for the callback to ensure the callback sent is from OY that can be whitelisted by partners.

Please contact us to submit a request of an API Key and IP whitelisting.

HTTPS Request

GET https://partner.oyindonesia.com/api/payment-checkout/status

To retrieve a callback result for a particular transaction, use following code from your platform:

curl -X GET 'https://partner.oyindonesia.com/api/payment-checkout/status?partner_tx_id=OY123456&send_callback=false' -H 'x-oy-username:yourusername' -H ' x-api-key:yourapikey'

The above command returns JSON structured similar like this:

{
  "partner_tx_id": "partner000001",
  "tx_ref_number": "1234567",
  "amount": 15000,
  "sender_name": "Joko Widodo",
  "sender_phone": "+6281111111",
  "sender_note": "Mohon dikirim segera",
  "status": "success",
  "settlement_type": "realtime",
  "sender_bank": "008",
  "payment_method": "DC",
  "va_number" : ""
}

Request Headers

Parameters Type Description
x-api-key String API Key for establishing connection to this particular endpoint
x-oy-username String The registered partner username which access is enabled for payment checkout product

Request Parameters

Parameters Type Description
partner_tx_id String A unique transaction ID which callback status to be checked
send_callback Boolean A flag to indiciate if the latest callback of a transaction need to be re-sent or not

Response Parameters

Parameter Type Description
partner_tx_id String A unique transaction ID provided by partner
tx_ref_number String OY's internal unique transaction ID
amount BigDecimal The amount of a transaction that is paid
sender_name String Name of a payer for a transaction
sender_phone String Phone number of a payer for a transaction
sender_note String Additional notes from a payer for a transaction
status String The status of a transaction
sender_bank String The bank code used by a payer to do payment
payment_method String The payment method used in a transaction such as CC (Credit Card), DC (Debit Card) or VA (Virtual Account)
va_number String VA number to be used on payment if using Virtual Account
settlement_type String Indicate if a transaction will be settled in realtime/non-realtime
created String The timestamp which indicates the creation time of a payment checkout link
updated String The timestamp which indicates the latest updated time of a payment checkout link due to status update

API Delete

An endpoint to delete a payment/invoice URL that is still active and a payment method has not been selected.

curl -X POST \
  https://partner.oyindonesia.com/api/TBD\
  -H 'cache-control: no-cache' -H 'content-type: application/json' \
  -H 'x-api-key: apikeymu' -H 'x-oy-username: yourusername' \
  -d '{"partner_tx_id":"ABC123456527","reason": "wrong partner tx id assignment"
    }'

HTTPS Request

POST https://partner.oyindonesia.com/api/payment-checkout/TBD

The above command returns JSON structured similar like this:

{
  "created_time" : "08/07/2020 15:32:22",
  "updated_time" : "15/07/2020 21:22:13",
  "status" : "Closed"
}

Request Parameters

Parameters Type Description Limitation
created_time String The timestamp when the URL is created. -
updated_time String The timestamp when the URL is closed. -
status Integer The status indicator that a URL has been successfully closed. -