A Source is a resource to generate your customer's payment instrument.
The Source Resource
A Source is a resource to generate your customer's payment instrument. This is normally used to generate check out URLs for e-wallet payments. To learn more about e-wallet integrations, you can visit GCash or GrabPay integration.
/** * These are the required properties * @param{Object} data Data paypload * @param{Object} data.attributes Payload attributes * @param{string} data.attributes.type The type of source. Possible values are gcash and grab_pay. * @param{number} data.attributes.amount Amount int32 * @param {string} data.attributes.currency Three-letter ISO currency code, in uppercase. PHP is the only supported currency as of the moment.
* @param{Object} data.attributes.redirect * @param{string} data.attributes.redirect.success Success url * @param{string} data.attributes.redirect.failed Error url */constresult=awaitpaymongo.sources.create(data);