Payment Intent


POST /api/v2/payment-intents

Initialize payment intent request to Bayarcash. Make sure your account is enabled for selected payment channel. By default only FPX channel is activated.


NameDescriptionTypeCondition

payment_channel

integer

Required

portal_key

Portal key retrieve from Bayarcash console

string

Required

order_number

string

Required

amount

integer

Required

payer_name

string

Required

payer_email

string

Required

payer_telephone_number

Currently we only accept Malaysia number

integer

Optional

payer_bank_code

string

Optional

payer_bank_name

string

Optional

metadata

Currently only support order items from WooCommerce plugin

string

Optional

return_url

Callback data will be sent to this URL

string

Optional

platform_id

string

Optional

checksum

string

Optional


Sending via command line using cURL.

curl -X POST https://console.bayar.cash/api/v2/payment-intents \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <Personal_Access_Token>' \
  --data-raw '{
        "payment_channel": 5,
        "portal_key": string,
        "order_number": string,
        "amount": 100,
        "payer_name": string,
        "payer_email": string,
        "payer_telephone_number": integer,
        "payer_bank_code": string,
        "payer_bank_name": string,
        "metadata": string,
        "return_url": string,
        "platform_id": string,
        "checksum": string
      }'

JSON structured response.

{
    "payer_name": "Mohd Ali",
    "payer_email": "mohd.ali@gmail.com",
    "payer_telephone_number": "60193000123",
    "order_number": "1351",
    "amount": "21.10",
    "url": "https://console.bayar.cash/payment-intent/pi_MGWpzp"
}


Payment Channel

Make sure you have activate selected payment channel before making any request to our endpoint.

CodeDescription

1

FPX (Default payment channel)

2

Manual Bank Transfer

3

Direct Debit (enrollment, maintenance and termination via FPX)

4

FPX Line of Credit

5

DuitNow Online Banking/Wallets

6

DuitNow QR

7

SPayLater (BNPL from Shopee)

8

Boost PayFlex (BNPL from Boost)

9

QRIS Indonesia Online Banking

10

QRIS Indonesia eWallet

Last updated