[SG] 2023-12-05 API Enhancements

API Enhancements

Target deployment date: 5th December 2023 (Tuesday) at 3:30 PM SGT

New Features / Enhancements

  1. New Currency Field
    1. We have added the currency field to provide information about the currency associated with the transaction. This addition is in preparation for our future support of multiple currencies.
  2. Enhanced Validation for the Description Field
    1. Strengthening validation on the referenceId and Description field to enhance security and mitigate potential vulnerabilities. This enhancement is now enabled in the Sandbox environment.

Impacted Endpoints

  1. Accept APIs
    1. Create a payment
    2. Get a payment
    3. Get a list of payments
    4. Get a list of payments for a payment method
    5. Webhook on Accept
  2. Send APIs
    1. Create a disbursement
    2. Get a disbursement
    3. Get a list of disbursements
    4. Webhook on Send
New Fields / New ValueMandatory/ Conditional Mandatory / OptionalImpacted EndpointsExplanation
currencyOptional1. Accept APIs
2. Send APIs
To specify the currency for your payments and disbursements.

At the moment, we only support the currency code SGD.
referenceIdMandatory1. Create a payment
2. Create a payment method
3. Create a disbursement
New validation - the following character sets are the only acceptable ones:

- Lowercase letters: a-z
- Uppercase letters: A-Z
- Numerals: 0-9
- Special characters: ! # $ % & ' ( ) * + , - . / : ; '= ? @ [ ] ^ _ ` { | } ~
- Space character
descriptionOptional1. Create a payment
2. Create a payment method
3. Create a disbursement
New validation - the following character sets are the only acceptable ones:

- Lowercase letters: a-z
- Uppercase letters: A-Z
- Numerals: 0-9
- Special characters: ! # $ % & ' ( ) * + , - . / : ; '= ? @ [ ] ^ _ ` { | } ~
- Space character

Currency field changes

Create a payment API changes

{
   "data":{
      "attributes":{
         "amount":101.0,
         "referenceId":"ORDER_0002",
         "description":"This is the first order",
         "paymentMethodType":"virtual_bank_account",
         "paymentMethodOptions":{
            "bankShortCode":"fazz"
         },
         "expiredAt":"2023-06-20T17:48:42+07:00"
      }
   }
}
{
   "data":{
      "attributes":{
         "currency":"SGD",
         "amount":101.0,
         "referenceId":"ORDER_0002",
         "description":"This is the first order",
         "paymentMethodType":"virtual_bank_account",
         "paymentMethodOptions":{
            "bankShortCode":"fazz"
         },
         "expiredAt":"2023-06-20T17:48:42+07:00"
      }
   }
}
{
   "data":{
      "id":"order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
      "type":"payment",
      "attributes":{
         "status":"pending",
         "amount":"101.0",
         "createdAt":"2022-09-05T14:35:21+08:00",
         "description":"This is the first order",
         "expiredAt":"2023-06-20T17:48:42+07:00",
         "referenceId":"ORDER_0002",
         "fees":"0.0",
         "paymentMethod":{
            "id":"ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
            "type":"virtual_bank_account",
            "instructions":{
               "bankShortCode":"FAZZ",
               "bankName":"Xfers Pte Ltd",
               "accountNo":"5009369267401"
            },
            "referenceId":"ORDER_0002"
         }
      }
   }
}
{
   "data":{
      "id":"order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
      "type":"payment",
      "attributes":{
         "status":"pending",
         "currency":"SGD",
         "amount":"101.0",
         "createdAt":"2022-09-05T14:35:21+08:00",
         "description":"This is the first order",
         "expiredAt":"2023-06-20T17:48:42+07:00",
         "referenceId":"ORDER_0002",
         "fees":"0.0",
         "paymentMethod":{
            "id":"ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
            "type":"virtual_bank_account",
            "instructions":{
               "bankShortCode":"FAZZ",
               "bankName":"Xfers Pte Ltd",
               "accountNo":"5009369267401"
            },
            "referenceId":"ORDER_0002"
         }
      }
   }
}

