Sources
#
Source Resourceexport interface SourceResource { id: string; type: 'source'; attributes: { amount: number; billing?: Billing; currency: Currency; livemode: boolean; redirect: SourceRedirect; status: SourceStatus; type: SourceType; created_at: number; updated_at: number; };}
id *
stringtype *
stringPossible value(s):
source
attributes *
objectamount *
numberIn cents (P100 = 10000).
Minimum amount is 10000
currency *
stringPossible value(s):
PHP
livemode *
booleanredirect *
objectcheckout_url *
stringsuccess *
stringfailed *
stringstatus *
stringPossible value(s):
pending|
chargeable|
cancelled|
expired|
paid
type *
stringPossible value(s):
gcash|
grab_pay
created_at *
numberupdated_at *
numberbilling
Billing#
Create SourceCreateSourceParams): SourceResource#
paymongo.source.create(Example
paymongo.source.create({ data: { attributes: { amount: 10000, currency: 'PHP', redirect: { failed: 'https://example.com', success: 'https://example.com', }, type: 'gcash', }, },});
#
Create Source Paramsdata *
objectattributes *
objecttype *
stringPossible value(s):
gcash|
grab_pay
amount *
numberIn cents (P100 = 10000).
Minimum amount is 10000
currency *
stringPossible value(s):
PHP
redirect *
objectsuccess *
stringfailed *
stringbilling
Billing#
Retrieve SourceRetrieveSourceParams): SourceResource#
paymongo.source.retrieve(Example
paymongo.source.retrieve({ id: 'src_1bLmj5BnqV2fCnM1SGGTdcrf',});
#
Retrieve Source Paramsid *
string