Upon your account's activation with us, please expect around 5 business days for your account to be activated for GCash transactions. Test transactions can still be made.
## ** Overview**
GCash is one of the popular e-wallets in the Philippines. A GCash user can send money from one person to another by authorizing a transfer using their GCash accounts.
Collecting GCash payments on your website starts with creating a resource to generate a checkout URL where your customer needs to authorize an amount, wait for the authorization to complete and create a Payment resource to receive the authorized amount.
A Source resource is used to generate GCash checkout URL to authorize a certain amount to be deducted from your customer's GCash account and send it to your PayMongo account. After completing the authorization, your integration uses the chargeable source to make a create payment request and receive the payment.
## **1. Create a Source**
GCash requires your customers to fulfill the authorization process from a GCash checkout URL in order to authorize an amount. First, you need to [create](🔗) a Source resource. The type of the source is `
gcash`. You need to specify information such as the amount to authorize and to what URL to redirect the customer once the authorization is successful or if the customer failed to authorize the amount. The GCash checkout URL should be rendered on your page.
## **2. Have the customer authorize the payment**
Your customer needs to complete the authorization process. After the successful authorization, the amount will be deducted from the customer's e-wallet and the Source status becomes `
Take note that you haven't received your customer's payment yet. You need to use this chargeable source to [create](🔗) a Payment resource in order to finally receive the authorized amount.
## **3. Create a Webhook**
To be notified about any source that becomes `
chargeable`, you need to listen to 'source.chargeable' event by creating a webhook using our Webhook API.
You should not create a webhook in your code. You can try using API tools such as Postman or curl to create your webhook once. Please take note that you should not create multiple webhooks for every source that will be created. One webhook with event `
source.chargeable` is enough to receive the chargeable source information.
## **4. Create a Payment using the chargeable Source**
You will be notified of any source that becomes chargeable via the webhook you registered. To create a Payment object, you need to pass the id of the Source resource as source id and `
source` as the source type.
If you didn't manage to create a Payment after **one hour** once the amount is authorized, the source status becomes 'cancelled', the authorized amount will be automatically refunded to your customer's e-wallet and you need to create another source again.
The code below is an example of how to set up a webhook handler that creates a Payment object after being sent a `
## **5. Verifying successful transactions**
If you prefer to monitor the success status of the Source from your backend, you could be notified for successful payments by listening to the `
payment.paid` event by registering or updating your webhook endpoint using our [Webhook API](🔗).
Event notifications will be sent to your registered webhook endpoint containing relevant payment information as shown below:
You can determine if a payment is successful or not by checking the event type or the status of the payment intent.