Get a payment API changes / Webhook on Accept

{
  "data": {
    "id": "order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
    "type": "payment",
    "attributes": {
      "status": "pending",
      "amount": "101.0",
      "createdAt": "2022-09-05T14:35:21+08:00",
      "description": "This is the first order",
      "expiredAt": "2023-06-20T17:48:42+07:00",
      "referenceId": "ORDER_0002",
      "fees": "0.0",
      "paymentMethod": {
        "id": "ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
        "type": "virtual_bank_account",
        "instructions": {
          "bankShortCode": "FAZZ",
          "accountNo": "5009369267401"
        },
        "referenceId": "ORDER_0002"
      },
      "senderInformation": {
        "accountHolderName": "Jonathan",
        "accountNumber": "1234567890",
        "bankName": "DBS Bank Ltd",
        "swiftBic": "DBSSSGSGXXX"
      }
    }
  }
}
{
   "data":{
      "id":"order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
      "type":"payment",
      "attributes":{
         "status":"pending",
         "currency":"SGD",
         "amount":"101.0",
         "createdAt":"2022-09-05T14:35:21+08:00",
         "description":"This is the first order",
         "expiredAt":"2023-06-20T17:48:42+07:00",
         "referenceId":"ORDER_0002",
         "fees":"0.0",
         "paymentMethod":{
            "id":"ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
            "type":"virtual_bank_account",
            "instructions":{
               "bankShortCode":"FAZZ",
               "accountNo":"5009369267401"
            },
            "referenceId":"ORDER_0002"
         },
         "senderInformation":{
            "accountHolderName":"Jonathan",
            "accountNumber":"1234567890",
            "bankName":"DBS Bank Ltd",
            "swiftBic":"DBSSSGSGXXX"
         }
      }
   }
}

Get a list of payment API changes

{
   "data":[
      {
         "id":"order_26f7bc94-6893-4720-9f9b-ea2f8b96d22e",
         "type":"payment",
         "attributes":{
            "status":"expired",
            "amount":"1.0",
            "createdAt":"2022-09-05T15:22:41+08:00",
            "description":"This is Fazz VA Penny Test for over 20K should be rejected",
            "expiredAt":"2022-09-04T23:20:00+08:00",
            "referenceId":"FazzVA20KTest-220904-1",
            "fees":"0.0",
            "paymentMethod":{
               "id":"9e0248fa-476b-4f2f-8fa6-9688a1ef583b",
               "type":"virtual_bank_account",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "accountNo":"5009173461042"
               },
               "referenceId":"FazzVA20KTest-220904-1",
               "senderInformation":{
                  "accountHolderName":"Allan",
                  "accountNumber":"1234567890",
                  "bankName":"United Overseas Bank Ltd",
                  "swiftBic":"UOVBSGSGXXX"
               }
            }
         }
      },
      {
         "id":"order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
         "type":"payment",
         "attributes":{
            "status":"pending",
            "amount":"101.0",
            "createdAt":"2022-09-05T14:35:21+08:00",
            "description":"This is the first order",
            "expiredAt":"2023-06-20T17:48:42+07:00",
            "referenceId":"ORDER_0002",
            "fees":"0.0",
            "paymentMethod":{
               "id":"ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
               "type":"virtual_bank_account",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "accountNo":"5009369267401"
               },
               "referenceId":"ORDER_0002",
               "senderInformation":{
                  "accountHolderName":"Jonathan",
                  "accountNumber":"1234567890",
                  "bankName":"DBS Bank Ltd",
                  "swiftBic":"DBSSSGSGXXX"
               }
            }
         }
      }
   ]
}
{
   "data":[
      {
         "id":"order_26f7bc94-6893-4720-9f9b-ea2f8b96d22e",
         "type":"payment",
         "attributes":{
            "status":"expired",
            "currency":"SGD",
            "amount":"1.0",
            "createdAt":"2022-09-05T15:22:41+08:00",
            "description":"This is Fazz VA Penny Test for over 20K should be rejected",
            "expiredAt":"2022-09-04T23:20:00+08:00",
            "referenceId":"FazzVA20KTest-220904-1",
            "fees":"0.0",
            "paymentMethod":{
               "id":"9e0248fa-476b-4f2f-8fa6-9688a1ef583b",
               "type":"virtual_bank_account",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "accountNo":"5009173461042"
               },
               "referenceId":"FazzVA20KTest-220904-1",
               "senderInformation":{
                  "accountHolderName":"Allan",
                  "accountNumber":"1234567890",
                  "bankName":"United Overseas Bank Ltd",
                  "swiftBic":"UOVBSGSGXXX"
               }
            }
         }
      },
      {
         "id":"order_47bc8cfc-5dea-47a5-9023-f4434eea5559",
         "type":"payment",
         "attributes":{
            "status":"pending",
            "amount":"101.0",
            "createdAt":"2022-09-05T14:35:21+08:00",
            "description":"This is the first order",
            "expiredAt":"2023-06-20T17:48:42+07:00",
            "referenceId":"ORDER_0002",
            "fees":"0.0",
            "paymentMethod":{
               "id":"ce4ef778-5b87-4f87-b8b0-6b32bc32507a",
               "type":"virtual_bank_account",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "accountNo":"5009369267401"
               },
               "referenceId":"ORDER_0002",
               "senderInformation":{
                  "accountHolderName":"Jonathan",
                  "accountNumber":"1234567890",
                  "bankName":"DBS Bank Ltd",
                  "swiftBic":"DBSSSGSGXXX"
               }
            }
         }
      }
   ]
}

