| POST | /payfast/webhook/{PublicAccessGuid} |
|---|
"use strict";
export class PayFastWebHook {
/** @param {{m_payment_id?:string,pf_payment_id?:string,payment_status?:string,item_name?:string,item_description?:string,amount_gross?:number,amount_fee?:number,amount_net?:number,custom_str1?:string,custom_str2?:string,custom_str3?:string,custom_str4?:string,custom_str5?:string,custom_int1?:number,custom_int2?:number,custom_int3?:number,custom_int4?:number,custom_int5?:number,name_first?:string,name_last?:string,email_address?:string,merchant_id?:string,signature?:string,token?:string,billing_date?:string,PublicAccessGuid?:string,Sandbox?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
m_payment_id;
/** @type {string} */
pf_payment_id;
/** @type {string} */
payment_status;
/** @type {string} */
item_name;
/** @type {string} */
item_description;
/** @type {number} */
amount_gross;
/** @type {number} */
amount_fee;
/** @type {number} */
amount_net;
/** @type {string} */
custom_str1;
/** @type {string} */
custom_str2;
/** @type {string} */
custom_str3;
/** @type {string} */
custom_str4;
/** @type {string} */
custom_str5;
/** @type {number} */
custom_int1;
/** @type {number} */
custom_int2;
/** @type {number} */
custom_int3;
/** @type {number} */
custom_int4;
/** @type {number} */
custom_int5;
/** @type {string} */
name_first;
/** @type {string} */
name_last;
/** @type {string} */
email_address;
/** @type {string} */
merchant_id;
/** @type {string} */
signature;
/** @type {string} */
token;
/** @type {string} */
billing_date;
/** @type {string} */
PublicAccessGuid;
/** @type {boolean} */
Sandbox;
}
JavaScript PayFastWebHook DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payfast/webhook/{PublicAccessGuid} HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PayFastWebHook xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
<AmountFee>0</AmountFee>
<AmountGross>0</AmountGross>
<AmountNet>0</AmountNet>
<BillingDate>0001-01-01T00:00:00</BillingDate>
<CustomInt1>0</CustomInt1>
<CustomInt2>0</CustomInt2>
<CustomInt3>0</CustomInt3>
<CustomInt4>0</CustomInt4>
<CustomInt5>0</CustomInt5>
<CustomStr1>String</CustomStr1>
<CustomStr2>String</CustomStr2>
<CustomStr3>String</CustomStr3>
<CustomStr4>String</CustomStr4>
<CustomStr5>String</CustomStr5>
<EmailAddress>String</EmailAddress>
<ItemDescription>String</ItemDescription>
<ItemName>String</ItemName>
<MPaymentId>String</MPaymentId>
<MerchantId>String</MerchantId>
<NameFirst>String</NameFirst>
<NameLast>String</NameLast>
<PaymentStatus>String</PaymentStatus>
<PfPaymentId>String</PfPaymentId>
<PublicAccessGuid>00000000-0000-0000-0000-000000000000</PublicAccessGuid>
<Sandbox>false</Sandbox>
<Signature>String</Signature>
<Token>String</Token>
</PayFastWebHook>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />