WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Wallets
  • Online payments
    • Quick Start
    • Integration overview
    • Wooshpay JS SDK
    • Wooshpay Checkout
    • Wooshpay Direct API
    • Payment Link
    • Authorize and capture
    • Build subscriptions integration
    • Testing cards
  • After the payment
    • Payouts
    • Webhook
    • Check the webhook signatures
    • 校验webhook签名
  • Add more payment methods
    • Supported payment method
    • Cards
    • Wallets
      • Alipay
      • Alipay HK
      • Apple Pay
      • Google Pay
      • Wechat Pay
      • 微信支付
      • Kakao Pay
      • DANA
      • Boost
      • Grabpay
      • Mcash
      • Touch'n Go
      • ShopeePay
      • UnionPay
      • 9Pay
      • OVO
      • GCash
      • TrueMoney
    • Bank redirects
      • Bancontact
      • BPI
      • Trustly
      • EPS
      • Giropay
      • iDEAL
      • Przelewy24
      • FPX
    • Buy Now Pay Later
      • Klarna
    • Bank Debits
      • Sepa Direct Debit
    • Bank Transfer
      • Bank Transfer in Europe
      • Bank Transfer in United Kingdom
      • Bank Transfer in Indonesia
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time payments
      • PIX
      • PayNow
      • UPI
      • SPEI
  • More payment scenarios
    • Set up future payments
    • Save payment method during payment
  • SaaS platform integration
    • Shopify Plugin
    • Shopastro 星盘
    • WooCommerce
    • Shoplazza 店匠
    • Shopline Plugin
    • Sage Connection
  • Resources
    • Supported currencies
  1. Wallets

Mcash

Mcash is one of the popular payment options in Malaysia with more than 500,000 community members, utilizing its micro-payment services at more than 10,000 merchants networks, bill payment, airtime reload, e-parking, and other attractive & rewarding features. This payment option allows customers to complete their payments by using e-wallets or online banking.

Features#

Processing currenciesMYR
Settlement currenciesUSD
Minimum transaction amount0.01 MYR
Maximum transaction amount2500 MYR
Refunds❌
Partial Refunds❌
Multiple partial refund❌
Chargeback❌

Integration Method#

Payment method enumeration values: mcash
There is integration method for Mcash
1.
Direct API
2.
Checkout

Direct API#

How to integration#

For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
Create a PaymentIntent
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add mcash to the list of payment method types.
Request Create a PaymentIntent
{
    "amount": 100,
    "currency": "MYR",
    "confirm": true,
    "payment_method_data": {
        "type": "mcash"
    },
    "return_url": "https://www.baidu.com"
}
Response
{
    "id": "pi_1746739336788836352",
    "object": "payment_intent",
    "created": 1705290085000,
    "livemode": true,
    "currency": "MYR",
    "amount": 100,
    "status": "requires_action",
    "client_secret": "pi_1746739336788836352_secret_aZ7BhxaogQOUj6SLE6MryW2m",
    "next_action": {
        "type": "mcash_handle_redirect",
        "mcash_handle_redirect": {
            "url": "https://api.wooshpay.com/v1/receives/c12/pay/pi_1746739336788836352"
        }
    },
    "payment_method_types": [
        "mcash"
    ],
    "confirmation_method": "automatic",
    "return_url": "https://www.baidu.com",
    "payment_method": "pm_1746739336692367360",
    "capture_method": "automatic"
}

Checkout#

Payment flow#

1.
Customer selects Mcash from the list of payment methods available and clicks on the Pay botton
0ccf3e48-d7c9-49d2-b901-49a7b3e7957a.png
2.
Customers will be redirected to Mcash's page. Scan QR and approve the payment
84034c45-f329-4e85-a544-1361eb0a8a20.png

Create a Session#

Request
{
    "cancel_url": "www.wooshpay.com",
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "payment_method_types": ["mcash"],
    "line_items": [
        {
            "price_data": {
                "currency": "PHP",
                "unit_amount": 1000,
                "nickname": "apple",
                "product_data": {
                    "name": "apple",
                    "description": "very delicious",
                    "url": "www.wooshpay.com"
                }
            },
            "quantity": 1
        }
    ]
}
Response
{
    "id": "cs_1747086874888896512",
    "object": "checkout.session",
    "created": 1705372945000,
    "livemode": true,
    "currency": "PHP",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkout.wooshpay.com/pay/cs_1747086874888896512?key=cGtfbGl2ZV9OVEUxT1RVMk1UWTJPVFl6T0RrNU9UWTFORFF4T2tGYVFtaFZPRmt4UlRWS01GUm5jbkpPY25kSFNtZHBVREUyTmpreU5UazJOREF5TlRVPQ==",
    "cancel_url": "www.wooshpay.com",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1747086874909868032",
                "object": "item",
                "currency": "PHP",
                "description": "apple",
                "price": {
                    "id": "price_1747086874918256640",
                    "object": "price",
                    "created": 1705372945000,
                    "livemode": true,
                    "active": false,
                    "currency": "PHP",
                    "nickname": "apple",
                    "product": {
                        "id": "prod_1747086874930839552",
                        "object": "product",
                        "created": 1705372945000,
                        "livemode": true,
                        "active": false,
                        "description": "very delicious",
                        "name": "apple",
                        "url": "www.wooshpay.com",
                        "updated": 1705372945000
                    },
                    "type": "one_time",
                    "unit_amount": 1000,
                    "billing_scheme": "per_unit"
                },
                "quantity": 1,
                "amount_subtotal": 1000,
                "amount_total": 1000
            }
        ]
    },
    "payment_intent": "pi_1747086876705030144",
    "payment_method_types": [
        "mcash"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 1000,
    "amount_total": 1000,
    "billing_address_collection": "auto",
    "expires_at": 1705459344937,
    "payment_link": "",
    "client_secret": "pi_1747086876705030144_secret_ulML07OMYByRHYtPSQjO5Zrq"
}

Next step#

You can add more features to your integration as needed

Create a Webhook#

Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.

Create a Refund#

Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.
Modified at 2024-03-11 02:02:22
Previous
Grabpay
Next
Touch'n Go
Built with