Get a list of payments for a payment method changes

{
   "data":[
      {
         "id":"order_7abf6bb130d44c02862982ff6022875d",
         "type":"payment",
         "attributes":{
            "status":"paid",
            "amount":"110000.0",
            "createdAt":"2020-08-14T14:35:24+07:00",
            "description":null,
            "expiredAt":null,
            "referenceId":"external_id_b470bc6356",
            "fees":"3630.0",
            "paymentMethod":{
               "type":"virtual_bank_account",
               "referenceId":"va_reference_id",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "bankName":"Xfers Pte Ltd",
                  "accountNo":"344383189127"
               }
            },
            "senderInformation":{
               "accountHolderName":"Jonathan",
               "accountNumber":"1234567890",
               "bankName":"DBS Bank Ltd",
               "swiftBic":"DBSSSGSGXXX"
            }
         }
      },
      {
         "id":"order_0266212d3c744aceb5de0e48fa6d730b",
         "type":"payment",
         "attributes":{
            "status":"paid",
            "amount":"80000.0",
            "createdAt":"2020-08-14T14:32:33+07:00",
            "description":null,
            "expiredAt":null,
            "referenceId":"external_id_1a5fefff02",
            "fees":"3630.0",
            "paymentMethod":{
               "type":"virtual_bank_account",
               "referenceId":"va_reference_id",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "bankName":"Xfers Pte Ltd",
                  "accountNo":"344383189127"
               }
            },
            "senderInformation":{
               "accountHolderName":"Jonathan",
               "accountNumber":"1234567890",
               "bankName":"DBS Bank Ltd",
               "swiftBic":"DBSSSGSGXXX"
            }
         }
      }
   ]
}
{
   "data":[
      {
         "id":"order_7abf6bb130d44c02862982ff6022875d",
         "type":"payment",
         "attributes":{
            "status":"paid",
            "currency":"SGD",
            "amount":"110000.0",
            "createdAt":"2020-08-14T14:35:24+07:00",
            "description":null,
            "expiredAt":null,
            "referenceId":"external_id_b470bc6356",
            "fees":"3630.0",
            "paymentMethod":{
               "type":"virtual_bank_account",
               "referenceId":"va_reference_id",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "bankName":"Xfers Pte Ltd",
                  "accountNo":"344383189127"
               }
            },
            "senderInformation":{
               "accountHolderName":"Jonathan",
               "accountNumber":"1234567890",
               "bankName":"DBS Bank Ltd",
               "swiftBic":"DBSSSGSGXXX"
            }
         }
      },
      {
         "id":"order_0266212d3c744aceb5de0e48fa6d730b",
         "type":"payment",
         "attributes":{
            "status":"paid",
            "currency":"SGD",
            "amount":"80000.0",
            "createdAt":"2020-08-14T14:32:33+07:00",
            "description":null,
            "expiredAt":null,
            "referenceId":"external_id_1a5fefff02",
            "fees":"3630.0",
            "paymentMethod":{
               "type":"virtual_bank_account",
               "referenceId":"va_reference_id",
               "instructions":{
                  "bankShortCode":"FAZZ",
                  "bankName":"Xfers Pte Ltd",
                  "accountNo":"344383189127"
               }
            },
            "senderInformation":{
               "accountHolderName":"Jonathan",
               "accountNumber":"1234567890",
               "bankName":"DBS Bank Ltd",
               "swiftBic":"DBSSSGSGXXX"
            }
         }
      }
   ]
}

