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

GCash

GCash is an all-in-one app that allows users to safely make online and in-store payments, as well as mobile top ups and bill payments.

Features#

Processing currenciesPHP
Settlement currenciesGBP,USD,EUR,HKD
Minimum transaction amount1 PHP
Maximum transaction amountNo Transaction Limit
Refunds✅
Partial Refunds✅
Multiple partial refund❌
Chargeback❌

Integration Method#

Payment method enumeration values: gcash
There is integration method for GCash
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 gcash to the list of payment method types.
Request
{
    "amount":30000,
    "currency":"PHP",
    "confirm":true,
    "payment_method_options":{
        "gcash":{
            "terminal_type":"WEB"
        }
    },
    "payment_method_data":{
        "type":"gcash"
    },
    "merchant_order_id":"商户订单号",
    "return_url":"https://wooshpay.com"
}
Response
{
    "id": "pi_1692411609156157440",
    "object": "payment_intent",
    "created": 1692337346000,
    "livemode": false,
    "currency": "PHP",
    "amount": 30000,
    "status": "requires_action",
    "merchant_order_id": "商户订单号",
    "client_secret": "pi_1692411609156157440_secret_LTUJaQca5yi6krhonAQoGUL8",
    "next_action": {
        "type": "redirect_to_url",
        "gcash_handle_redirect": {
            "url": "https://open-sea-global.alipayplus.com/api/open/v1/ac/cashier/self/codevalue/checkout.htm?codeValue=2816660400932RVP49jpe2t3Jz6HrZO304ax&loadMode=2"
        }
    },
    "payment_method_types": [
        "gcash"
    ],
    "confirmation_method": "automatic",
    "payment_method_options": {
        "gcash": {
            "terminal_type": "WEB"
        }
    },
    "return_url": "https://wooshpay.com",
    "payment_method": "pm_1692411609059688448",
    "capture_method": "automatic"
}

Checkout#

Payment flow#

1.
Customer selects BPI from the list of payment methods available and clicks on the Pay botton
下载.png
1.
Customers will be redirected to Gcash login page
下载 (1).png
1.
The client logs in to Gcash account and completes payment
2.
Payment succeeds and the client is redirected back to the page you designated

Create a Session#

Request
{
    "cancel_url": "www.wooshpay.com",
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "payment_method_types": [
        "gcash"
    ],
    "line_items": [
        {
            "price_data": {
                "currency": "PHP",
                "product": null,
                "unit_amount": 20000,
                "active": true,
                "metadata": {
                    "key1": "value1",
                    "key2": "value2"
                },
                "nickname": "apple",
                "product_data": {
                    "id": null,
                    "name": "apple",
                    "active": true,
                    "description": "very delicious",
                    "metadata": {
                        "key1": "value1",
                        "key2": "value2"
                    },
                    "url": "www.wooshpay.com"
                },
                "billing_scheme": "testscheme",
                "lookup_key": "test_lookup_key"
            },
            "quantity": 1
        }
    ]
}
Response
{
    "id": "cs_1661926259464077312",
    "object": "checkout.session",
    "created": 1685069072000,
    "currency": "PHP",
    "customer": "",
    "mode": "payment",
    "livemode": false,
    "status": "open",
    "url": "https://checkouttest.wooshpay.com/pay/cs_test_1661926259464077312?key=pk_test_NTE1OTU5NzQ3NTQ2MTM5ODkzNzcxOktFZ0xlam1KbUxUb2gyUUNqWVVoaGpDSjE2NjkzNDUwMDgxMTE=",
    "cancel_url": "www.wooshpay.com",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1661926259510214656",
                "object": "item",
                "currency": "PHP",
                "description": "apple",
                "price": {
                    "id": "price_1661926259543769088",
                    "object": "price",
                    "created": 1685069072000,
                    "active": true,
                    "currency": "PHP",
                    "metadata": {
                        "key1": "value1",
                        "key2": "value2"
                    },
                    "nickname": "apple",
                    "product": {
                        "id": "prod_1661926259560546304",
                        "object": "product",
                        "created": 1685069072000,
                        "active": true,
                        "description": "very delicious",
                        "metadata": {
                            "key1": "value1",
                            "key2": "value2"
                        },
                        "name": "apple",
                        "livemode": false,
                        "url": "www.wooshpay.com",
                        "updated": 1685069072000
                    },
                    "type": "one_time",
                    "livemode": false,
                    "unit_amount": 20000,
                    "billing_scheme": "per_unit",
                    "lookup_key": "test_lookup_key"
                },
                "quantity": 1,
                "amount_subtotal": 20000,
                "amount_total": 20000
            }
        ]
    },
    "payment_intent": "pi_1661926259778650112",
    "payment_method_types": [
        "gcash"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 20000,
    "amount_total": 20000,
    "billing_address_collection": "auto",
    "expires_at": 1685155472015,
    "payment_link": "",
    "client_secret": "pi_1661926259778650112_secret_BtNbU3T2LqvdqRNTYsXsgkh3"
}

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-22 07:54:44
Previous
OVO
Next
TrueMoney
Built with