digitaluapi

<back to all web services

PayFastWebHook

The following routes are available for this service:
POST/payfast/webhook/{PublicAccessGuid}
import Foundation
import ServiceStack

public class PayFastWebHook : Codable
{
    // @DataMember(Name="m_payment_id")
    public var m_payment_id:String

    // @DataMember(Name="pf_payment_id")
    public var pf_payment_id:String

    // @DataMember(Name="payment_status")
    public var payment_status:String

    // @DataMember(Name="item_name")
    public var item_name:String

    // @DataMember(Name="item_description")
    public var item_description:String

    // @DataMember(Name="amount_gross")
    public var amount_gross:Double

    // @DataMember(Name="amount_fee")
    public var amount_fee:Double

    // @DataMember(Name="amount_net")
    public var amount_net:Double

    // @DataMember(Name="custom_str1")
    public var custom_str1:String

    // @DataMember(Name="custom_str2")
    public var custom_str2:String

    // @DataMember(Name="custom_str3")
    public var custom_str3:String

    // @DataMember(Name="custom_str4")
    public var custom_str4:String

    // @DataMember(Name="custom_str5")
    public var custom_str5:String

    // @DataMember(Name="custom_int1")
    public var custom_int1:Int

    // @DataMember(Name="custom_int2")
    public var custom_int2:Int

    // @DataMember(Name="custom_int3")
    public var custom_int3:Int

    // @DataMember(Name="custom_int4")
    public var custom_int4:Int

    // @DataMember(Name="custom_int5")
    public var custom_int5:Int

    // @DataMember(Name="name_first")
    public var name_first:String

    // @DataMember(Name="name_last")
    public var name_last:String

    // @DataMember(Name="email_address")
    public var email_address:String

    // @DataMember(Name="merchant_id")
    public var merchant_id:String

    // @DataMember(Name="signature")
    public var signature:String

    // @DataMember(Name="token")
    public var token:String

    // @DataMember(Name="billing_date")
    public var billing_date:Date

    public var publicAccessGuid:String
    public var sandbox:Bool

    required public init(){}
}


Swift PayFastWebHook DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"m_payment_id":"String","pf_payment_id":"String","payment_status":"String","item_name":"String","item_description":"String","amount_gross":0,"amount_fee":0,"amount_net":0,"custom_str1":"String","custom_str2":"String","custom_str3":"String","custom_str4":"String","custom_str5":"String","custom_int1":0,"custom_int2":0,"custom_int3":0,"custom_int4":0,"custom_int5":0,"name_first":"String","name_last":"String","email_address":"String","merchant_id":"String","signature":"String","token":"String","billing_date":"0001-01-01T00:00:00.0000000","PublicAccessGuid":"00000000000000000000000000000000","Sandbox":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}