Create a disbursement changes

{
   "data":{
      "attributes":{
         "amount":"1000",
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankShortCode":"DBS",
            "bankAccountNo":"0102030405",
            "bankAccountHolderName":"Gracius"
         }
      }
   }
}
{
   "data":{
      "attributes":{
         "amount":"1000",
         "currency":"SGD",
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankShortCode":"DBS",
            "bankAccountNo":"0102030405",
            "bankAccountHolderName":"Gracius"
         }
      }
   }
}
{
   "data":{
      "id":"order_86dd84f9-bd2e-4bee-a882-3ee310a3ac1a",
      "type":"disbursement",
      "attributes":{
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "amount":"1000",
         "status":"completed",
         "createdAt":"2020-08-20T10:19:49+08:00",
         "fees":"0.20",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankAccountNo":"511000000000",
            "bankAccountHolderName":"FAZZ",
            "bankShortCode":"OCBC",
            "bankName":"Oversea-Chinese Banking Corporation Limited",
            "endToEndId":"f2fcfd075b3a5bd53a8b-Deposit",
            "failureCode":null,
            "failureReason":null
         }
      }
   }
}
{
   "data":{
      "id":"order_86dd84f9-bd2e-4bee-a882-3ee310a3ac1a",
      "type":"disbursement",
      "attributes":{
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "currency":"SGD",
         "amount":"1000",
         "status":"completed",
         "createdAt":"2020-08-20T10:19:49+08:00",
         "fees":"0.20",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankAccountNo":"511000000000",
            "bankAccountHolderName":"FAZZ",
            "bankShortCode":"OCBC",
            "bankName":"Oversea-Chinese Banking Corporation Limited",
            "endToEndId":"f2fcfd075b3a5bd53a8b-Deposit",
            "failureCode":null,
            "failureReason":null
         }
      }
   }
}

Get a disbursement changes / Webhook on Send

{
   "data":{
      "id":"contract_1a2b3c4d5e6f7890",
      "type":"disbursement",
      "attributes":{
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "amount":"1000.0",
         "status":"failed",
         "createdAt":"2020-03-27T23:59:59+07:00",
         "fees":"5.0",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankShortCode":"MBB",
            "bankAccountNo":"0102030405",
            "serverBankAccountHolderName":null,
            "bankName":"Malayan Banking Berhad",
            "failureCode":"1010",
            "failureReason":"The account number is invalid.",
            "endToEndId":"c5c1968c274faba63410-Withdrawal"
         }
      }
   }
}
{
   "data":{
      "id":"contract_1a2b3c4d5e6f7890",
      "type":"disbursement",
      "attributes":{
         "referenceId":"order_id_123456",
         "description":"Your delivery payout.",
         "currency":"SGD",
         "amount":"1000.0",
         "status":"failed",
         "createdAt":"2020-03-27T23:59:59+07:00",
         "fees":"5.0",
         "disbursementMethod":{
            "type":"bank_transfer",
            "bankShortCode":"MBB",
            "bankAccountNo":"0102030405",
            "serverBankAccountHolderName":null,
            "bankName":"Malayan Banking Berhad",
            "failureCode":"1010",
            "failureReason":"The account number is invalid.",
            "endToEndId":"c5c1968c274faba63410-Withdrawal"
         }
      }
   }
}

