The /Payments
endpoint allows for Payments to be made through a configured Salesforce environment and updates Salesforce data accordingly.
The Payment API requires a 'Payment Method', 'Payment Processor' and 'Source Connector' to perform a successful request. The available Payment Method, Processors and Source Connectors for a specific Salesforce environment can be queried through their specific endpoints. Some Payment Methods enable or require further Package Actions. Be sure to include these in the request.
It is also possible to perform Payments on existing Installments.
/Payment/{ID}
Returns the status of a specific payment. This can only be used to request the status of a one-off transaction. Recurring transactions are not supported.
ID
string
required
The unique GUID or Salesforce ID of the 'Installment' to retrieve.
API was called successfully. Please look at the response code for further information!
{
"ResponseCode": "001",
"IsSuccess": true,
"Payment": {
"Status": "Outstanding",
"InstallmentId": "a083X00001aUMCnQAO",
"Amount": 10.0,
"CurrencyISOCode": "string",
"RecordTypeName": "string"
}
}
/Payment
The FinDock Payment API supports both one-time and recurring payments. To perform recurring payments, a 'Recurring' block replaces the 'Payment' block in the request. Some Payment Service Providers (PSPs) require an initial payment AND recurring payment in the same request for authorization of the transaction. You can find out whether this is the case for a specific Payment Processor through the GET /PaymentMethod and GET /PaymentProcessors endpoints. Please see the specific Payment Extension documentation on the details of performing a one-time and/or recurring payment. To perform payments on an existing Installment, simply remove the Payer block and add the InstallmentId to the Payment block.
Must match one of
SuccessURL
string
required
The URL the user will be redirected to when a transaction has been completed successfully.
FailureURL
string
required
The URL the user will be redirected to when a transaction has failed or has been cancelled.
WebhookURL
string
URL where you want to receive notifications on the status of the Payment request on. More information on the Webhook can be found here.
Origin
string
Originating source of the API call. This can be used to add for instance a channel or an id.
Payer
object (PayerRequest)
required
Data on new or existing Single Payment. If an InstallmentId
of an existing Salesforce record is provided in the Payment
object, this object is no longer required in the request.
Payment
object (NewPaymentRequest)
Data on NEW Payment.
PaymentMethod
object (PaymentMethodRequest)
Data on how the Payment will be performed.
SourceConnector
object (SourceConnectorRequest)
Source Connector to be used to process the data in Salesforce.
PackageActions
object (PackageActionRequest)
PackageAction object that specifies which additional actions need to be performed in Salesforce. PackageName
, actions
and Parameters
need to be included.
{
"SuccessURL": "www.success.nl",
"FailureURL": "www.failure.nl",
"WebhookURL": "www.findock.com/api/endpoint",
"Origin": "Webform",
"Payer": {
"Contact": {
"FirstName": "Eric",
"LastName": "Payment",
"Email": "testpayment@findock.com"
},
"ContactId": "a0P3X00000WjR8AUAV",
"ContactRecordTypeName": "Donor",
"ContactUpdate": "Enrich",
"AccountId": "a0P3X00000WjR8AUAV",
"Account": {
"Name": "Payment Family",
"BillingStreet": "Rocket Rd",
"BillingCity": "Hawthorne"
},
"AccountRecordTypeName": "Household",
"AccountUpdate": "Enrich",
"AllowDeduplication": true,
"PrimaryRelation": "Contact"
},
"Payment": {
"Amount": 10.0,
"CurrencyISOCode": "string",
"CustomFields": {
"soco__Destination_lookup__c": "a070Y000005M7t6",
"soco__Originating_Campaign__c": "7010Y000000dDSQ"
}
},
"PaymentMethod": {
"Name": "DirectDebit",
"Processor": "PaymentHub-SEPA",
"Target": "PRIMARY-BANK-ACCOUNT",
"ParameterMap": {
"IBAN": "NL69INGB0123456789",
"Preferred Language": "Dutch"
},
"PaymentProfile": {
"cpm__Bank__Account__c": "93465581",
"paybacs__Sort_Code__c": "001234"
}
},
"SourceConnector": {
"Name": "PaymentHub"
},
"PackageActions": {
"PaymentHub-GiftAid": {
"CreateGiftAidDeclaration": {
"dateMade": "2019-11-15",
"startDate": "2020-01-01",
"endDate": "2020-12-31",
"firstName": "J",
"lastName": "Fletcher",
"houseNameOrNumber": "12",
"postalCode": "L68 0AQ",
"overseas": true,
"acquisitionMethod": "Oral"
}
}
}
}
API was called. Please look at response code for further information!
{
"ResponseCode": "001",
"IsSuccess": true,
"Payer": {
"ContactId": "a0P3X00000WjR8AUAV",
"AccountId": "a0P3X00000WjR8AUAV",
"ContactDeduplicated": false,
"AccountDeduplicated": false
},
"Payment": {
"InstallmentId": "a083X00001aUMCnQAO"
},
"PaymentMethod": {
"Name": "DirectDebit",
"Processor": "PaymentHub-SEPA",
"Target": "PRIMARY-BANK-ACCOUNT"
},
"SourceConnector": "PaymentHub",
"RedirectURL": "https://myfindock-developer-edition.eu29.force.com/apex/moph__redirect?failureRedirectURL=http%3A%2F%2Fwww.failure.nl&installmentId=a083X00001brHBqQAM&paymentMethod=CreditCard&recurring=false&successRedirectURL=http%3A%2F%2Fwww.success.nl"
}
Was this page helpful?