As a merchant, you need to provide callback URLs to the Ayoconnect Virtual Account team during the onboarding process.

After the merchant's customer makes a successful payment on a created Virtual Account number, Ayoconnect will send you a callback to notify that a payment has been made.

Only POST requests are allowed and a 201 HTTP response code is expected for all the callbacks.

If a 40X or 50X HTTP response code is returned, the process won't continue.

In case of any other error, Ayoconnect will try to send the callback 3 more times after 5, 10, and 30 seconds. After this, no further attempt will be made.

Callback sample request:

{  
  "code": 200,  
  "message": "ok",  
  "virtualAccountData": {  
    "virtualAccountId": "2405121557574135743HROOUVXY",  
    "virtualAccountNumber": "1896520138004558",  
    "virtualAccountStatus": "PAID",  
    "virtualAccountName": "AyoconnectTest",  
    "virtualAccountPhone": "62988484815",  
    "correlationId": "1237000000001000123456789024475k",  
    "customerId": "AYOPOP-GCINRJ2946",  
    "totalAmount": {  
      "value": "25000.00",  
      "currency": "IDR"  
    },  
    "billAmount": {  
      "value": "12500.00",  
      "currency": "IDR"  
    },  
    "adminFee": {  
      "value": "2500.00",  
      "currency": "IDR"  
    },  
    "billDetails": [  
      {  
        "billName": "API Product",  
        "billAmount": {  
          "value": "12500.00",  
          "currency": "IDR"  
        },  
        "billDescription": {  
          "english": "Virtual account transaction",  
          "indonesia": "Transaksi akun virtual"  
        }  
      }  
    ],  
    "paymentDetails": {  
      "trxRefID": "2362",  
      "amount": "12500.00"  
    }  
  }  
}

Callback headers

The following headers are included in all the callbacks received from Ayoconnect:

HeaderValueDescription
Acceptapplication/jsonAccept type of the response body
Content-Typeapplication/jsonContent type of the request body

Callback fields

The following parameters are included in the callbacks received from Ayoconnect:

NameTypeRequiredExampleDescription
codeintY200Product response code
messagestringYokResponse message
virtualAccountDataJSON ObjectY{}Details of the Virtual Account

This is the structure of the 'virtualAccountData' field:

NameTypeRequiredExampleDescription
virtualAccountIdstringYcwr4gmbiihdh2yk7cveah1p7loeUnique identifier (27 alphanumeric characters) to identify the associated Virtual Account
virtualAccountNumberstringY8888800145536217Unique identifier (16 numeric characters) to do transactions on a Virtual Account
virtualAccountStatusstringYPAIDStatus of the Virtual Account number
virtualAccountNamestringYAyoconnectReturned by the 'Create Virtual Account' API. Name of the customer
virtualAccountPhonestringY62796335646Returned by the 'Create Virtual Account' API. Phone number of the customer
correlationIdstringY1j7grzo76qx7lnihy5fctk563petjk45Unique identifier used while generating the Virtual Account
customerIdstringYAYOAPP-559PAC23Ayoconnect's CustomerId. AlphaNumeric.
totalAmountJSON ObjectY{"value": "25000.00", "currency": "IDR"}Total amount the customer has paid successfully historically through this Virtual Account number
billAmountJSON ObjectY{"value": "12500.00", "currency": "IDR"}The amount received by the client from this transaction after the fees
adminFeeJSON ObjectY{"value": "2500.00", "currency": "IDR"}The total fees charged to the client for this transaction
billDetailsarrayY[]The breakdown of the transaction details including item name, item value, and description given to Ayoconnect by the client. A list with one item only
paymentDetailsJSON ObjectY{"value": "12500.00", "currency": "IDR"}The amount paid by the customer for this transaction

List of 'billDetails' contains JSON Object with fields:

NameTypeRequiredExampleDescription
billNamestringYAPI ProductReturned by the 'Create a Virtual Account' API
billAmountJSON ObjectY{"value": "12500.00", "currency": "IDR"}Returned by the 'Create a Virtual Account' API
billDescriptionJSON ObjectN{"english": "Va trx", "indonesia": "Transaksi va"}