Get a list of disbursements changes

{
   "data":[
      {
         "id":"contract_1a2b3c4d5e6f7890",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_123456",
            "description":"Your delivery payout.",
            "amount":"1000.0",
            "status":"processing",
            "createdAt":"2020-03-27T23:59:59+07:00",
            "fees":"5.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"DBS",
               "bankAccountNo":"0102030405",
               "serverBankAccountHolderName":null,
               "bankName":"Development Bank of Singapore",
               "failureCode":null,
               "failureReason":null,
               "endToEndId":"order_id_123456"
            }
         }
      },
      {
         "id":"contract_1a2b3c4d5e6f7891",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_456789",
            "description":"Your delivery payout.",
            "amount":"2000.0",
            "status":"processing",
            "createdAt":"2020-03-28T23:59:59+07:00",
            "fees":"10.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"UOB",
               "bankAccountNo":"0102030406",
               "serverBankAccountHolderName":null,
               "bankName":"United Overseas Bank",
               "failureCode":null,
               "failureReason":null,
               "endToEndId":"order_id_456789"
            }
         }
      },
      {
         "id":"contract_1a2b3c4d5e6f7890",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_123456",
            "description":"Your delivery payout.",
            "amount":"1000.0",
            "status":"failed",
            "createdAt":"2020-03-27T23:59:59+07:00",
            "fees":"5.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"MBB",
               "bankAccountNo":"13245667",
               "serverBankAccountHolderName":null,
               "bankName":"Malayan Banking Berhad",
               "failureCode":"1010",
               "failureReason":"The account number is invalid.",
               "endToEndId":"c5c1968c274faba63410-Withdrawal"
            }
         }
      }
   ]
}
{
   "data":[
      {
         "id":"contract_1a2b3c4d5e6f7890",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_123456",
            "description":"Your delivery payout.",
            "currency":"SGD",
            "amount":"1000.0",
            "status":"processing",
            "createdAt":"2020-03-27T23:59:59+07:00",
            "fees":"5.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"DBS",
               "bankAccountNo":"0102030405",
               "serverBankAccountHolderName":null,
               "bankName":"Development Bank of Singapore",
               "failureCode":null,
               "failureReason":null,
               "endToEndId":"order_id_123456"
            }
         }
      },
      {
         "id":"contract_1a2b3c4d5e6f7891",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_456789",
            "description":"Your delivery payout.",
            "currency":"SGD",
            "amount":"2000.0",
            "status":"processing",
            "createdAt":"2020-03-28T23:59:59+07:00",
            "fees":"10.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"UOB",
               "bankAccountNo":"0102030406",
               "serverBankAccountHolderName":null,
               "bankName":"United Overseas Bank",
               "failureCode":null,
               "failureReason":null,
               "endToEndId":"order_id_456789"
            }
         }
      },
      {
         "id":"contract_1a2b3c4d5e6f7890",
         "type":"disbursement",
         "attributes":{
            "referenceId":"order_id_123456",
            "description":"Your delivery payout.",
            "currency":"SGD",
            "amount":"1000.0",
            "status":"failed",
            "createdAt":"2020-03-27T23:59:59+07:00",
            "fees":"5.0",
            "disbursementMethod":{
               "type":"bank_transfer",
               "bankShortCode":"MBB",
               "bankAccountNo":"13245667",
               "serverBankAccountHolderName":null,
               "bankName":"Malayan Banking Berhad",
               "failureCode":"1010",
               "failureReason":"The account number is invalid.",
               "endToEndId":"c5c1968c274faba63410-Withdrawal"
            }
         }
      }
   ]
}