MENU
Pdcflowlogo
PHP Perl Ruby

Introduction

Welcome to the PDCflow API Docs! Here you can find information and examples on the diverse selection of APIs used to integrate with PDCflow.

Attribute Tables

Attribute tables include all of the critical information that you will use to integrate with our APIs. The example below shows you where to find each piece of information for an Attribute.

Attribute Description
Attribute Name
FormatMax Length
If Required/Conditional
This is where there will be a description of the Attribute and what it is used for.
Format: formatted-sample
Constraint(s): Explanation of constraint(s)
Valid value(s): value1, value2
Default: The Default Value

Code Samples

// Libraries needed. On an Ubuntu system, run the following commands:

sudo apt-get install php7.0-soap
sudo apt-get install php-curl
sudo apt-get install php-json

Debugging SOAP in PHP:
Add tracing:
<?php $client = new SoapClient($url, array('trace' => 1)); ?>

Output the results of the trace:
<?php var_dump( $client->__getLastRequest() ); ?>

Debugging REST in PHP:
<?php curl_setopt($curl, CURLOPT_VERBOSE, true); ?>
# Libraries needed. On an Ubuntu system, run the following commands:

sudo apt-get install cpanminus
sudo cpan App::cpanminus (take defaults)
sudo cpanm LWP::Authen::Wsse
sudo cpanm SOAP::Lite
# Libraries needed. On an Ubuntu system, run the following commands:

sudo apt-get install ruby-dev
sudo apt-get install zlib1g-dev
sudo gem install savon
sudo gem install curl
sudo apt-get install libcurl4-gnutls-dev
sudo gem install curb

You can view sample code in the dark area to the right. We provide examples in PHP, Perl, & Ruby. For the code samples to work, each language will require the installation of specific libraries which are listed to the right.

Integrator Forum

If you can’t find the information you are looking for, need an example not provided here, or have a specific question you want answered head over to our API Forum.

Auth Signature Audit API

​Request an audit report for a signature request. This would be used in conjunction with Auth Signature API

API Request

Retrieve an audit report for a signature transaction request.

SignatureAuditRetrievalRequest

wsdl:
https://demo.pdc4u.com/AuthSignatureAuditService/ws/retrieveauditservices/retrieveauditservice.wsdl

namespace:
http://www.pdc4u.com/retrieveauditservices_v1_0

method:
SignatureAuditRetrievalRequest

Attribute Description
TransId
Numeric20
Required
The id of the transaction to retrieve audit report for.
EmailTo
Alphanumeric65
Required
What email address should the audit report be sent to.
Format
Alpha3
Required
The desired format for the audit report.
Valid value(s): PDF, XML
Version
Numeric3
Required
The version being used.
Valid value(s): 1.0, 1.4, 1.5, 1.6
Default: 1.0

API Response

SignatureAuditRetrievalResponse

Attribute Description
TransId
Numeric20
The id of the transaction that the audit request is for.
DetailData
Base64N/A
Base64 representation of the audit report.
Format
Alpha3
The format that the report is in.
Valid value(s): PDF, XML
Result
Alpha3
The result of the audit report request.
Valid value(s): OK, ERR
ErrorMessage
Alphanumeric60
A message explaining the error.
Constraint(s): Only populated if Result is ERR.

Sample Code

Web Service Security

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>SomeSecretUsername</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SomeEvenMoreSecretPassword</wsse:Password>
                <wsu:Created>2014-05-07T20:33:48.015Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    ........

Each SOAP request submitted to PDCflow must contain a security header as part of the message. This header is based on an established standard: Web Services Security - UsernameToken Profile 1.1. An example of this header is shown to the right.

See: http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-UsernameTokenProfile-v1.1.1-os.html

Retrieve audit report

<?php
 //special handling to create a WSSE-compliant header
 class WsseAuthHeader extends SoapHeader {

   private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

   function __construct($user, $pass) {
     $auth = new stdClass();
     $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
     $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

     $username_token = new stdClass();
     $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

     $security_sv = new SoapVar(
       new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
       SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

     parent::__construct($this->wss_ns, 'Security', $security_sv, true);
   }
 }

 $url='https://demo.pdc4u.com/AuthSignatureAuditService/ws/retrieveauditservices/retrieveauditservice.wsdl';
 $namespace = 'http://www.pdc4u.com/retrieveauditservices_v1_0';
 $method = 'SignatureAuditRetrieval';

 $wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
 $client = new SoapClient($url);
 $client->__setSoapHeaders([$wsse_header]);

$SignatureAuditRetrievalRequest = [
    'TransId' => '00000000',
    'EmailTo' => 'SomeEmailAddress',
    'Format' => 'PDF',
    'Version' => '1.6',
];

try {
 $response = $client->__soapCall(
   $method,
   [$SignatureAuditRetrievalRequest, $namespace]
 );

 print_r($response);
}
catch (SoapFault $fault) {
 print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/signatureAudit/message/pdc_v1/sar' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureAuditService/ws/retrieveauditservices/retrieveauditservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'TransId' => '00000000',
   'EmailTo' => 'SomeEmailAddress',
   'Format' => 'PDF',
   'Version' => '1.6',
);
my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'SignatureAuditRetrievalRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureAuditService/ws/retrieveauditservices/retrieveauditservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'TransId' => '00000000',
      'EmailTo' => 'SomeEmailAddress',
      'Format' => 'PDF',
      'Version' => '1.6',
   }

   response = client.call(:signature_audit_retrieval, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The WSDL Location that can be used for testing is at:
https://demo.pdc4u.com/AuthSignatureAuditService/ws/retrieveauditservices/retrieveauditservice.wsdl

The namespace to use is:
http://www.pdc4u.com/retrieveauditservices_v1_0

The method to use is:
SignatureAuditRetrieval

Auth Signature API

The Auth Signature Service consists of a few web services:

Send Request

wsdl:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

method:
PrepareSendLink

Send a text/email to customer with a link to a secure website for capturing their signature/payment or displaying a document.

PrepareSendLinkRequest

Attribute Description
PayorFirstName
Alphanumeric45
Required
The first name of your client.
PayorLastName
Alphanumeric45
Required
The last name of your client.
MobileNum
Numeric15
Conditional
The phone number to send request to.
Constraint(s): With country code; Required if no Email provided.
Email
Alphanumeric65
Conditional
The email address to send the request to.
Constraint(s): Required if no MobileNum provided.
VerificationPin
Numeric8
Required
Shared secret for client verification.
Constraint(s): Must be between 4 and 8 digits long.
PinDescription
Alphanumeric50
Required
Description of the VerificationPin.
Amount
Numeric11
Conditional
Base amount for payment, will also display on signature.
Format: Format as you want it to appear ($125.00; £25; 34,95€;), however only USD is supported for payment.
Constraint(s): Required if payment is also requested.
Description
Alphanumeric160
Conditional
Description of what the signature is for. Shows on signature.
Constraint(s): Only required with signature.
UserId
Alphanumeric65
Username or email of the employee sending this request.
MaxPinAttempts
Numeric2
Maximum amount of attempts the client is allowed for verification before transaction is locked.
Default: 3
RequestGeolocation
Boolean5
Request the geolocation from the client.
Constraint(s): User can refuse to share location, preventing capture.
Valid value(s): TRUE, FALSE
Default: TRUE
TimeoutMinutes
Numeric6
Number of minutes client has to complete the transaction before it expires.
Default: 2.5
RedirectLink
Alphanumeric65
Link to direct client to, after signature is complete.
CustomMessage
AlphaNumeric320
Freeform text to display at the end of the transaction.
Version
Numeric3
The version of the service being used.
Valid value(s): 1.0, 1.4, 1.5, 1.6
Default: 1.0
CustomFields
ObjectN/A
Name/Value passthrough values.
Constraint(s): See object definition below.
PaymentData
ObjectN/A
Data for payment processing.
Constraint(s): See object definition below.
DocumentData
ObjectN/A
Data for document presentation.
Constraint(s): See object definition below.
PaymentFeeAmount
Numeric11
A fee to be applied to the payment and shown on the signature.
Format: Format as you want it to appear ($125.00; £25; 34,95€;), however only USD is supported for payment.
Default: 0.00
SignatureRequested
Boolean5
Whether signature is desired or not.
Valid value(s): TRUE, FALSE
Default: TRUE
FlowOrder
ObjectN/A
The order the pages will appear for the client.
Constraint(s): See object definition below.
ImageUploadData
ObjectN/A
Information for image upload.
Constraint(s): See object definition below.

PrepareSendLinkResponse

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

Attribute Description
RequestedTimestamp
DateTime25
Date and time the transaction was requested
Format: 2017-01-06 10:15:51-0700
TransId
Numeric20
Unique id for the transaction.
StorageResult
Alpha3
Result of transaction.
Valid value(s): OK, ERR
ResultMessage
AlphanumericN/A
Message relating to a failed request.
Constraint(s): Only populated if StorageResult is ERR.
DocumentId
Numeric20
Id for document that was uploaded. Can be sent in future requests to reuse document without uploading it again.
CustomFields
ObjectN/A
Custom fields that were passed in for passthrough.
Constraint(s): See object definition below.
ValidationErrorList
ObjectN/A
Object that holds list of validation errors.
Constraint(s): See object definition below.
ImageUploadId
Numeric20
Id for the image that was uploaded by the client. Can be used to retrieve uploaded image.

Retrieve Signatures

wsdl:
https://demo.pdc4u.com/AuthSignatureService/ws/signatureretrievalservices/signatureretrievalservice.wsdl

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/sigr

method:
SignatureRetrieval

Retrieve a signature image, previously uploaded document or client-uploaded image

SignatureRetrievalRequest

Attribute Description
TransId
Numeric20
Required
The id of the signature to be retrieved.
Version
Numeric3
The version of the service being used.
Valid value(s): 1.0, 1.4, 1.5, 1.6
Default: 1.0
DocumentId
Numeric20
The id of the document to be retrieved.
ImageUploadId
Numeric20
The id of the image upload to be retrieved.

SignatureRetrievalResponse

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/sigr

Attribute Description
ErrorCode
Alpha3
On error, this code will represent the error.
ErrorMessage
Alphanumeric160
On error, this will be a description of the error which occurred.
Latitude
Numeric32
The latitude recorded when the client signed the request, if available.
Format: 51.1789
Longitude
Numeric32
The longitude recorded when the client signed the request, if available.
Format: -1.8262
Signature
Base64N/A
Base64 encoded signature image.
Format: .png
DocumentRetrievalData
ObjectN/A
Data pertaining to document that was retrieved.
Constraint(s): See object definition below.
ValidationErrorList
ObjectN/A
Object that holds list of validation errors.
Constraint(s): See object definition below.
ReceivedGeolocation
Boolean5
Whether the location of the signer was received.
Valid value(s): TRUE, FALSE
ImageUploadRetrievalData
ObjectN/A
Data pertaining to the image upload that was retrieved.
Constraint(s): See object definition below.

Reporting

SignatureReportRequest

wsdl:
https://demo.pdc4u.com/AuthSignatureService/ws/signaturereportservices/signaturereportservice.wsdl

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/srr

method:
SignatureReport

Retrieve a report on signatures uploaded during a specified date range or by a combination of attributes in the following table.

Attribute Description
StartDate
DateTime20
Requests after this date will be retrieved.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
Default: 2013-01-01T00:00:00
EndDate
DateTime20
Requests before this date will be retrieved.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
Default: Current date
FirstName
Alpha45
Requests sent to people with this first name will be retrieved.
LastName
Alpha45
Requests sent to people with this last name will be retrieved.
RecordStart
Numeric20
If defined, which record in date range to start with. In conjunction with RecordCount, if 3000 transactions were pulled, RecordCount is 1,000, RecordStart at 1,000 will return transactions 1,000-2,000.
Default: 0
RecordCount
Numeric4
Total amount of records to be returned in single request. The max value is 5000.
Default: 2000
RetrieveOnlyCompletedRequests
Boolean5
Whether to return ONLY requests that have been completed.
Valid value(s): TRUE, FALSE
Default: FALSE
ReportType
Alpha15
Type of report to be retrieved.
Valid value(s):
ALL
SIGNATURE - requests that had signatures
ALLDOCUMENTS - only requests with documents
SINGLEDOCUMENT - all requests with DocumentId
ACHPAYMENT - all requests with an ACH payment
CCPAYMENT - all requests with a CC payment
ALLPAYMENT - all requests with any payment
DETAIL - detail report for provided SignatureId
Default: ALL
DocumentId
Numeric20
Conditional
Document Id to filter search by.
Constraint(s): Required for ReportType SINGLEDOCUMENT.
SignatureId
Numeric20
Conditional
Signature Id to retrieve DETAIL report for.
Constraint(s): Required for ReportType DETAIL.
UserId
Alphanumeric65
Only requests sent by this user will be retrieved.
Version
Numeric3
The version of the service being used.
Valid value(s): 1.0, 1.4, 1.5, 1.6
Default: 1.0

SignatureReportResponse

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/srr

Attribute Description
SignatureReportGeneralDatas
ObjectN/A
Object containing a list of SignatureReportGeneralData.
Constraint(s): See object definition below.
SignatureReportDetailData
ObjectN/A
Single SignatureReportDetailData.
Constraint(s): See object definition below.
ValidationErrorList
ObjectN/A
Object that holds list of validation errors.
Constraint(s): See object definition below.

SignatureReportGeneralData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/srd

Attribute Description
TransactionId
Numeric20
Unique id for the transaction.
FirstName
Alpha45
First Name of the person the request was sent to.
LastName
Alpha45
Last Name of the person the request was sent to.
SentDate
DateTime25
The date and time the request was sent.
Format: ISO-8601 (2017-05-22T10:54:10-0600)
EmailAddressTo
Alphanumeric65
Email address the request was sent to.
PhoneNumberTo
Numeric15
Phone number the request was sent to.
Username
Alphanumeric65
Username of the employee who sent the request.
PaymentType
Alpha3
Payment type associated with transaction.
Valid value(s): CC, ACH
DocumentId
Numeric20
Id for document that was uploaded with this transaction.
ImageUploadId
Numeric20
Id for the image that was uploaded by the client.
WasSignatureRequested
Boolean5
Whether a signature was requested with this transaction.
Valid value(s): TRUE, FALSE
SignatureCompletionDate
DateTime25
The date and time the signature was completed.
Format: ISO-8601 (2017-05-22T10:54:10-0600)
IsFlowClosed
Boolean5
Whether all parts of the transaction were completed or an error occurred and the transaction was closed.
Valid value(s): TRUE, FALSE
ErrorCode
Alpha3
An error code if the transaction was closed due to an error.
ErrorMessage
Alphanumeric160
An explanation message for an error that occurred.

SignatureReportDetailData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/srd

Attribute Description
SignatureReportGeneralData
ObjectN/A
Object containing the SignatureReportGeneralData for the transaction.
Constraint(s): See object definition above.
ACHReportData
ObjectN/A
Object containing the ACHReportData for the transaction.
Constraint(s): See object definition below.
ImageUploadRetrievalData
ObjectN/A
Data pertaining to the image upload that was retrieved.
Constraint(s): See object definition below.
PaymentTransactionId
Numeric20
Payment Transaction id tied to this transaction.
AccountNumber
Alphanumeric45
Account number associated with payment in this transaction.
AccountDirective
Numeric10
The Account directive used for the payment in this transaction.
PaymentCreationDate
DateTime25
The date and time the payment was entered for processing.
Format: ISO-8601 (2017-05-22T10:54:10-0600)
DateProcessed
DateTime25
The date the payment was processed.
Format: ISO-8601 (2017-05-22T10:54:10-0600)
PaymentAmount
Numeric11
The payment amount for this transaction.
Format: XXXX.XX
FeeAmount
Numeric11
The fee amount for this transaction.
Format: XXXX.XX
TotalAmount
Numeric11
The total amount processed for this transaction.
Address
Alphanumeric80
The address associated with the payment.
City
Alphanumeric45
The city associated with the payment.
State
Alphanumeric2
The state abbreviation associated with the payment.
Zip
Numeric9
The zip code associated with the payment.
CustomFields
ObjectN/A
Custom fields that were passed in for passthrough.
Constraint(s): See object definition below.

Modify Signatures

wsdl:
https://demo.pdc4u.com/AuthSignatureService/ws/signaturemodificationservices/signaturemodificationservice.wsdl

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/smr

method:
SignatureModification

Modify a previously uploaded signature request

SignatureModificationRequest

Attribute Description
TransId
Numeric20
Required
The id of the signature to be modified.
UserId
Alphanumeric65
Required
Username or email of the employee making the modification.
Command
Alpha5
Required
The modification to make on the transaction.
Valid value(s): CLOSE
Version
Numeric3
The version of the service being used.
Valid value(s): 1.5, 1.6
Default: 1.5

SignatureModificationResponse

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/smr

Attribute Description
Result
Alpha3
Result of the modification request.
Valid value(s): OK, ERR
ErrorMessage
AlphanumericN/A
An explanation message for an error that occurred.
ValidationErrorList
ObjectN/A
Object that holds list of validation errors.
Constraint(s): See object definition below.

Object Definitions

ACHReportData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/achr

Attribute Description
ACHStatusData
ObjectN/A
Object that holds a list of status datas for ACH transaction.
Constraint(s): See object definition below.
BankRoutingNumber
Numeric9
The bank routing number used for the transaction.
BankAccountNumberLastFour
Numeric4
The last four of the bank account number used for the transaction.
CheckNumber
Numeric10
The check number used for the transaction.
AccountType
Alpha8
The type of account that was used for the transaction.
Valid value(s): CHECKING, SAVINGS

ACHStatusData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/achs

Attribute Description
ACHStatus
Alpha12
The status of the ACH transaction.
Valid value(s):
WAITING - transaction will be included in next batch
SUBMITTED - transaction has been submitted for processing
ACKNOWLEDGED - transaction has been accepted for processing
FUNDED - money has been deposited into your account
DEDUCTION - money has been taken from your account
VOID - transaction was cancelled prior to submission for processing
RETURNED - an exception occured while processing transaction
CORRECTION - transaction was automatically corrected during processing
ERROR - an unknown error occured while processing transaction
ACHReturnCode
Alpha3
Code representing a failed or corrected transaction. ACHReturnMessage will describe this code.
Format: R01, X05, C02, etc
ACHReturnMessage
AlphanumericN/A
Explanation of the ACHReturnCode.
ACHStatusChangeDate
DateTime25
Date and time this ACH status was recorded.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)

CustomFields

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/cfl

Attribute Description
CustomFields
ObjectN/A
Object that holds a list of custom fields. These are passthrough values.
Constraint(s): See object definition below.

CustomField

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/cfl

Attribute Description
FieldName
Alphanumeric75
The name of the Name/Value passthrough.
FieldValue
Alphanumeric75
The value of the Name/Value passthrough.

DocumentRetrievalData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/docr

Attribute Description
OriginalUploadDate
DateTime25
The date and time the document was originally uploaded.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
DocumentData
ObjectN/A
Object that holds all the data for the document.
Constraint(s): See object definition below.

DocumentData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/docr

Attribute Description
DocumentName
Alphanumeric36
The name given for the document when it was originally uploaded.
Constraint(s): Name must be unique for each uploaded document.
DocumentBase64String
Base64N/A
The document as a Base64 encoded string.
DocumentId
Numeric20
Id for document that was uploaded. Can be sent in future requests to reuse document without uploading it again.

FlowOrder

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/ord

Attribute Description
FlowPage
ObjectN/A
Object that holds a list of FlowPage objects to define the order.
Constraint(s): See object definition below.

FlowPage

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/ord

Attribute Description
FlowPage
Alpha6
An enum to define pages. List pages in desired order to define order that client will see the pages in.
Constraint(s): Only requested functionality can be included.
Valid value(s): PG_DOC, PG_IMG, PG_SIG, PG_PAY
Default:
  • PG_DOC
  • PG_IMG
  • PG_SIG
  • PG_PAY

ImageUploadData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/imu

Attribute Description
ImageUploadRequested
Boolean5
Whether to request an image upload from the client.
Valid value(s): TRUE, FALSE
Default: FALSE
ImageDescription
Alphanumeric160
A description for what type of image for the client to upload.
Default: ‘Upload Image’

ImageUploadRetrievalData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/imur

Attribute Description
ImageDescription
Alphanumeric160
A description for what type of image for the client to upload.
ImageUploadId
Numeric20
Id for the image that was uploaded by the client.
UploadSuccessful
Boolean5
Whether the upload was successful or not.
Valid value(s): TRUE, FALSE
ImageBase64
Base64N/A
Base64 encoded value of the uploaded image.
Format: .png
ErrorCode
Alpha3
Code for error that may have occurred with image upload.
ErrorMessage
Alphanumeric160
An explanation message for an error that occurred.

PaymentData

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/pay

Attribute Description
PaymentType
Alpha3
Type of payment to include in the request.
Valid value(s): ACH, CC
AccountDirective
Numeric10
The account directive to be used for the payment.
BankAccountType
Alpha8
The type of bank account.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
Valid value(s): CHECKING, SAVINGS
BankAccountNumber
Numeric20
The payor’s bank account number for ACH transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
BankRoutingNumber
Numeric9
The payor’s bank routing number for ACH transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
AccountNumber
Alphanumeric45
The payor’s account number.
Constraint(s): Will be preloaded on form for client; they will NOT be able to edit it.
CheckNumber
Numeric10
The payor’s check number for transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
CreditCardToken
Alphanumeric16
Credit card token as generated by PDCflow. An actual credit card number will fail validation.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it or enter a different card number.
CreditCardExpirationMonth
Numeric2
Expiration month of the payor’s credit card.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
CreditCardExpirationYear
Numeric4
Expiration year of the payor’s credit card.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.

ValidationErrorList

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/val

Attribute Description
ValidationErrors
ObjectN/A
Object that holds a list of validation errors.
Constraint(s): See object definition below.

ValidationErrors

namespace:
http://www.pdc4u.com/authsig/message/pdc_v1/val

Attribute Description
ErrorCode
Alpha3
Error code for failed validation.
ErrorMessage
AlphanumericN/A
An explanation message for the validation error that occurred.

Sample Code

Web Service Security

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>SomeSecretUsername</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SomeEvenMoreSecretPassword</wsse:Password>
                <wsu:Created>2014-05-07T20:33:48.015Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    ........

Each SOAP request submitted to PDCflow must contain a security header as part of the message. This header is based on an established standard: Web Services Security - UsernameToken Profile 1.1. An example of this header is shown to the right.

See: http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-UsernameTokenProfile-v1.1.1-os.html

Sample Code - Send

Send a signature request

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'PayorFirstName' => 'Adam',
  'PayorLastName' => 'Test',
  'MobileNum' => '',
  'Email' => 'adamemail@pdcflow.com',
  'VerificationPin' => '1234',
  'PinDescription' => 'Test description',
  'Amount' => '1.00',
  'Description' => 'Approve $1 charge',
  'UserId' => '',
  'MaxPinAttempts' => '',
  'RequestGeolocation' => '',
  'TimeoutMinutes' => '',
  'RedirectLink' => '',
  'CustomMessage' => '',
  'Version' => '1.6',
  'CustomFields' => [],
  'PaymentData' => [
    'PaymentType' => '',
    'AccountDirective' => ''
  ],
  'DocumentData' => [
    'DocumentName' => '',
    'DocumentBase64String' => '',
    'DocumentId' => ''
  ],
  'PaymentFeeAmount' => '',
  'SignatureRequested' => 'TRUE',
  'FlowOrigin' => 'EXT',
  'FlowOrder' => [

  ],
  'ImageUploadData' => [
    'ImageUploadRequested' => '',
    'ImageDescription' => ''
  ]
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/psl';
$method = 'PrepareSendLink';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/psl' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'PayorFirstName' => 'Adam',
   'PayorLastName' => 'Test',
   'MobileNum' => '',
   'Email' => 'adamemail@pdcflow.com',
   'VerificationPin' => '1234',
   'PinDescription' => 'Test description',
   'Amount' => '',
   'Description' => 'Approve $1 charge',
   'UserId' => '',
   'MaxPinAttempts' => '',
   'RequestGeolocation' => '',
   'TimeoutMinutes' => '',
   'RedirectLink' => '',
   'CustomMessage' => '',
   'Version' => '1.6',
   'CustomFields' => {},
   'PaymentData' => {
      'PaymentType' => '',
      'AccountDirective' => ''
   },
   'DocumentData' => {
      'DocumentName' => '',
      'DocumentBase64String' => '',
      'DocumentId' => ''
   },
   'PaymentFeeAmount' => '',
   'SignatureRequested' => 'TRUE',
   'FlowOrigin' => 'EXT',
   'FlowOrder' => {

   },
   'ImageUploadData' => {
      'ImageUploadRequested' => '',
      'ImageDescription' => ''
   }
);

my @data;
foreach my $key ( keys %params ) {
   my %xmlns_map = (
      'CustomFields' => 'http://www.pdc4u.com/authsig/message/pdc_v1/cfl',
      'PaymentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/pay',
      'DocumentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/doc',
      'FlowOrder' => 'http://www.pdc4u.com/authsig/message/pdc_v1/ord',
      'ImageUploadData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/imu',
   );
   push @data, SOAP::Data->name( $key => $params{$key} )
      ->attr({xmlns => $xmlns_map{$key}});
}

print $soap->call( 'PrepareSendLinkRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'PayorFirstName' => 'Adam',
      'PayorLastName' => 'Test',
      'MobileNum' => '',
      'Email' => 'adamemail@pdcflow.com',
      'VerificationPin' => '1234',
      'PinDescription' => 'Test description',
      'Amount' => '1.00',
      'Description' => 'Approve $1 charge',
      'UserId' => '',
      'MaxPinAttempts' => '',
      'RequestGeolocation' => '',
      'TimeoutMinutes' => '',
      'RedirectLink' => '',
      'CustomMessage' => '',
      'Version' => '1.6',
      'CustomFields' => {},
      'PaymentData' => {
         'PaymentType' => '',
         'AccountDirective' => ''
      },
      'DocumentData' => {
         'DocumentName' => '',
         'DocumentBase64String' => '',
         'DocumentId' => ''
      },
      'PaymentFeeAmount' => '',
      'SignatureRequested' => 'TRUE',
      'FlowOrigin' => 'EXT',
      'FlowOrder' => {

      },
      'ImageUploadData' => {
         'ImageUploadRequested' => '',
         'ImageDescription' => ''
      }
   }

   response = client.call(:prepare_send_link, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature request is:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

The method to use is:
PrepareSendLink

Send a document request

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

//read and encode pdf to upload
$pdfDocument = 'mydoc.pdf';
$handle = fopen($pdfDocument, "r");
$pdfContents = fread($handle, filesize($pdfDocument));
fclose($handle);
$documentData = base64_encode($pdfContents);

$params = [
  'PayorFirstName' => 'Adam',
  'PayorLastName' => 'Test',
  'MobileNum' => '',
  'Email' => 'adamemail@pdcflow.com',
  'VerificationPin' => '1234',
  'PinDescription' => 'Test description',
  'Amount' => '',
  'Description' => 'Approve this document',
  'UserId' => '',
  'MaxPinAttempts' => '',
  'RequestGeolocation' => '',
  'TimeoutMinutes' => '',
  'RedirectLink' => '',
  'CustomMessage' => '',
  'Version' => '1.6',
  'CustomFields' => [],
  'PaymentData' => [
    'PaymentType' => '',
    'AccountDirective' => ''
  ],
  'DocumentData' => [
    'DocumentName' => 'My unique document name',
    'DocumentBase64String' => $documentData,
    'DocumentId' => ''
  ],
  'PaymentFeeAmount' => '',
  'SignatureRequested' => 'FALSE',
  'FlowOrigin' => 'EXT',
  'FlowOrder' => [

  ],
  'ImageUploadData' => [
    'ImageUploadRequested' => '',
    'ImageDescription' => ''
  ]
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/psl';
$method = 'PrepareSendLink';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/psl' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# read and encode pdf to upload
my $pdfDocument = 'mydoc.pdf';
my $pdfContents = read_file( $pdfDocument );
my $documentData = encode_base64($pdfContents, ""); # encode without newlines

my %params = (
   'PayorFirstName' => 'Adam',
   'PayorLastName' => 'Test',
   'MobileNum' => '',
   'Email' => 'adamemail@pdcflow.com',
   'VerificationPin' => '1234',
   'PinDescription' => 'Test description',
   'Amount' => '',
   'Description' => 'Approve this document',
   'UserId' => '',
   'MaxPinAttempts' => '',
   'RequestGeolocation' => '',
   'TimeoutMinutes' => '',
   'RedirectLink' => '',
   'CustomMessage' => '',
   'Version' => '1.6',
   'CustomFields' => {},
   'PaymentData' => {
      'PaymentType' => '',
      'AccountDirective' => ''
   },
   'DocumentData' => {
      'DocumentName' => 'My unique document name',
      'DocumentBase64String' => $documentData,
      'DocumentId' => ''
   },
   'PaymentFeeAmount' => '',
   'SignatureRequested' => 'FALSE',
   'FlowOrigin' => 'EXT',
   'FlowOrder' => {

   },
   'ImageUploadData' => {
      'ImageUploadRequested' => '',
      'ImageDescription' => ''
   }
);

my @data;
foreach my $key ( keys %params ) {
   my %xmlns_map = (
      'CustomFields' => 'http://www.pdc4u.com/authsig/message/pdc_v1/cfl',
      'PaymentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/pay',
      'DocumentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/doc',
      'FlowOrder' => 'http://www.pdc4u.com/authsig/message/pdc_v1/ord',
      'ImageUploadData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/imu',
   );
   push @data, SOAP::Data->name( $key => $params{$key} )
      ->attr({xmlns => $xmlns_map{$key}});
}

print $soap->call( 'PrepareSendLinkRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0
require 'base64'

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # read and encode pdf to upload
   pdfDocument = 'mydoc.pdf'
   file = File.open(pdfDocument, "rb")
   contents = file.read
   file.close
   documentData = Base64.strict_encode64(contents) # encodes without newlines

   params = {
      'PayorFirstName' => 'Adam',
      'PayorLastName' => 'Test',
      'MobileNum' => '',
      'Email' => 'adamemail@pdcflow.com',
      'VerificationPin' => '1234',
      'PinDescription' => 'Test description',
      'Amount' => '',
      'Description' => 'Approve this document',
      'UserId' => '',
      'MaxPinAttempts' => '',
      'RequestGeolocation' => '',
      'TimeoutMinutes' => '',
      'RedirectLink' => '',
      'CustomMessage' => '',
      'Version' => '1.6',
      'ins1:CustomFields' => {},
      'ins2:PaymentData' => {
         'ins2:PaymentType' => '',
         'ins2:AccountDirective' => ''
      },
      'ins3:DocumentData' => {
         'ins3:DocumentName' => 'My unique document name',
         'ins3:DocumentBase64String' => documentData,
         'ins3:DocumentId' => ''
      },
      'PaymentFeeAmount' => '',
      'SignatureRequested' => 'FALSE',
      'FlowOrigin' => 'EXT',
      'ins4:FlowOrder' => {

      },
      'ins5:ImageUploadData' => {
         'ins5:ImageUploadRequested' => '',
         'ins5:ImageDescription' => ''
      }
   }

   response = client.call(:prepare_send_link, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature request is:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

The method to use is:
PrepareSendLink

Send a payment request

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'PayorFirstName' => 'Adam',
  'PayorLastName' => 'Test',
  'MobileNum' => '',
  'Email' => 'adamemail@pdcflow.com',
  'VerificationPin' => '1234',
  'PinDescription' => 'Test description',
  'Amount' => '1.00',
  'Description' => 'Approve this payment',
  'UserId' => '',
  'MaxPinAttempts' => '',
  'RequestGeolocation' => '',
  'TimeoutMinutes' => '',
  'RedirectLink' => '',
  'CustomMessage' => '',
  'Version' => '1.6',
  'CustomFields' => [],
  'PaymentData' => [
    'PaymentType' => 'ACH',
    'AccountDirective' => 'XX-X'
  ],
  'DocumentData' => [
    'DocumentName' => '',
    'DocumentBase64String' => '',
    'DocumentId' => ''
  ],
  'PaymentFeeAmount' => '0.50',
  'SignatureRequested' => 'FALSE',
  'FlowOrigin' => 'EXT',
  'FlowOrder' => [

  ],
  'ImageUploadData' => [
    'ImageUploadRequested' => '',
    'ImageDescription' => ''
  ]
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/psl';
$method = 'PrepareSendLink';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/psl' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'PayorFirstName' => 'Adam',
   'PayorLastName' => 'Test',
   'MobileNum' => '',
   'Email' => 'adamemail@pdcflow.com',
   'VerificationPin' => '1234',
   'PinDescription' => 'Test description',
   'Amount' => '',
   'Description' => 'Approve this payment',
   'UserId' => '',
   'MaxPinAttempts' => '',
   'RequestGeolocation' => '',
   'TimeoutMinutes' => '',
   'RedirectLink' => '',
   'CustomMessage' => '',
   'Version' => '1.6',
   'CustomFields' => {},
   'PaymentData' => {
      'PaymentType' => 'ACH',
      'AccountDirective' => 'XX-X'
   },
   'DocumentData' => {
      'DocumentName' => '',
      'DocumentBase64String' => '',
      'DocumentId' => ''
   },
   'PaymentFeeAmount' => '0.50',
   'SignatureRequested' => 'FALSE',
   'FlowOrigin' => 'EXT',
   'FlowOrder' => {

   },
   'ImageUploadData' => {
      'ImageUploadRequested' => '',
      'ImageDescription' => ''
   }
);

my @data;
foreach my $key ( keys %params ) {
   my %xmlns_map = (
      'CustomFields' => 'http://www.pdc4u.com/authsig/message/pdc_v1/cfl',
      'PaymentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/pay',
      'DocumentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/doc',
      'FlowOrder' => 'http://www.pdc4u.com/authsig/message/pdc_v1/ord',
      'ImageUploadData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/imu',
   );
   push @data, SOAP::Data->name( $key => $params{$key} )
      ->attr({xmlns => $xmlns_map{$key}});
}

print $soap->call( 'PrepareSendLinkRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl',
      log_level: :debug,
      log: false,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'PayorFirstName' => 'Adam',
      'PayorLastName' => 'Test',
      'MobileNum' => '',
      'Email' => 'adamemail@pdcflow.com',
      'VerificationPin' => '1234',
      'PinDescription' => 'Test description',
      'Amount' => '1.00',
      'Description' => 'Approve this payment',
      'UserId' => '',
      'MaxPinAttempts' => '',
      'RequestGeolocation' => '',
      'TimeoutMinutes' => '',
      'RedirectLink' => '',
      'CustomMessage' => '',
      'Version' => '1.6',
      'ins1:CustomFields' => {},
      'ins2:PaymentData' => {
         'ins2:PaymentType' => 'ACH',
         'ins2:AccountDirective' => 'XX-X'
      },
      'ins3:DocumentData' => {
         'ins3:DocumentName' => '',
         'ins3:DocumentBase64String' => '',
         'ins3:DocumentId' => ''
      },
      'PaymentFeeAmount' => '0.50',
      'SignatureRequested' => 'FALSE',
      'FlowOrigin' => 'EXT',
      'ins4:FlowOrder' => {

      },
      'ins5:ImageUploadData' => {
         'ins5:ImageUploadRequested' => '',
         'ins5:ImageDescription' => ''
      }
   }

   response = client.call(:prepare_send_link, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature request is:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

The method to use is:
PrepareSendLink

Send an image request

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'PayorFirstName' => 'Adam',
  'PayorLastName' => 'Test',
  'MobileNum' => '',
  'Email' => 'adamemail@pdcflow.com',
  'VerificationPin' => '1234',
  'PinDescription' => 'Test description',
  'Amount' => '',
  'Description' => 'Approve this image',
  'UserId' => '',
  'MaxPinAttempts' => '',
  'RequestGeolocation' => '',
  'TimeoutMinutes' => '',
  'RedirectLink' => '',
  'CustomMessage' => '',
  'Version' => '1.6',
  'CustomFields' => [],
  'PaymentData' => [
    'PaymentType' => '',
    'AccountDirective' => ''
  ],
  'DocumentData' => [
    'DocumentName' => '',
    'DocumentBase64String' => '',
    'DocumentId' => ''
  ],
  'PaymentFeeAmount' => '',
  'SignatureRequested' => 'FALSE',
  'FlowOrigin' => 'EXT',
  'FlowOrder' => [

  ],
  'ImageUploadData' => [
    'ImageUploadRequested' => 'TRUE',
    'ImageDescription' => 'Take a picture of yourself'
  ]
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/psl';
$method = 'PrepareSendLink';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/psl' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'PayorFirstName' => 'Adam',
   'PayorLastName' => 'Test',
   'MobileNum' => '',
   'Email' => 'adamemail@pdcflow.com',
   'VerificationPin' => '1234',
   'PinDescription' => 'Test description',
   'Amount' => '',
   'Description' => 'Approve this image',
   'UserId' => '',
   'MaxPinAttempts' => '',
   'RequestGeolocation' => '',
   'TimeoutMinutes' => '',
   'RedirectLink' => '',
   'CustomMessage' => '',
   'Version' => '1.6',
   'CustomFields' => {},
   'PaymentData' => {
      'PaymentType' => '',
      'AccountDirective' => ''
   },
   'DocumentData' => {
      'DocumentName' => '',
      'DocumentBase64String' => '',
      'DocumentId' => ''
   },
   'PaymentFeeAmount' => '',
   'SignatureRequested' => 'FALSE',
   'FlowOrigin' => 'EXT',
   'FlowOrder' => {

   },
   'ImageUploadData' => {
      'ImageUploadRequested' => 'TRUE',
      'ImageDescription' => 'Take a picture of yourself'
   }
);

my @data;
foreach my $key ( keys %params ) {
   my %xmlns_map = (
      'CustomFields' => 'http://www.pdc4u.com/authsig/message/pdc_v1/cfl',
      'PaymentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/pay',
      'DocumentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/doc',
      'FlowOrder' => 'http://www.pdc4u.com/authsig/message/pdc_v1/ord',
      'ImageUploadData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/imu',
   );
   push @data, SOAP::Data->name( $key => $params{$key} )
      ->attr({xmlns => $xmlns_map{$key}});
}

print $soap->call( 'PrepareSendLinkRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'PayorFirstName' => 'Adam',
      'PayorLastName' => 'Test',
      'MobileNum' => '',
      'Email' => 'adamemail@pdcflow.com',
      'VerificationPin' => '1234',
      'PinDescription' => 'Test description',
      'Amount' => '',
      'Description' => 'Approve this image',
      'UserId' => '',
      'MaxPinAttempts' => '',
      'RequestGeolocation' => '',
      'TimeoutMinutes' => '',
      'RedirectLink' => '',
      'CustomMessage' => '',
      'Version' => '1.6',
      'ins1:CustomFields' => {},
      'ins2:PaymentData' => {
         'ins2:PaymentType' => '',
         'ins2:AccountDirective' => ''
      },
      'ins3:DocumentData' => {
         'ins3:DocumentName' => '',
         'ins3:DocumentBase64String' => '',
         'ins3:DocumentId' => ''
      },
      'PaymentFeeAmount' => '',
      'SignatureRequested' => 'FALSE',
      'FlowOrigin' => 'EXT',
      'ins4:FlowOrder' => {

      },
      'ins5:ImageUploadData' => {
         'ins5:ImageUploadRequested' => 'TRUE',
         'ins5:ImageDescription' => 'Take a picture of yourself'
      }
   }

   response = client.call(:prepare_send_link, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature request is:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

The method to use is:
PrepareSendLink

Send a signature, document, payment, and image request with modified order and custom fields

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

//read and encode pdf to upload
$pdfDocument = 'mydoc.pdf';
$handle = fopen($pdfDocument, "r");
$pdfContents = fread($handle, filesize($pdfDocument));
fclose($handle);
$documentData = base64_encode($pdfContents);

$params = [
  'PayorFirstName' => 'Adam',
  'PayorLastName' => 'Test',
  'MobileNum' => '',
  'Email' => 'adamemail@pdcflow.com',
  'VerificationPin' => '1234',
  'PinDescription' => 'Test description',
  'Amount' => '1.00',
  'Description' => 'Approve all of this',
  'UserId' => '',
  'MaxPinAttempts' => '',
  'RequestGeolocation' => '',
  'TimeoutMinutes' => '',
  'RedirectLink' => '',
  'CustomMessage' => '',
  'Version' => '1.6',
  'CustomFields' => [
       ['FieldName' => 'OS', 'FieldValue' => 'Windows'],
       ['FieldName' => 'Browser', 'FieldValue' => 'Firefox']
  ],
  'PaymentData' => [
    'PaymentType' => 'ACH',
    'AccountDirective' => 'XX-X'
  ],
  'DocumentData' => [
    'DocumentName' => '',
    'DocumentBase64String' => $documentData,
    'DocumentId' => ''
  ],
  'PaymentFeeAmount' => '0.50',
  'SignatureRequested' => 'TRUE',
  'FlowOrigin' => 'EXT',
  'FlowOrder' => [
    'FlowPage' => [
      'PG_SIG',
      'PG_IMG',
      'PG_DOC',
      'PG_PAY'
    ]
  ],
  'ImageUploadData' => [
    'ImageUploadRequested' => 'TRUE',
    'ImageDescription' => 'Take a picture of yourself'
  ]
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/psl';
$method = 'PrepareSendLink';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/psl' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# read and encode pdf to upload
my $pdfDocument = 'mydoc.pdf';
my $pdfContents = read_file( $pdfDocument );
my $documentData = encode_base64($pdfContents, ""); # encode without newlines

my %params = (
   'PayorFirstName' => 'Adam',
   'PayorLastName' => 'Test',
   'MobileNum' => '',
   'Email' => 'adamemail@pdcflow.com',
   'VerificationPin' => '1234',
   'PinDescription' => 'Test description',
   'Amount' => '1.00',
   'Description' => 'Approve all of this',
   'UserId' => '',
   'MaxPinAttempts' => '',
   'RequestGeolocation' => '',
   'TimeoutMinutes' => '',
   'RedirectLink' => '',
   'CustomMessage' => '',
   'Version' => '1.6',
   'CustomFields' => [
      {'FieldName' => 'OS', 'FieldValue' => 'Windows'},
      {'FieldName' => 'Browser', 'FieldValue' => 'Firefox'}
   ],
   'PaymentData' => {
      'PaymentType' => 'ACH',
      'AccountDirective' => 'XX-X'
   },
   'DocumentData' => {
      'DocumentName' => '',
      'DocumentBase64String' => $documentData,
      'DocumentId' => ''
   },
   'PaymentFeeAmount' => '0.50',
   'SignatureRequested' => 'TRUE',
   'FlowOrigin' => 'EXT',
   'FlowOrder' => {
      'FlowPage' => [
         'PG_SIG',
         'PG_IMG',
         'PG_DOC',
         'PG_PAY'
      ]
   },
   'ImageUploadData' => {
      'ImageUploadRequested' => 'TRUE',
      'ImageDescription' => 'Take a picture of yourself'
   }
);

my @data;
foreach my $key ( keys %params ) {
   my %xmlns_map = (
      'CustomFields' => 'http://www.pdc4u.com/authsig/message/pdc_v1/cfl',
      'PaymentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/pay',
      'DocumentData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/doc',
      'FlowOrder' => 'http://www.pdc4u.com/authsig/message/pdc_v1/ord',
      'ImageUploadData' => 'http://www.pdc4u.com/authsig/message/pdc_v1/imu',
   );
   push @data, SOAP::Data->name( $key => $params{$key} )
      ->attr({xmlns => $xmlns_map{$key}});
}

print $soap->call( 'PrepareSendLinkRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0
require 'base64'

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # read and encode pdf to upload
   pdfDocument = 'mydoc.pdf'
   file = File.open(pdfDocument, "rb")
   contents = file.read
   file.close
   documentData = Base64.strict_encode64(contents) # encode without newlines

   params = {
      'PayorFirstName' => 'Adam',
      'PayorLastName' => 'Test',
      'MobileNum' => '',
      'Email' => 'adamemail@pdcflow.com',
      'VerificationPin' => '1234',
      'PinDescription' => 'Test description',
      'Amount' => '1.00',
      'Description' => 'Approve all of this',
      'UserId' => '',
      'MaxPinAttempts' => '',
      'RequestGeolocation' => '',
      'TimeoutMinutes' => '',
      'RedirectLink' => '',
      'CustomMessage' => '',
      'Version' => '1.6',
      'CustomFields' => [
         {'FieldName' => 'OS', 'FieldValue' => 'Windows'},
         {'FieldName' => 'Browser', 'FieldValue' => 'Firefox'}
      ],
      'PaymentData' => {
         'PaymentType' => 'ACH',
         'AccountDirective' => 'XX-X'
      },
      'DocumentData' => {
         'DocumentName' => '',
         'DocumentBase64String' => $documentData,
         'DocumentId' => ''
      },
      'PaymentFeeAmount' => '0.50',
      'SignatureRequested' => 'TRUE',
      'FlowOrigin' => 'EXT',
      'FlowOrder' => {
         'FlowPage' => [
            'PG_SIG',
            'PG_IMG',
            'PG_DOC',
            'PG_PAY'
         ]
      },
      'ImageUploadData' => {
         'ImageUploadRequested' => 'TRUE',
         'ImageDescription' => 'Take a picture of yourself'
      }
   }

   response = client.call(:prepare_send_link, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature request is:
https://demo.pdc4u.com/AuthSignatureService/ws/preparesendlinkservices/preparesendlinkservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/psl

The method to use is:
PrepareSendLink

Sample Code - Retrieve

Retrieve a completed signature

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'TransId' => '1',
  'Version' => '',
  'DocumentId' => '',
  'ImageUploadId' => ''
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/signatureretrievalservices/signatureretrievalservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/sigr';
$method = 'SignatureRetrieval';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/sigr' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/signatureretrievalservices/signatureretrievalservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'TransId' => '1',
   'Version' => '',
   'DocumentId' => '',
   'ImageUploadId' => ''
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'SignatureRetrievalRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/signatureretrievalservices/signatureretrievalservice.wsdl',
      log_level: :debug,
      log: false,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'TransId' => '1',
      'Version' => '',
      'DocumentId' => '',
      'ImageUploadId' => ''
   }

   response = client.call(:signature_retrieval, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature retrieval request is:
https://demo.pdc4u.com/AuthSignatureService/ws/signatureretrievalservices/signatureretrievalservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/sigr

The method to use is:
SignatureRetrieval

Sample Code - Report

Retrieve details for signature id

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'StartDate' => '',
  'EndDate' => '',
  'FirstName' => '',
  'LastName' => '',
  'RecordStart' => '',
  'RecordCount' => '',
  'RetrieveOnlyCompletedRequests' => '',
  'ReportType' => 'DETAIL',
  'DocumentId' => '',
  'SignatureId' => 'X',
  'UserId' => '',
  'Version' => '',

];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturereportservices/signaturereportservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/srr';
$method = 'SignatureReport';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/srr' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturereportservices/signaturereportservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'StartDate' => '',
   'EndDate' => '',
   'FirstName' => '',
   'LastName' => '',
   'RecordStart' => '',
   'RecordCount' => '',
   'RetrieveOnlyCompletedRequests' => '',
   'ReportType' => 'DETAIL',
   'DocumentId' => '',
   'SignatureId' => 'X',
   'UserId' => '',
   'Version' => '',
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'SignatureReportRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturereportservices/signaturereportservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'StartDate' => '',
      'EndDate' => '',
      'FirstName' => '',
      'LastName' => '',
      'RecordStart' => '',
      'RecordCount' => '',
      'RetrieveOnlyCompletedRequests' => '',
      'ReportType' => 'DETAIL',
      'DocumentId' => '',
      'SignatureId' => 'X',
      'UserId' => '',
      'Version' => '',
   };

   response = client.call(:signature_report, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature report request is:
https://demo.pdc4u.com/AuthSignatureService/ws/signaturereportservices/signaturereportservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/srr

The method to use is:
SignatureReport

Sample Code - Modify

Cancel a signature request that was sent

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

  private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

  function __construct($user, $pass) {
    $auth = new stdClass();
    $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
    $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

    $username_token = new stdClass();
    $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

    $security_sv = new SoapVar(
      new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
      SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

    parent::__construct($this->wss_ns, 'Security', $security_sv, true);
  }
}

$params = [
  'TransId' => 'X',
  'UserId' => 'usernameOfPersonClosingThis',
  'Command' => 'CLOSE',
  'Version' => '1.6'
];

$url = 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturemodificationservices/signaturemodificationservice.wsdl';
$namespace = 'http://www.pdc4u.com/authsig/message/pdc_v1/smr';
$method = 'SignatureModification';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);


try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/authsig/message/pdc_v1/smr' )
   ->proxy( 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturemodificationservices/signaturemodificationservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

my %params = (
   'TransId' => 'X',
   'UserId' => 'usernameOfPersonClosingThis',
   'Command' => 'CLOSE',
   'Version' => '1.6'
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'SignatureModificationRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/AuthSignatureService/ws/signaturemodificationservices/signaturemodificationservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   params = {
      'TransId' => 'X',
      'UserId' => 'usernameOfPersonClosingThis',
      'Command' => 'CLOSE',
      'Version' => '1.6'
   }

   response = client.call(:signature_modification, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to use for a signature modification request is:
https://demo.pdc4u.com/AuthSignatureService/ws/signaturemodificationservices/signaturemodificationservice.wsdl

The namespace to use is:
http://www.pdc4u.com/authsig/message/pdc_v1/smr

The method to use is:
SignatureModification

Credit Card API

The credit card API allows you to easily process credit cards, tokenize a card number for future use, and run payments exclusively from a tokenized card.

API Request

userInfo

The following table describes the individual elements of the userInfo object.

Attribute Description
customerID
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer processing credit cards.
securityKey
Alphanumeric128
Required
A password that together with the customerId uniquely identifies the customer processing credit cards.
accountSet
Numeric4
Required
Code to determine what account to deposit funds.
Format: Always 4 digits (0001, 0012, 0104, etc)
testMode
Deprecated
This element is deprecated. Do not include in request.
userName
Alphanumeric75
The user who submitted the transaction.

creditCard

The following table describes the individual elements of the creditCard object.

Attribute Description
cardHolderFirstName
Alpha45
Required
First name of card holder.
cardHolderLastName
Alpha45
Required
Last name of card holder.
cardHolderStreetAddress1
Alphanumeric80
Card holder street address line 1.
cardHolderStreetAddress2
Alphanumeric45
Card holder street address line 2.
cardHolderCity
Alphanumeric45
Card holder city.
cardHolderState
Alpha2
Card holder state.
Format: two character abbreviation (UT, CA, MI, etc)
cardHolderZipCode
Alpha10
Card holder zip code.
cardHolderCountry
Deprecated
This element is deprecated. Do not include in request.
cardHolderEmailAddress
Alphanumeric75
Email address where a receipt will be sent at the completion of the transaction.
cardHolderPhoneNumber
Alphanumeric12
Card holder telephone number.
Format: XXX-XXX-XXXX
cardHolderPhoneNumberType
Deprecated
This element is deprecated. Do not include in request.
accountReference
Alphanumeric45
Required
Reference/ID value. This is often the customer account number from your system.
memoInformation
Alphanumeric50
Memo information for the explanation of the transaction.
cardMagStripeData
AlphanumericN/A
Conditional
Mag Stripe data read from card using a PDCflow approved card scanner.
Constraint(s): Required when using scanner.
cardNumber
Alphanumeric16
Conditional
Credit card number.
Constraint(s): Required for all transactions, except for CREDIT or VOID that were originally scanned through an approved PDCflow scanner.

See Test Credit Cards in the Appendix for values and expected results.
cardExpirationMonth
Numeric2
Conditional
Credit expiration month.
Format: 2 digit month, such as 01, 08, 12, etc.
Constraint(s): Required for all transactions, except for CREDIT or VOID that were originally scanned through an approved PDCflow scanner.
cardExpirationYear
Numeric2
Conditional
Card expiration year.
Format: 2 digit year, such as 17.
Constraint(s): Required for all transactions, except for CREDIT or VOID that were originally scanned through an approved PDCflow scanner.
cardCvv2
Numeric4
Card CVV2 number. This will be 3 digits for Visa, MasterCard, and Discover, and 4 digits for American Express cards.
chargeAmount
Numeric11
Conditional
The net dollar amount paid by the payor.
Format: XXXX.XX
Do not use any formatting symbols such as currency symbols ($), commas etc.
Constraint(s): Required for all transactions, except when storing a card using the storeCard method.
convenienceFee
Numeric11
Conditional
Transaction fee amount. Fee amount to be added to the charge amount. If no fee is to be added to this transaction a value of zero (0) still needs to be provided.
Format: XXXX.XX
Do not use any formatting symbols such as currency symbols ($), commas etc.
Constraint(s): Required for all transactions, except when storing a card using the storeCard method.
currencyType
Alpha3
Required
As an integrator, this must be set to EXT.
Valid value(s): EXT
processingCommand
Alpha6
Required
Indicates how the card is to be processed.
Valid value(s): SALE, VOID, CREDIT
secondaryTrace
Alphanumeric50
Location information about a company.
originalOrderNumber
Numeric20
Conditional
When issuing a CREDIT or VOID, the original order number should be provided here.
Constraint(s): Required with processingCommand of CREDIT or VOID.
originalAmount
Deprecated
This element is deprecated. Do not include in request.

vaultInfo

The following table describes the individual elements of the vaultInfo object.

Attribute Description
vaultKey
Alphanumeric20
Conditional
The token for a card. This token should have been previously stored.
Constraint(s): Required when using the processStoredCreditCardTransaction method.

API Result

-- Sample success XML --
<return>
    <processingResult>&lt;processing-results>&lt;result>OK&lt;/result>&lt;/processing-results></processingResult>
    <gatewayResponseData><![CDATA[<?xml version="1.0" ?><com.pdc4u.webservices.gps.TransactionResponse><requestResultStatus>APPROVED</requestResultStatus><cardTransactionResult><transactionId>23608</transactionId><cardToken>removedFromSample</cardToken><authorizationCode>095242</authorizationCode><cvv2ResultCode>M</cvv2ResultCode><roundTripNVPS></roundTripNVPS></cardTransactionResult><checkTransactionResult></checkTransactionResult><checkStatusUpdateResult><newStatus></newStatus><transactionId></transactionId><roundTripNVPS></roundTripNVPS></checkStatusUpdateResult><requestErrors><requestError></requestError></requestErrors></com.pdc4u.webservices.gps.TransactionResponse>]]></gatewayResponseData>
    <orderNumber>23608</orderNumber>
    <authorizationCode>095242</authorizationCode>
    <softwareVersion/>
    <state>OK</state>
 </return>
 -- Sample error XML --
 <return>
     <processingResult><![CDATA[<processing-results><result>Error</result><error>Field Card Expiration Year is required.</error><error>Field Card Expiration Month is required.</error></processing-results>]]></processingResult>
     <gatewayResponseData><![CDATA[<?xml version="1.0" ?><com.pdc4u.webservices.gps.TransactionResponse><requestResultStatus>ERROR</requestResultStatus><cardTransactionResult><transactionId></transactionId><authorizationCode></authorizationCode><cvv2ResultCode></cvv2ResultCode><roundTripNVPS></roundTripNVPS></cardTransactionResult><checkTransactionResult><roundTripNVPS></roundTripNVPS></checkTransactionResult><checkStatusUpdateResult><newStatus></newStatus><transactionId></transactionId><roundTripNVPS></roundTripNVPS></checkStatusUpdateResult><requestErrors><requestError><com.pdc4u.webservices.gps.RequestError><code>10001</code><description>Field Card Expiration Year is required.</description></com.pdc4u.webservices.gps.RequestError><com.pdc4u.webservices.gps.RequestError><code>10001</code><description>Field Card Expiration Month is required.</description></com.pdc4u.webservices.gps.RequestError></requestError></requestErrors></com.pdc4u.webservices.gps.TransactionResponse>]]></gatewayResponseData>
     <orderNumber/>
     <authorizationCode/>     
     <softwareVersion/>
     <state>ERROR</state>
     <transactionProcessingMessages>
        <message>Field Card Expiration Year is required.</message>
        <xmlTag>error</xmlTag>
     </transactionProcessingMessages>
     <transactionProcessingMessages>
        <message>Field Card Expiration Month is required.</message>
        <xmlTag>error</xmlTag>
     </transactionProcessingMessages>
  </return>

The following table describes the individual elements in a response. Sample success and failure examples are listed to the right.

Attribute Description
processingResult
XMLN/A
Result of the transaction.
gatewayResponseData
XMLN/A
Similar to processingResult, but contains additional information, such as a card token, cvv2 result, and customizable roundtrip name/value pairs.
orderNumber
Numeric20
Order/Confirmation number of transaction. Returned in conjunction with authorizationCode when a transaction is successfully processed through the gateway.
authorizationCode
Alphanumeric75
Returned in conjunction with orderNumber when a transaction is successfully processed through the gateway. This value will be blank when issuing a VOID.
softwareVersion
Alphanumeric20
The version number of the the CreditCard SOAP Service.
state
Alpha10
The result of a request. A successful request will have a state of OK. Attribute not present when using storeCard.
transactionProcessingMessages
XMLN/A
Error messages from a request. This attribute will not be present on a successful request, but can exist one or more times with an error. See example to the right for structure of attribute.

API Fault

Generally, the only time a fault should be thrown is if you can’t connect to our system, or if the soap package is malformed. Verify you can access our WSDL and that all required elements listed above are present in your request.

Credit Card Vault

PDCflow also offers a Credit Card Vault for even more secure credit card processing, particularly in the event of a recurring payment or other multiple transactions. The Vault is fully PCI-DSS compliant and allows you to process transactions without the risk of passing actual credit card information in a live environment. There are two distinct web services in the package. The first is to set up the key that will apply to the credit card number and then a second service to process a transaction based on the key.

The WSDL for the Vault and the Credit Card Processing are nearly identical. It will require the same core input as listed in the previous chart for the Credit Card transaction WSDL. The primary difference is that you will “Store” the card number in the Vault and the Vault will do any future processing of that card. When you store the card in the Vault, it will return a “cardStorageResult” as opposed to a card processing result. This element will also return a unique “authorizationKey”. You will need to save and store this key. When you wish to process a charge to the credit card, you will use the Key as a reference for the card number that is inside the Vault.

A stored card transaction uses the same basic information as for a normal credit card transaction. For the new charge, you will need to send the new transaction information that includes the processingCommand and the chargeAmount/convenienceFee.

Sample Code

This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Credit Card Services API and are not meant for production use.

Process a basic credit card transaction

<?php

// Get customer-specific information
$userInformation = [
    'accountSet' => '0001',
    'customerID' => '0000',
    'securityKey' => 'SomeSecurityKey',
    'userName' => 'frontenduser@pdc4u.com'
];

// Payment-specific information
$creditCardInformation = [
    'cardHolderFirstName' => 'Adam',
    'cardHolderLastName' => 'Test',
    'cardHolderStreetAddress1' => '1234 Main St.',
    'cardHolderStreetAddress2' => 'Apt. 7B',
    'cardHolderCity' => 'Ogden',
    'cardHolderState' => 'UT',
    'cardHolderZipCode' => '84404',
    'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
    'cardHolderPhoneNumber' => '777-777-7777',
    'accountReference' => 'AB1234',
    'memoInformation' => 'December payment',
    'cardMagStripeData' => '',
    'cardNumber' => '4000100011112224',
    'cardExpirationMonth' => '09',
    'cardExpirationYear'=> '22',
    'cardCvv2' => '123',        
    'chargeAmount' => '5.00',
    'convenienceFee' => '0.50',
    'currencyType' => 'EXT',
    'processingCommand' => 'SALE',
    'secondaryTrace' => '',
    'originalOrderNumber' => ''
];

$url = 'https://demo.pdc4u.com/CreditCardServices/CreditCardTransactionProcessor?wsdl';
$namespace = 'http://transaction.webservices.pdc4u.com';
$method = 'processCreditCardTransaction';
$params = [
    'creditCard' => $creditCardInformation,
    'userInfo'=> $userInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}

#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transaction.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/CreditCardServices/CreditCardTransactionProcessor?wsdl' );

my %userInformation = (
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
);

# Payment-specific information
my %creditCardInformation = (
   'cardHolderFirstName' => 'Adam',
   'cardHolderLastName' => 'Test',
   'cardHolderStreetAddress1' => '1234 Main St.',
   'cardHolderStreetAddress2' => 'Apt. 7B',
   'cardHolderCity' => 'Ogden',
   'cardHolderState' => 'UT',
   'cardHolderZipCode' => '84404',
   'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
   'cardHolderPhoneNumber' => '777-777-7777',
   'accountReference' => 'AB1234',
   'memoInformation' => 'December payment',
   'cardMagStripeData' => '',
   'cardNumber' => '4000100011112224',
   'cardExpirationMonth' => '09',
   'cardExpirationYear'=> '22',
   'cardCvv2' => '123',
   'chargeAmount' => '5.00',
   'convenienceFee' => '0.50',
   'currencyType' => 'EXT',
   'processingCommand' => 'SALE',
   'secondaryTrace' => '',
   'originalOrderNumber' => ''
);

print $soap->call( 'processCreditCardTransaction',
   SOAP::Data->name('creditCard' => \%creditCardInformation),
   SOAP::Data->name('userInfo' => \%userInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/CreditCardServices/CreditCardTransactionProcessor?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer-specific information
   userInformation = {
      'accountSet' => '0001',
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'userName' => 'frontenduser@pdc4u.com'
   }

   # Payment-specific information
   creditCardInformation = {
      'cardHolderFirstName' => 'Adam',
      'cardHolderLastName' => 'Test',
      'cardHolderStreetAddress1' => '1234 Main St.',
      'cardHolderStreetAddress2' => 'Apt. 7B',
      'cardHolderCity' => 'Ogden',
      'cardHolderState' => 'UT',
      'cardHolderZipCode' => '84404',
      'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
      'cardHolderPhoneNumber' => '777-777-7777',
      'accountReference' => 'AB1234',
      'memoInformation' => 'December payment',
      'cardMagStripeData' => '',
      'cardNumber' => '4000100011112224',
      'cardExpirationMonth' => '09',
      'cardExpirationYear'=> '22',
      'cardCvv2' => '123',
      'chargeAmount' => '5.00',
      'convenienceFee' => '0.50',
      'currencyType' => 'EXT',
      'processingCommand' => 'SALE',
      'secondaryTrace' => '',
      'originalOrderNumber' => ''
   }

   params = {
      'creditCard' => creditCardInformation,
      'userInfo'=> userInformation
   }

   response = client.call(:process_credit_card_transaction, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

General transactions will use this method. It will simply accept credit card details, and process the card.

The URL to process a credit card is:
https://demo.pdc4u.com/CreditCardServices/CreditCardTransactionProcessor?wsdl

The namespace to use is:
http://transaction.webservices.pdc4u.com

The method to use is:
processCreditCardTransaction

Store a credit card in the vault

<?php

// Get customer-specific information
$userInformation = [
    'accountSet' => '0001',
    'customerID' => '0000',
    'securityKey' => 'SomeSecurityKey',
    'userName' => 'frontenduser@pdc4u.com'
];

// Payment-specific information
$creditCardInformation= [
    'cardHolderFirstName' => 'Adam',
    'cardHolderLastName' => 'Test',
    'cardHolderStreetAddress1' => '1234 Main St.',
    'cardHolderStreetAddress2' => 'Apt. 7B',
    'cardHolderCity' => 'Ogden',
    'cardHolderState' => 'UT',
    'cardHolderZipCode' => '84404',
    'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
    'cardHolderPhoneNumber' => '777-777-7777',
    'accountReference' => 'AB1234',
    'memoInformation' => 'December payment',
    'cardMagStripeData' => '',
    'cardNumber' => '4000100011112224',
    'cardExpirationMonth' => '09',
    'cardExpirationYear'=> '22',
    'cardCvv2' => '',       
    'chargeAmount' => '',
    'convenienceFee' => '',
    'currencyType' => 'EXT',
    'processingCommand' => 'SALE',
    'secondaryTrace' => '',
    'originalOrderNumber' => ''
];

$url = 'https://demo.pdc4u.com/CreditCardServices/CardVault?wsdl';
$namespace = 'http://transaction.webservices.pdc4u.com';
$method = 'storeCard';
$params = [
    'creditCard' => $creditCardInformation,
    'userInfo'=> $userInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$parms, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transaction.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/CreditCardServices/CardVault?wsdl' );

my %userInformation = (
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
);

# Payment-specific information
my %creditCardInformation = (
   'cardHolderFirstName' => 'Adam',
   'cardHolderLastName' => 'Test',
   'cardHolderStreetAddress1' => '1234 Main St.',
   'cardHolderStreetAddress2' => 'Apt. 7B',
   'cardHolderCity' => 'Ogden',
   'cardHolderState' => 'UT',
   'cardHolderZipCode' => '84404',
   'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
   'cardHolderPhoneNumber' => '777-777-7777',
   'accountReference' => 'AB1234',
   'memoInformation' => 'December payment',
   'cardMagStripeData' => '',
   'cardNumber' => '4000100011112224',
   'cardExpirationMonth' => '09',
   'cardExpirationYear'=> '22',
   'cardCvv2' => '123',
   'chargeAmount' => '',
   'convenienceFee' => '',
   'currencyType' => 'EXT',
   'processingCommand' => 'SALE',
   'secondaryTrace' => '',
   'originalOrderNumber' => ''
);

print $soap->call( 'storeCard',
   SOAP::Data->name('creditCard' => \%creditCardInformation),
   SOAP::Data->name('userInfo' => \%userInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/CreditCardServices/CardVault?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer-specific information
   userInformation = {
      'accountSet' => '0001',
      #'customerID' => '0000',
      #'securityKey' => 'SomeSecurityKey',
      'customerID' => '6299',
      'securityKey' => '31819d62fe0161d307defb1737b74ba4',
      'userName' => 'frontenduser@pdc4u.com'
   }

   # Payment-specific information
   creditCardInformation= {
      'cardHolderFirstName' => 'Adam',
      'cardHolderLastName' => 'Test',
      'cardHolderStreetAddress1' => '1234 Main St.',
      'cardHolderStreetAddress2' => 'Apt. 7B',
      'cardHolderCity' => 'Ogden',
      'cardHolderState' => 'UT',
      'cardHolderZipCode' => '84404',
      'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
      'cardHolderPhoneNumber' => '777-777-7777',
      'accountReference' => 'AB1234',
      'memoInformation' => 'December payment',
      'cardMagStripeData' => '',
      'cardNumber' => '4000100011112224',
      'cardExpirationMonth' => '09',
      'cardExpirationYear'=> '22',
      'cardCvv2' => '',
      'chargeAmount' => '',
      'convenienceFee' => '',
      'currencyType' => 'EXT',
      'processingCommand' => 'SALE',
      'secondaryTrace' => '',
      'originalOrderNumber' => ''
   }

   params = {
      'creditCard' => creditCardInformation,
      'userInfo'=> userInformation
   }

   response = client.call(:store_card, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Tokenize card details to be used later, generally in conjunction with the next code sample, the processStoredCreditCardTransaction method. This will only store a card, it will not process a transaction. Transaction details are generally not required at this point, as you are only storing card information. The cvv2 is also not necessary, as this piece of data can not be stored.

The URL to test the vault storage service is:
https://demo.pdc4u.com/CreditCardServices/CardVault?wsdl

The namespace to use is:
http://transaction.webservices.pdc4u.com

The method to use is:
storeCard

Process a credit card transaction from the vault

<?php

// Get customer-specific information
$userInformation = [
    'accountSet' => '0001',
    'customerID' => '0000',
    'securityKey' => 'SomeSecurityKey',
    'userName' => 'frontenduser@pdc4u.com'
];

// Payment-specific information
$creditCardInformation = [
    'cardHolderFirstName' => 'Adam',
    'cardHolderLastName' => 'Test',
    'cardHolderStreetAddress1' => '1234 Main St.',
    'cardHolderStreetAddress2' => 'Apt. 7B',
    'cardHolderCity' => 'Ogden',
    'cardHolderState' => 'UT',
    'cardHolderZipCode' => '84404',
    'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
    'cardHolderPhoneNumber' => '777-777-7777',
    'accountReference' => 'AB1234',
    'memoInformation' => 'December payment',
    'cardMagStripeData' => '',
    'cardNumber' => '',
    'cardExpirationMonth' => '',
    'cardExpirationYear'=> '',
    'cardCvv2' => '',       
    'chargeAmount' => '5.00',
    'convenienceFee' => '0.50',
    'currencyType' => 'EXT',
    'processingCommand' => 'SALE',
    'secondaryTrace' => '',
    'originalOrderNumber' => ''
];

//Tokenized card from vault to use
$vaultInformation = [
    'vaultKey' => 'abc123'
];

$url = 'https://demo.pdc4u.com/CreditCardServices/StoredCreditCardTransactionProcessor?wsdl';
$namespace = 'http://transaction.webservices.pdc4u.com';
$method = 'processStoredCreditCardTransaction';
$params = [
    'creditCard' => $creditCardInformation,
    'userInfo'=> $userInformation,
    'vaultInfo' => $vaultInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$parms, $namespace]
  );

  print_r($response);
}
catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transaction.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/CreditCardServices/StoredCreditCardTransactionProcessor?wsdl' );

my %userInformation = (
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
);

# Payment-specific information
my %creditCardInformation = (
   'cardHolderFirstName' => 'Adam',
   'cardHolderLastName' => 'Test',
   'cardHolderStreetAddress1' => '1234 Main St.',
   'cardHolderStreetAddress2' => 'Apt. 7B',
   'cardHolderCity' => 'Ogden',
   'cardHolderState' => 'UT',
   'cardHolderZipCode' => '84404',
   'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
   'cardHolderPhoneNumber' => '777-777-7777',
   'accountReference' => 'AB1234',
   'memoInformation' => 'December payment',
   'cardMagStripeData' => '',
   'cardNumber' => '',
   'cardExpirationMonth' => '',
   'cardExpirationYear'=> '',
   'cardCvv2' => '',
   'chargeAmount' => '5.00',
   'convenienceFee' => '0.50',
   'currencyType' => 'EXT',
   'processingCommand' => 'SALE',
   'secondaryTrace' => '',
   'originalOrderNumber' => ''
);

# Tokenized card from vault to use
my %vaultInformation = (
   'vaultKey' => 'abc123'
);

print $soap->call( 'processStoredCreditCardTransaction',
   SOAP::Data->name('creditCard' => \%creditCardInformation),
   SOAP::Data->name('userInfo' => \%userInformation),
   SOAP::Data->name('vaultInfo' => \%vaultInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/CreditCardServices/StoredCreditCardTransactionProcessor?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer-specific information
   userInformation = {
      'accountSet' => '0001',
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'userName' => 'frontenduser@pdc4u.com'
   };

   # Payment-specific information
   creditCardInformation = {
      'cardHolderFirstName' => 'Adam',
      'cardHolderLastName' => 'Test',
      'cardHolderStreetAddress1' => '1234 Main St.',
      'cardHolderStreetAddress2' => 'Apt. 7B',
      'cardHolderCity' => 'Ogden',
      'cardHolderState' => 'UT',
      'cardHolderZipCode' => '84404',
      'cardHolderEmailAddress' => 'adamemail@pdc4u.com',
      'cardHolderPhoneNumber' => '777-777-7777',
      'accountReference' => 'AB1234',
      'memoInformation' => 'December payment',
      'cardMagStripeData' => '',
      'cardNumber' => '',
      'cardExpirationMonth' => '',
      'cardExpirationYear'=> '',
      'cardCvv2' => '',
      'chargeAmount' => '5.00',
      'convenienceFee' => '0.50',
      'currencyType' => 'EXT',
      'processingCommand' => 'SALE',
      'secondaryTrace' => '',
      'originalOrderNumber' => ''
   }

   # Tokenized card from vault to use
   vaultInformation = {
      'vaultKey' => 'abc123'
   }

   params = {
      'creditCard' => creditCardInformation,
      'userInfo'=> userInformation,
      'vaultInfo' => vaultInformation
   }

   response = client.call(:process_stored_credit_card_transaction, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

A vault key should have been stored previously. Generally, you would use the previous code example to generate the vault key (storeCard method). Using that key, you can now process a card without having to resubmit the card information.

The URL for testing the processing on a card that is already in the vault is:
https://demo.pdc4u.com/CreditCardServices/StoredCreditCardTransactionProcessor?wsdl

The namespace to use is:
http://transaction.webservices.pdc4u.com

The method to use is:
processStoredCreditCardTransaction

ECheck API

This document describes the different objects and methods required to use the PDCflow ECheckServices SOAP services.

The PDCflow ECheck API consists of a few web services:

Transaction Processing

Submit an ACH transaction to the PDCflow ACH system. A transaction can be processed one at a time, or in a batch mode. The objects required are the same. See the sample code below for how to send one transaction vs multiple transactions.

API Processing Request

userInfo

The following table describes the individual elements of the userInfo object.

Attribute Description
customerID
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer processing ACH transactions.
securityKey
Alphanumeric128
Required
A password that together with the customerID uniquely identifies the customer processing ACH transactions.
pdcAccountSet
Numeric2
Required
Code to determine what account to deposit funds.
Format: 01, 02, 10, etc.
userName
Alphanumeric50
The user who submitted the transaction.
groupID
Deprecated
This element is deprecated. Do not include in request.
interLevelBillingCode
Deprecated
This element is deprecated. Do not include in request.

API Processing Request

achTransaction

The following table describes the individual elements of the achTransaction object.

Attribute Description
payorFirstName
Alpha45
Required
Payor first name.
payorLastName
Alpha45
Required
Payor last name.
payorStreetAddress1
Alphanumeric45
The first line of the street/mailing address of the payor.
payorStreetAddress2
Alphanumeric45
The second line of the street/mailing address of the payor.
payorCity
Alpha45
Payor city.
payorState
Alphanumeric2
Payor state.
Format: two character abbreviation (UT, CA, MI, etc)
payorZip
Numeric10
Payor zip code.
transactionEmailAddress
Alphanumeric75
Email address where a receipt will be sent at the completion of the transaction.
payorPhoneNumber
Numeric15
Payor telephone number.
Format: XXX-XXX-XXXX
payorPhoneNumberType
Deprecated
This element is deprecated. Do not include in request.
payorAccountReference
Numeric20
Required
Reference/ID value. This is often the customer account number from your system.
payorMemoInformation
Alphanumeric50
Memo information for the explanation of the transaction.
payorBankRoutingNumber
Numeric9
Required
Payor bank routing number.
payorBankAccountNumber
Numeric20
Required
Payor bank account number.
payorCheckNumber
Numeric10
Check number to appear on any printed check representing this transaction.
payorAccountType
Alpha1
Required
Account type of the payor, Checking or Savings.
Valid value(s): C, S
chargeAmount
Numeric11
Required
The net dollar amount paid by the payor.
Format: XXXX.XX
Do not use any formatting symbols such as currency symbols ($), commas etc.
feeAmount
Numeric11
Required
Transaction fee amount. Fee amount to be added to the charge amount.
Format: XXXX.XX
Do not use any formatting symbols such as currency symbols ($), commas etc.
Constraint(s): If no fee is to be added to this transaction a value of zero “0” still needs to be submitted.
transactionOrigin
Alpha3
Required
The origin of the transaction.
Valid value(s): EXT
payorTransactionType
Alpha1
Required
Type of transaction, Debit or Credit.
Valid value(s): D, C
achEntryCode
Alpha3
Required
The NACHA/ACH entry code.
processingDate
Date10
Required
This element represents the date the payment should be submitted to the ACH payment system.
Format: YYYY-MM-DD
secondaryTrace
Alphanumeric50
Location information about a company.

API Processing Result

processACHTransactionResponse

The following table describes the individual elements of the processACHTransactionResponse object. This object represents the results of a processed transaction.

Attribute Description
processingResult
Alpha5
The result of the transaction request.
Valid value(s):
OK - The transaction was processed successfully.
ERROR - The transaction failed.
resultMessage
Alpha256
Detailed explanation of the result of the processed transaction. If processingResult was ERROR this field will provide details about why the transaction processing failed.
transactionID
Numeric20
Order/Confirmation number to transaction. This is used as a reference to a particular transaction after submission to the PDCflow system.
achTransaction
ObjectN/A
The transaction details that were contained in your original request.

API Processing Fault

Generally, the only time a fault should be thrown is if you can’t connect to our system, or if the soap package is malformed. Verify you can access our wsdl and that all required elements listed above are present in your request.

Transaction Inquiry

Retrieve the status details of a transaction you have previously submitted.

API Inquiry Request

echeckInquiryData

The following table describes the individual elements of the echeckInquiryData object.

Attribute Description
customerID
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer requesting ACH transaction information.
securityKey
Alphanumeric128
Required
A password that together with the customerID uniquely identifies the customer requesting ACH transaction information.
primaryTrace
Numeric20
Required
Order/Confirmation number of the transaction being inquired upon. If following up on a transaction submitted using the standard transaction processing, this would be the transactionID.

API Inquiry Result

getECheckDataResponse

The following table describes the individual elements of the getECheckDataResponse object. An ACH transaction can have more than one status message at a time, so these values can have more than one instance in a response.

Attribute Description
status
Alpha12
Current state of check in the ACH payment cycle.
Valid value(s):
WAITING - transaction will be included in next batch
SUBMITTED - transaction has been submitted for processing
ACKNOWLEDGED - transaction has been accepted for processing
FUNDED - money has been deposited into your account
DEDUCTION - money has been taken from your account
VOID - transaction was cancelled prior to submission for processing
RETURNED - an exception occured while processing transaction
CORRECTION - transaction was automatically corrected during processing
ERROR - an unknown error occured while processing transaction
statusDate
DateTime21
The date and time the check was submitted to PDCflow.
Format: YYYY-MM-DD HH:mm:SS.S
statusDescription
Alpha256
Extended description of the status
secondaryTrace
Alphanumeric32
Location information about a company.

API Inquiry Fault

Generally, the only time a fault should be thrown is if you can’t connect to our system, or if the soap package is malformed. Verify you can access our wsdl and that all required elements listed above are present in your request.

Transaction Status Inquiry

Retrieve a list of all status changes for all transactions since your last request.

API Update Inquiry Request

getECheckDataUpdates

The following table describes the individual elements of the getECheckDataUpdates object.

Attribute Description
customerID
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer requesting ACH status information.
securityKey
Alphanumeric128
Required
A password that together with the customerID uniquely identifies the customer requesting ACH status information.

API Update Inquiry Result

getECheckDataUpdatesResponse

The following table describes the individual elements of the getECheckDataUpdatesResponse object.

Attribute Description
id
Numeric20
The transactionID
status
Alpha12
Current state of check in the ACH payment cycle.
Valid value(s):
WAITING - transaction will be included in next batch
SUBMITTED - transaction has been submitted for processing
ACKNOWLEDGED - transaction has been accepted for processing
FUNDED - money has been deposited into your account
DEDUCTION - money has been taken from your account
VOID - transaction was cancelled prior to submission for processing
RETURNED - an exception occured while processing transaction
CORRECTION - transaction was automatically corrected during processing
ERROR - an unknown error occured while processing transaction
statusDate
DateTime21
The date and time the check was submitted to PDCflow.
Format: YYYY-MM-DD HH:mm:SS.SM
statusDescription
Alpha256
Extended description of the status
secondaryTrace
Alphanumeric32
Location information about a company.

API Update Inquiry Fault

Generally, the only time a fault should be thrown is if you can’t connect to our system, or if the soap package is malformed. Verify you can access our wsdl and that all required elements listed above are present in your request.

Transaction Updating

Update the status of a previously submitted transaction. Currently, the only allowed method is to void a transaction. This will keep the transaction from being sent into the ACH network.

API Updating Request

eCheckUpdateData

The following table describes the individual elements of the eCheckUpdateData object.

Attribute Description
customerID
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer requesting the update.
securityKey
Alphanumeric128
Required
A password that together with the customerID uniquely identifies the customer requesting the update.
primaryTrace
Numeric20
Required
Order/Confirmation number of the transaction being inquired upon. If following up on a transaction submitted using the standard transaction processing, this would be the transactionID.
newStatus
Alpha4
Required
New status to assign to the transaction.
Valid value(s): VOID

API Updating Result

updateStatusResponse

The following table describes the individual elements of the updateStatusResponse object.

Attribute Description
status
Alpha5
The status of the transaction.
Valid value(s):
OK - The transaction was processed successfully.
ERROR - The transaction failed.
resultMessage
Alpha256
Result of attempted update.

API Updating Fault

Generally, the only time a fault should be thrown is if you can’t connect to our system, or if the soap package is malformed. Verify you can access our wsdl and that all required elements listed above are present in your request. Common pieces to watch for are an incorrect namespace, missing one of the required 4 elements, or an element that is missing a value.

Sample Code

This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Credit Card Services API and are not meant for production use.

processACHTransaction - Transaction Processing - individual transaction

<?php
// Get customer-specific information
$userInformation = [
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
];

// Payment-specific information
$achInformation = [
  'payorFirstName' => 'Adam',
  'payorLastName' => 'Test',
  'payorStreetAddress1' => '1234 Main St.',
  'payorStreetAddress2' => 'Apt. 7B',
  'payorCity' => 'Ogden',
  'payorState' => 'UT',
  'payorZip' => '84404',
  'transactionEmailAddress' => 'adamemail@pdc4u.com',
  'payorPhoneNumber' => '777-777-7777',
  'payorAccountReference' => 'AB1234',
  'payorMemoInformation' => 'December payment',
  'payorBankRoutingNumber' => '124001545',
  'payorBankAccountNumber' => '123456',
  'payorCheckNumber' => '9999',
  'payorAccountType' => 'C',
  'chargeAmount' => '5.00',
  'feeAmount' => '0.50',
  'transactionOrigin' => 'EXT',
  'payorTransactionType' => 'D',
  'achEntryCode' => 'WEB',
  'processingDate' => '2017-05-31',
  'secondaryTrace' => ''
];

$url = 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl';
$namespace = 'http://transaction.webservices.pdc4u.com';
$method = 'processACHTransaction';
$params = [
  'achTransaction' => $achInformation,
  'userInfo'=> $userInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
} catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transaction.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl' );

my %userInformation = (
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
);

# Payment-specific information
my %achInformation = (
  'payorFirstName' => 'Adam',
  'payorLastName' => 'Test',
  'payorStreetAddress1' => '1234 Main St.',
  'payorStreetAddress2' => 'Apt. 7B',
  'payorCity' => 'Ogden',
  'payorState' => 'UT',
  'payorZip' => '84404',
  'transactionEmailAddress' => 'adamemail@pdc4u.com',
  'payorPhoneNumber' => '777-777-7777',
  'payorAccountReference' => 'AB1234',
  'payorMemoInformation' => 'December payment',
  'payorBankRoutingNumber' => '124001545',
  'payorBankAccountNumber' => '123456',
  'payorCheckNumber' => '9999',
  'payorAccountType' => 'C',
  'chargeAmount' => '5.00',
  'feeAmount' => '0.50',
  'transactionOrigin' => 'EXT',
  'payorTransactionType' => 'D',
  'achEntryCode' => 'WEB',
  'processingDate' => '2017-05-31',
  'secondaryTrace' => ''
);

my @transaction;
foreach my $key ( keys %achInformation ) {
   push @transaction, SOAP::Data->name( $key => $achInformation{$key} );
}

# userInfo
my @userInfo;
foreach my $key ( keys %userInformation ) {
   push @userInfo, SOAP::Data->name( $key => $userInformation{$key} );
}

print $soap->call( 'processACHTransaction',
   SOAP::Data->name('achTransaction' => \SOAP::Data->value(@transaction)),
   SOAP::Data->name('userInfo' => \SOAP::Data->value(@userInfo))
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer-specific information
   userInformation = {
      'pdcAccountSet' => '01',
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'userName' => 'frontenduser@pdc4u.com'
   }

   # Payment-specific information
   achInformation = {
      'payorFirstName' => 'Adam',
      'payorLastName' => 'Test',
      'payorStreetAddress1' => '1234 Main St.',
      'payorStreetAddress2' => 'Apt. 7B',
      'payorCity' => 'Ogden',
      'payorState' => 'UT',
      'payorZip' => '84404',
      'transactionEmailAddress' => 'adamemail@pdc4u.com',
      'payorPhoneNumber' => '777-777-7777',
      'payorAccountReference' => 'AB1234',
      'payorMemoInformation' => 'December payment',
      'payorBankRoutingNumber' => '124001545',
      'payorBankAccountNumber' => '123456',
      'payorCheckNumber' => '9999',
      'payorAccountType' => 'C',
      'chargeAmount' => '5.00',
      'feeAmount' => '0.50',
      'transactionOrigin' => 'EXT',
      'payorTransactionType' => 'D',
      'achEntryCode' => 'WEB',
      'processingDate' => '2017-05-31',
      'secondaryTrace' => ''
   }

   # Build the parameters
   params = {
      'achTransaction' => achInformation,
      'userInfo' => userInformation
   };

   response = client.call(:process_ach_transaction, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

General transactions will use this method. It will simply accept ach details, and process the transaction.

The URL to process a check is:
https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl

The namespace to use is:
http://transaction.webservices.pdc4u.com

The method to use is:
processACHTransaction

processACHTransactionBatch - Transaction Processing - batch of transactions

<?php
// Get customer-specific information
$userInformation = [
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
];

// Payment-specific information
$achInformation = [
  'payorFirstName' => 'Adam',
  'payorLastName' => 'Test',
  'payorStreetAddress1' => '1234 Main St.',
  'payorStreetAddress2' => 'Apt. 7B',
  'payorCity' => 'Ogden',
  'payorState' => 'UT',
  'payorZip' => '84404',
  'transactionEmailAddress' => 'adamemail@pdc4u.com',
  'payorPhoneNumber' => '777-777-7777',
  'payorAccountReference' => 'AB1234',
  'payorMemoInformation' => 'December payment',
  'payorBankRoutingNumber' => '124001545',
  'payorBankAccountNumber' => '123456',
  'payorCheckNumber' => '9999',
  'payorAccountType' => 'C',
  'chargeAmount' => '5.00',
  'feeAmount' => '0.50',
  'transactionOrigin' => 'EXT',
  'payorTransactionType' => 'D',
  'achEntryCode' => 'WEB',
  'processingDate' => '2017-05-31',
  'secondaryTrace' => ''
];

//Payment-specific information for tran 2
$achInformation2 = $achInformation;
$achInformation2['payorFirstName'] = 'Adam2';

$url = 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl';
$namespace = 'http://transaction.webservices.pdc4u.com';
$method = 'processACHTransactionBatch';
$params = [
  'achTransactionBatchItems' => [
    $achInformation,
    $achInformation2
  ],
  'userInfo'=> $userInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
} catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transaction.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl' );

my %userInformation = (
  'pdcAccountSet' => '01',
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'userName' => 'frontenduser@pdc4u.com'
);

# Payment-specific information
my %achInformation = (
  'payorFirstName' => 'Adam',
  'payorLastName' => 'Test',
  'payorStreetAddress1' => '1234 Main St.',
  'payorStreetAddress2' => 'Apt. 7B',
  'payorCity' => 'Ogden',
  'payorState' => 'UT',
  'payorZip' => '84404',
  'transactionEmailAddress' => 'adamemail@pdc4u.com',
  'payorPhoneNumber' => '777-777-7777',
  'payorAccountReference' => 'AB1234',
  'payorMemoInformation' => 'December payment',
  'payorBankRoutingNumber' => '124001545',
  'payorBankAccountNumber' => '123456',
  'payorCheckNumber' => '9999',
  'payorAccountType' => 'C',
  'chargeAmount' => '5.00',
  'feeAmount' => '0.50',
  'transactionOrigin' => 'EXT',
  'payorTransactionType' => 'D',
  'achEntryCode' => 'WEB',
  'processingDate' => '2017-05-31',
  'secondaryTrace' => ''
);

my @batch1;
foreach my $key ( keys %achInformation ) {
   push @batch1, SOAP::Data->name( $key => $achInformation{$key} );
}

# Payment-specific information for tran 2
my %achInformation2 = %achInformation;
$achInformation2{'payorFirstName'} = 'Adam2';
my @batch2;
foreach my $key ( keys %achInformation2 ) {
   push @batch2, SOAP::Data->name( $key => $achInformation2{$key} );
}

# userInfo
my @userInfo;
foreach my $key ( keys %userInformation ) {
   push @userInfo, SOAP::Data->name( $key => $userInformation{$key} );
}

print $soap->call( 'processACHTransactionBatch',
   SOAP::Data->name('achTransactionBatchItems' => \SOAP::Data->value(@batch1)),
   SOAP::Data->name('achTransactionBatchItems' => \SOAP::Data->value(@batch2)),
   SOAP::Data->name('userInfo' => \SOAP::Data->value(@userInfo))
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer-specific information
   userInformation = {
      'pdcAccountSet' => '01',
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'userName' => 'frontenduser@pdc4u.com'
   }

   # Payment-specific information
   achInformation = {
      'payorFirstName' => 'Adam',
      'payorLastName' => 'Test',
      'payorStreetAddress1' => '1234 Main St.',
      'payorStreetAddress2' => 'Apt. 7B',
      'payorCity' => 'Ogden',
      'payorState' => 'UT',
      'payorZip' => '84404',
      'transactionEmailAddress' => 'adamemail@pdc4u.com',
      'payorPhoneNumber' => '777-777-7777',
      'payorAccountReference' => 'AB1234',
      'payorMemoInformation' => 'December payment',
      'payorBankRoutingNumber' => '124001545',
      'payorBankAccountNumber' => '123456',
      'payorCheckNumber' => '9999',
      'payorAccountType' => 'C',
      'chargeAmount' => '5.00',
      'feeAmount' => '0.50',
      'transactionOrigin' => 'EXT',
      'payorTransactionType' => 'D',
      'achEntryCode' => 'WEB',
      'processingDate' => '2017-05-31',
      'secondaryTrace' => ''
   }

   # Payment-specific information for tran 2
   achInformation2 = achInformation;
   achInformation2['payerFirstName'] = 'Adam2';

   # Build the parameters
   params = {
      'achTransactionBatchItems' => [
         achInformation,
         achInformation2
      ],
      'userInfo' => userInformation
   };

   response = client.call(:process_ach_transaction_batch, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

You can also submit check transactions as a batch by providing a list of transactions.

The URL to process a check batch is:
https://demo.pdc4u.com/ECheckServices/ACHTransactionProcessor?wsdl

The namespace to use is:
http://transaction.webservices.pdc4u.com

The method to use is:
processACHTransactionBatch

getECheckData - Transaction Inquiry - get details about processed transactions

<?php
// Get customer and transaction information
$updateInformation = [
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'primaryTrace' => 'SomeTransactionID'
];

$url = 'https://demo.pdc4u.com/ECheckServices/ECheckInquiry?wsdl';
$namespace = 'http://inquiry.webservices.pdc4u.com';
$method = 'getECheckData';
$params = [
  'echeckInquiryData'=> $updateInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
} catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://inquiry.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/ECheckServices/ECheckInquiry?wsdl' );

# Get customer and transaction information
my %updateInformation = (
   'customerID' => '0000',
   'securityKey' => 'SomeSecurityKey',
   'primaryTrace' => 'SomeTransactionID'
);

print $soap->call( 'getECheckData',
   SOAP::Data->name('eCheckInquiryData' => \%updateInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/ECheckServices/ECheckInquiry?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer and transaction information
   updateInformation = {
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'primaryTrace' => 'SomeTransactionID'
   }

   # Build the parameters
   params = {
      'echeckInquiryData' => updateInformation
   }

   response = client.call(:get_e_check_data, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Gather information about a specific transaction.

The URL to check a transaction is:
https://demo.pdc4u.com/ECheckServices/ECheckInquiry?wsdl

The namespace to use is:
http://inquiry.webservices.pdc4u.com

The method to use is:
getECheckData

getECheckDataUpdates - Transaction Status Inquiry - get status changes since last request

<?php
// Get customer and transaction information
$updateInformation = [
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
];

$url = 'https://demo.pdc4u.com/ECheckServices/ECheckUpdateInquiry?wsdl';
$namespace = 'http://inquiry.webservices.pdc4u.com';
$method = 'getECheckDataUpdates';
$params = [
  'echeckInquiryData'=> $updateInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
} catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://inquiry.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/ECheckServices/ECheckUpdateInquiry?wsdl' );

# Get customer and transaction information
my %updateInformation = (
   'customerID' => '0000',
   'securityKey' => 'SomeSecurityKey',
);

print $soap->call( 'getECheckDataUpdates',
   SOAP::Data->name('echeckInquiryData' => \%updateInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/ECheckServices/ECheckUpdateInquiry?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer and transaction information
   updateInformation = {
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
   }

   # Build the parameters
   params = {
      'echeckInquiryData' => updateInformation
   }

   response = client.call(:get_e_check_data_updates, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Get details about all transactions since last request. It is recommended to use the Transaction Inquiry API rather than this method.

The URL to get status changes is:
https://demo.pdc4u.com/ECheckServices/ECheckUpdateInquiry?wsdl

The namespace to use is:
http://inquiry.webservices.pdc4u.com

The method to use is:
getECheckDataUpdates

updateStatus - Transaction Updating - change the status of a transaction

<?php
// Get customer and transaction information
$updateInformation = [
  'customerID' => '0000',
  'securityKey' => 'SomeSecurityKey',
  'primaryTrace' => 'SomeTransactionID',
  'newStatus' => 'VOID'
];

$url = 'https://demo.pdc4u.com/ECheckServices/ECheckStatusUpdate?wsdl';
$namespace = 'http://update.webservices.pdc4u.com';
$method = 'updateStatus';
$params = [
  'eCheckUpdateData'=> $updateInformation
];

$client = new SoapClient($url);

try {
  $response = $client->__soapCall(
    $method,
    [$params, $namespace]
  );

  print_r($response);
} catch (SoapFault $fault) {
  print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://update.webservices.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/ECheckServices/ECheckStatusUpdate?wsdl' );

# Get customer and transaction information
my %updateInformation = (
   'customerID' => '0000',
   'securityKey' => 'SomeSecurityKey',
   'primaryTrace' => 'SomeTransactionID',
   'newStatus' => 'VOID'
);

print $soap->call( 'updateStatus',
   SOAP::Data->name('eCheckUpdateData' => \%updateInformation)
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/ECheckServices/ECheckStatusUpdate?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get customer and transaction information
   updateInformation = {
      'customerID' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'primaryTrace' => 'SomeTransactionID',
      'newStatus' => 'VOID'
   }

   # Build the parameters
   params = {
      'eCheckUpdateData' => updateInformation
   }

   response = client.call(:update_status, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Change the status of a previously submitted transaction. In particular, VOID the transaction.

The URL to update a transaction is:
https://demo.pdc4u.com/ECheckServices/ECheckStatusUpdate?wsdl

The namespace to use is:
http://update.webservices.pdc4u.com

The method to use is:
updateStatus

Scoring Service API

Scoring Overview

Step 1: A PDCflow integrator submits batch records to be scored via SOAP request. These records may be submitted by using a base64 encoded file or through a ScoringInputRecords object. Supported file formats are:

Step 2: At regular intervals, PDCflow gathers the submitted batch records, prepares them, and sends the batch to the credit bureau. Once there, the bureau process will pick up the batch file and process or score each submitted record.

Step 4: Once the receiving bureau has processed/scored the batch, the credit bureau notifies PDCflow the batch is ready to be picked up and delivered. PDCflow then picks up the scored batch and persists the batch information to a database for later consumption.

Step 5: Once the batch information has been updated on the PDCflow server, integrators are then able to inquire on any of the previously submitted records.

The following tables describe the different elements making up a Scoring SOAP request.

API Request

All elements must be present in the request, even if they are not essential to the ProcessingCommand action being performed. If an element is not required, just leave it blank. See the Sample Code.

ScoringRequest

ScoringRequest is the parent/top-level element of the incoming SOAP message.

Attribute Description
MessageControl
Determines how the message information is handled upon receipt.
Constraint(s): See object definition below.
ScoringInputRecords
A list or array of ScoringInputRecord objects. When submitting a ScoringRequest, either ScoringInputRecords OR ScoringInputFile may be used to submit records.
ScoringInputFile
Embedded file within the SOAP message that holds records to be processed. When submitting a ScoringRequest, either ScoringInputRecords OR ScoringInputFile may be used to submit records.
Constraint(s): See object definition below.

MessageControl

The MessageControl element determines how the message information is handled upon receipt. All elements must be present.

Attribute Description
ProcessingCommand
Alpha3
Required
Describes the type of request being made to the scoring service.
Valid value(s):
DWN - Requests a previously scored batch to be downloaded.
STR - Requests a status of a previously uploaded batch.
UPL - Upload a batch of records for scoring processing.
TST - Requests validation of uploaded records only. No processing other than validation will be performed.
BureauReportType
Alphanumeric6
Required
Describes the type of scoring information to be returned for a particular batch.
TransUnion valid value(s) - TRU001
Experian valid value(s) - EXP001, EXP002, EXP003, EXP004, EXP005, EXP006, EXP007
Note: These enumerations describe the different report options available from either TransUnion or Experian. For a more detailed description about what each report offers see documentation from the respective bureau.
ReturnFileFormat
Alpha3
Conditional
Format that the batch download will be returned in.
Valid value(s): XML
Constraint(s): Used when requesting a download DWN request, left blank otherwise.
BatchID
Numeric18
Conditional
The batch ID.
Constraint(s): Used when requesting a download DWN or a status STR request.
BatchOrigin
Alpha3
Required
Describes the origin of the batch of records to be scored by the bureau.
Valid value(s): EXT
DwnRecordStart
Date19
Used to control the starting record download point of the scored batch. Used in conjunction with the ProcessingCommand DWN.
Format: YYYY-MM-DD HH:mm:SS
DwnRecordCount
Date19
Used to control the ending record download point of the scored batch. Used in conjunction with the ProcessingCommand DWN.
Format: YYYY-MM-DD HH:mm:SS

ScoringInputRecord

This element is populated when uploading a scoring batch. Either this group of elements is used or the ScoringInputFile element is populated when uploading a batch, but NOT both.

Attribute Description
LastName
Alpha32
Required
Last name of the individual.
FirstName
Alpha32
Required
First name of the individual.
Address1
Alphanumeric35
Required
Street address of the individual.
Address2
Alphanumeric35
Extended address of the individual.
City
Alpha32
Required
Name of the city.
State
Alpha2
Required
Name of the state.
Format: two character abbreviation (UT, CA, MI, etc)
ZipCode
Numeric10
Required
Zip code.
Format: XXXXX or XXXXX-XXXX
Spouse
Deprecated
This element is deprecated. Though the element is not used, it must still be present in the request.
SocialSecurityNumber
Numeric11
Social security number. While not required, this field is highly recommended to get valid information back from the bureau.
Format: XXXXXXXXX or XXX-XX-XXXX
AmountOwing
Numeric10
Amount owing.
Format: XXXX.XX
Do not use any formatting symbols such as the currency symbols ($), commas, etc.
DateOfService
Date10
Required
Date of service.
Format: YYYYMMDD or YYYY-MM-DD
AccountReferenceNumber
Alphanumeric50
Required
Reference/ID value. This is often the customer account number from your system.

ScoringInputFile

This element is used when submitting an XLS or CSV file as part of the ScoringRequest. Either this element is populated or the ScoringInputRecord group is used when uploading a batch, but NOT both.

Attribute Description
FileName
AlphanumericN/A
Name of file with extension.
FileContents
Base64N/A
Required
Base64 encoded batch file contents.

Input file format

This section describes the file format when employing the ScoringInputFile upload model. The following table details and describes the columns of the XLS/CSV.

Attribute Description
LAST_NAME
Alpha32
Required
Last name of the individual.
FIRST_NAME
Alpha32
Required
First name of the individual.
ADDRESS_1
Alphanumeric30
Required
Street address of the individual.
ADDRESS_2
Alphanumeric30
Extended address of the individual.
CITY
Alpha30
Required
Name of the city.
STATE
Alpha2
Required
Name of the state.
Format: two character abbreviation (UT, CA, MI, etc)
ZIP
Numeric10
Required
Zip code.
Format: XXXXX or XXXXX-XXXX
SPOUSE
Deprecated
This element is deprecated. The column must still be present, but left blank.
SSN
Numeric11
Social security number. While not required, this field is highly recommended to get valid information back from the bureau.
Format: XXXXXXXXX or XXX-XX-XXXX
AMOUNT_OWING
Numeric10
Amount owing.
Format: XXXX.XX
Do not use any formatting symbols such as the currency symbols ($), commas, etc.
DATE_OF_SERVICE
Date10
Required
Date of service.
Format: YYYYMMDD or YYYY-MM-DD
ACCT_REF_NUMBER
Alphanumeric50
Required
Reference/ID value. This is often the customer account number from your system.

An OPTIONAL header row is allowed to be submitted along with the batch of records. If included, the column values must be named as follows:

  1. LAST_NAME
  2. FIRST_NAME
  3. ADDRESS_1
  4. ADDRESS_2
  5. CITY
  6. STATE
  7. ZIP
  8. SPOUSE - Though deprecated, this column must still be present.
  9. SSN
  10. AMOUNT_OWING
  11. DATE_OF_SERVICE
  12. ACCT_REF_NUMBER

API Result

ScoringResponse

The following table describes the different elements making up a ScoringResponse.

Attribute Description
ScoringReturnFile
Populated with returned scoring file as received from the bureau.
Constraint(s): Returned in conjunction with the ProcessingCommand DWN. When not using the ProcessingCommand DWN this element will be empty.
ValidationErrorList
Deprecated
This response object has been deprecated and will be returned empty.
ExperianScoredRecords
Collection of Experian scored records returned in the SOAP return message.

For information on Experian scoring results, please contact a developer on the API Forum.
TransUnionScoredRecords
Collection of TransUnion scored records returned in the SOAP return message.

For information on TransUnion scoring results, please contact a developer on the API Forum.
BatchUploadResults
The results of the batch upload.
Constraint(s): Returned in conjunction with the ProcessingCommand UPL. See object definition below.
BatchStatusResults
Shows the current status information of the batch.
Constraint(s): Returned in conjunction with the ProcessingCommand STR. See object definition below.

BatchUploadResults

This section describes the values returned when a ProcessingCommand of UPL is issued to the web service.

Attribute Description
BatchID
Numeric18
Batch identification value assigned by PDCflow when a batch is initially uploaded.
This BatchID will be required when issuing a ProcessingCommand of STR or DWN
TotalRecordsSubmitted
Numeric11
Total number of records submitted.
TotalRecordsAccepted
Numeric11
Total number of records accepted for processing.
TotalRecordsRejected
Numeric11
Total number of records rejected due to validation errors.
BatchArrivalDateTime
Date19
Timestamp when the batch was originally uploaded.
Format: YYYY-MM-DD HH:mm:SS
ValidationErrorList
Depricated
This element has been deprecated, and will be returned empty.
RejectedRecords
ObjectN/A
Collection of RejectedRecord objects.

BatchStatusResults

This section describes the values returned when a ProcessingCommand of STR is issued to the web service.

Attribute Description
BatchID
Numeric18
Batch identification value assigned by PDCflow when a batch is initially uploaded.
CompanyID
Numeric8
Company ID value previously assigned by PDCflow.
BureauType
Alphanumeric6
Describes the type of scoring information to be returned for a particular batch.
BatchArrivalDateTime
Date19
Timestamp when the batch was originally uploaded.
Format: YYYY-MM-DD HH:mm:SS
TotalRecordsSubmitted
Numeric11
Total number of records submitted.
TotalRecordsAccepted
Numeric11
Total numbers of records accepted for processing.
TotalRecordsRejected
Numeric11
Total number of records rejected due to validation errors.
BureauSubmissionDateTime
Date19
Timestamp when the batch was submitted by PDCflow to the processing bureau.
Format: YYYY-MM-DD HH:mm:SS
BureauReturnedDateTime
Date19
Timestamp when the batch was received.
Format: YYYY-MM-DD HH:mm:SS
BatchCancelDateTime
Date19
Timestamp when the batch was canceled prior to bureau submission.
Format: YYYY-MM-DD HH:mm:SS

RejectedRecord

This section describes any rejected records discovered during batch validation. This is essentially a mirror of the uploaded record with the addition of a RecordErrors element used to supply detailed exception information.

Attribute Description
LastName
Alpha32
Last name of the individual.
FirstName
Alpha32
First name of the individual.
Address1
Alphanumeric35
Street address of the individual.
Address2
Alphanumeric35
Extended address of the individual.
City
Alpha32
Name of the city.
State
Alpha2
Name of the state.
Format: two character abbreviation (UT, CA, MI, etc)
ZipCode
Numeric10
Zip code.
Format: XXXXX or XXXXXXXXX
Spouse
Deprecated
This element is deprecated and will be returned empty.
SocialSecurityNumber
Numeric11
Social security number.
Format: XXXXXXXXX
AmountOwing
Numeric10
Amount owing.
Format: XXXX.XX
DateOfService
Date10
Date of service.
Format: YYYY-MM-DD
AccountReferenceNumber
Alphanumeric50
This is often the customer account number from your system.
RecordErrors
ObjectN/A
Collection of RecordError elements.

RecordError

Object used to describe why a individual scoring record was rejected.

Attribute Description
ErrorCode
Numeric4
PDCflow error code representing the error. This will be described by ErrorDescription.
ErrorDescription
Alphanumeric172
Description of the validation error.

Sample Code

Web Service Security

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>SomeSecretUsername</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SomeEvenMoreSecretPassword</wsse:Password>
                <wsu:Created>2014-05-07T20:33:48.015Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    ........

Each SOAP scoring request submitted to PDCflow must contain a security header as part of the message. This header is based on an established standard: Web Services Security - UsernameToken Profile 1.1. An example of this header is shown to the right.

See: http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-UsernameTokenProfile-v1.1.1-os.html

Upload a scoring batch via ScoringInputFile

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

    private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

    function __construct($user, $pass) {
        $auth = new stdClass();
        $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
        $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

        $username_token = new stdClass();
        $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

        $security_sv = new SoapVar(
            new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
            SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

        parent::__construct($this->wss_ns, 'Security', $security_sv, true);
    }
}

// Get information for elements
$MessageControl = [
    'ProcessingCommand' => 'TST',
    'BureauReportType' => 'EXP001',
    'ReturnFileFormat' => '',
    'BatchID' => '',
    'BatchOrigin' => 'EXT',
    'DwnRecordStart' => '',
    'DwnRecordCount' => ''
];

// Example CSV format file
$scoringFile = 'LAST_NAME,FIRST_NAME,ADDRESS_1,ADDRESS_2,CITY,STATE,ZIP,SPOUSE,SSN,AMOUNT_OWING,DATE_OF_SERVICE,ACCT_REF_NUMBER
Test,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,111-22-3333,5.5,2016-01-25,D123456ADBD12
Test II,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,222-33-4444,6.5,2016-01-25,D123456ADBD13
Test III,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,333-44-5555,7.5,2016-01-25,D123456ADBD14';

/*
 * If uploading from a XLS file....
 * $handle = fopen($_FILES["file"]["tmp_name"], "r");                       // Open the temp file
 * $scoringFile = fread($handle, filesize($_FILES["file"]["tmp_name"]));    // Read the temp file
 * fclose($handle);
 */

$ScoringInputFile = [
    'FileName' => 'scoringUploadFile.csv',
    'FileContents' => $scoringFile
];

//Request Parameters
$params = [
    'MessageControl' => $MessageControl,
    'ScoringInputRecords' => '',
    'ScoringInputFile' => $ScoringInputFile
];

$url = 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl';
$namespace = 'http://www.pdc4u.com/scoring/ws/message/pdc-v1';
$method = 'Scoring';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
}
catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;
use MIME::Base64;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/scoring/ws/message/pdc-v1' )
   ->proxy( 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# Get information for elements
my %MessageControl = (
   'ProcessingCommand' => 'TST',
   'BureauReportType' => 'EXP001',
   'ReturnFileFormat' => '',
   'BatchID' => '',
   'BatchOrigin' => 'EXT',
   'DwnRecordStart' => '',
   'DwnRecordCount' => ''
);

# Example CSV format file
my $scoringFile = 'LAST_NAME,FIRST_NAME,ADDRESS_1,ADDRESS_2,CITY,STATE,ZIP,SPOUSE,SSN,AMOUNT_OWING,DATE_OF_SERVICE,ACCT_REF_NUMBER
Test,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,111-22-3333,5.5,2016-01-25,D123456ADBD12
Test II,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,222-33-4444,6.5,2016-01-25,D123456ADBD13
Test III,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,333-44-5555,7.5,2016-01-25,D123456ADBD14';

# If uploading from a XLS file....
# my $xlsDocument = 'mydoc.xls';
# my $scoringFile = read_file( $xlsDocument );

my %ScoringInputFile = (
   'FileName' => 'scoringUploadFile.csv',
   'FileContents' => encode_base64($scoringFile, "") # encode without newlines
);

my %params = (
   'MessageControl' => \%MessageControl,
   'ScoringInputFile' => \%ScoringInputFile,
   'ScoringInputRecords' => ''
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'ScoringRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get information for elements
   messageControl = {
      'ins0:ProcessingCommand' => 'TST',
      'ins0:BureauReportType' => 'EXP001',
      'ins0:ReturnFileFormat' => '',
      'ins0:BatchID' => '',
      'ins0:BatchOrigin' => 'EXT',
      'ins0:DwnRecordStart' => '',
      'ins0:DwnRecordCount' => ''
   };

   # Example CSV format file
   scoringFile = 'LAST_NAME,FIRST_NAME,ADDRESS_1,ADDRESS_2,CITY,STATE,ZIP,SPOUSE,SSN,AMOUNT_OWING,DATE_OF_SERVICE,ACCT_REF_NUMBER
Test,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,111-22-3333,5.5,2016-01-25,D123456ADBD12
Test II,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,222-33-4444,6.5,2016-01-25,D123456ADBD13
Test III,Adam,1234 Main St.,Apt. 7B,Ogden,UT,84404,,333-44-5555,7.5,2016-01-25,D123456ADBD14';

   # If uploading from a XLS file....
   # xlsDocument = 'mydoc.xls'
   # file = File.open(xlsDocument, "rb")
   # contents = file.read
   # file.close

   scoringInputFile = {
      'ins0:FileName' => 'scoringUploadFile.csv',
      'ins0:FileContents' => Base64.strict_encode64(scoringFile)
   }

   # Request Parameters
   params = {
      'ins0:MessageControl' => messageControl,
      'ins0:ScoringInputRecords' => '',
      'ins0:ScoringInputFile' => scoringInputFile
   }

   response = client.call(:scoring, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

This is an example on how to upload a batch to be scored using an XLS/CSV file.

Please note that the TST ProcessingCommand is used in place of UPL in the example code. If UPL is used, a batch will be scheduled to be scored an no more testing can be done until it has been scored.

The URL to use for sending a scoring request is:
https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl

The namespace to use is:
http://www.pdc4u.com/scoring/ws/message/pdc-v1

The method to use is:
Scoring

Upload a scoring batch via ScoringInputRecords

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

    private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

    function __construct($user, $pass) {
        $auth = new stdClass();
        $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
        $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

        $username_token = new stdClass();
        $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

        $security_sv = new SoapVar(
            new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
            SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

        parent::__construct($this->wss_ns, 'Security', $security_sv, true);
    }
}

// Get information for elements
$MessageControl = [
    'ProcessingCommand' => 'TST',
    'BureauReportType' => 'EXP001',
    'ReturnFileFormat' => '',
    'BatchID' => '',
    'BatchOrigin' => 'EXT',
    'DwnRecordStart' => '',
    'DwnRecordCount' => ''
];

// For ScoringInputRecords
$ScoringInputRecord1 = [
    'LastName' => 'Test',
    'FirstName' => 'Adam',
    'Address1' => '1234 Main St.',
    'Address2' => 'Apt. 7B',
    'City' => 'Ogden',
    'State' => 'UT',
    'ZipCode' => '84404',
    'Spouse' => '',
    'SocialSecurityNumber' => '111-22-3333',
    'AmountOwing' => '5.50',
    'DateOfService' => '2016-11-23',
    'AccountReferenceNumber' => 'D173492343F'
];
$ScoringInputRecord2 = [
    'LastName' => 'Test II',
    'FirstName' => 'Adam',
    'Address1' => '1234 Main St.',
    'Address2' => 'Apt. 7B',
    'City' => 'Ogden',
    'State' => 'UT',
    'Spouse' => '',
    'ZipCode' => '84404',
    'SocialSecurityNumber' => '222-33-4444',
    'AmountOwing' => '6.50',
    'DateOfService' => '2016-11-23',
    'AccountReferenceNumber' => 'D173492343F'
];
$ScoringInputRecord3 = [
    'LastName' => 'Test III',
    'FirstName' => 'Adam',
    'Address1' => '1234 Main St.',
    'Address2' => 'Apt. 7B',
    'City' => 'Ogden',
    'State' => 'UT',
    'Spouse' => '',
    'ZipCode' => '84404',
    'SocialSecurityNumber' => '333-44-5555',
    'AmountOwing' => '7.50',
    'DateOfService' => '2016-11-23',
    'AccountReferenceNumber' => 'D17349233423F'
];

// Assemble all the individual scoring records into a list
$ScoringInputRecords = [
    $ScoringInputRecord1,
    $ScoringInputRecord2,
    $ScoringInputRecord3
];

//Request Parameters
$params = [
    'MessageControl' => $MessageControl,
    'ScoringInputRecords' => $ScoringInputRecords,
    'ScoringInputFile' => [
        'FileName' => '',
        'FileContents' => ''
    ]
];

$url = 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl';
$namespace = 'http://www.pdc4u.com/scoring/ws/message/pdc-v1';
$method = 'Scoring';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
}
catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';
use File::Slurp;

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/scoring/ws/message/pdc-v1' )
   ->proxy( 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# Get information for elements
my %MessageControl = (
   'ProcessingCommand' => 'TST',
   'BureauReportType' => 'EXP001',
   'ReturnFileFormat' => '',
   'BatchID' => '',
   'BatchOrigin' => 'EXT',
   'DwnRecordStart' => '',
   'DwnRecordCount' => ''
);

# For ScoringInputRecords
my %ScoringInputRecord1 = (
   'LastName' => 'Test',
   'FirstName' => 'Adam',
   'Address1' => '1234 Main St.',
   'Address2' => 'Apt. 7B',
   'City' => 'Ogden',
   'State' => 'UT',
   'ZipCode' => '84404',
   'Spouse' => '',
   'SocialSecurityNumber' => '111-22-3333',
   'AmountOwing' => '5.50',
   'DateOfService' => '2016-11-23',
   'AccountReferenceNumber' => 'D173492343F'
);
my %ScoringInputRecord2 = (
   'LastName' => 'Test II',
   'FirstName' => 'Adam',
   'Address1' => '1234 Main St.',
   'Address2' => 'Apt. 7B',
   'City' => 'Ogden',
   'State' => 'UT',
   'Spouse' => '',
   'ZipCode' => '84404',
   'SocialSecurityNumber' => '222-33-4444',
   'AmountOwing' => '6.50',
   'DateOfService' => '2016-11-23',
   'AccountReferenceNumber' => 'D173492343F'
);
my %ScoringInputRecord3 = (
   'LastName' => 'Test III',
   'FirstName' => 'Adam',
   'Address1' => '1234 Main St.',
   'Address2' => 'Apt. 7B',
   'City' => 'Ogden',
   'State' => 'UT',
   'Spouse' => '',
   'ZipCode' => '84404',
   'SocialSecurityNumber' => '333-44-5555',
   'AmountOwing' => '7.50',
   'DateOfService' => '2016-11-23',
   'AccountReferenceNumber' => 'D17349233423F'
);

# Request Parameters
my %params = (
   'MessageControl' => \%MessageControl,

   'ScoringInputRecords' => \SOAP::Data->value(
      SOAP::Data->name('ScoringInputRecord' => \%ScoringInputRecord1),
      SOAP::Data->name('ScoringInputRecord' => \%ScoringInputRecord2),
      SOAP::Data->name('ScoringInputRecord' => \%ScoringInputRecord3),
   ),

   'ScoringInputFile' => {
      'FileName' => '',
      'FileContents' => ''
   }
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'ScoringRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get information for elements
   messageControl = {
      'ins0:ProcessingCommand' => 'TST',
      'ins0:BureauReportType' => 'EXP001',
      'ins0:ReturnFileFormat' => '',
      'ins0:BatchID' => '',
      'ins0:BatchOrigin' => 'EXT',
      'ins0:DwnRecordStart' => '',
      'ins0:DwnRecordCount' => ''
   }

   # For ScoringInputRecords
   scoringInputRecord1 = {
      'ins0:LastName' => 'Test',
      'ins0:FirstName' => 'Adam',
      'ins0:Address1' => '1234 Main St.',
      'ins0:Address2' => 'Apt. 7B',
      'ins0:City' => 'Ogden',
      'ins0:State' => 'UT',
      'ins0:ZipCode' => '84404',
      'ins0:Spouse' => '',
      'ins0:SocialSecurityNumber' => '111-22-3333',
      'ins0:AmountOwing' => '5.50',
      'ins0:DateOfService' => '2016-11-23',
      'ins0:AccountReferenceNumber' => 'D173492343F'
   }
   scoringInputRecord2 = {
      'ins0:LastName' => 'Test II',
      'ins0:FirstName' => 'Adam',
      'ins0:Address1' => '1234 Main St.',
      'ins0:Address2' => 'Apt. 7B',
      'ins0:City' => 'Ogden',
      'ins0:State' => 'UT',
      'ins0:Spouse' => '',
      'ins0:ZipCode' => '84404',
      'ins0:SocialSecurityNumber' => '222-33-4444',
      'ins0:AmountOwing' => '6.50',
      'ins0:DateOfService' => '2016-11-23',
      'ins0:AccountReferenceNumber' => 'D173492343F'
   }
   scoringInputRecord3 = {
      'ins0:LastName' => 'Test III',
      'ins0:FirstName' => 'Adam',
      'ins0:Address1' => '1234 Main St.',
      'ins0:Address2' => 'Apt. 7B',
      'ins0:City' => 'Ogden',
      'ins0:State' => 'UT',
      'ins0:Spouse' => '',
      'ins0:ZipCode' => '84404',
      'ins0:SocialSecurityNumber' => '333-44-5555',
      'ins0:AmountOwing' => '7.50',
      'ins0:DateOfService' => '2016-11-23',
      'ins0:AccountReferenceNumber' => 'D17349233423F'
   }

   # Request Parameters
   params = {
      'ins0:MessageControl' => messageControl,
      'ins0:ScoringInputRecords' => {
         'ins0:ScoringInputRecord' => [
            scoringInputRecord1,
            scoringInputRecord2,
            scoringInputRecord3
         ],
      },
      'ins0:ScoringInputFile' => {
         'ins0:FileName' => '',
         'ins0:FileContents' => ''
      }
   }

   response = client.call(:scoring, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

This is an example on how to upload a batch to be scored using a collection of ScoringInputRecord objects.

Please note that the TST ProcessingCommand is used in place of UPL in the example code. If UPL is used, a batch will be scheduled to be scored an no more testing can be done until it has been scored.

The URL to use for sending a scoring request is:
https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl

The namespace to use is:
http://www.pdc4u.com/scoring/ws/message/pdc-v1

The method to use is:
Scoring

Check the status of a previously uploaded batch file

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

    private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

    function __construct($user, $pass) {
        $auth = new stdClass();
        $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
        $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

        $username_token = new stdClass();
        $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

        $security_sv = new SoapVar(
            new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
            SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

        parent::__construct($this->wss_ns, 'Security', $security_sv, true);
    }
}

// Get information for elements
$MessageControl = [
    'ProcessingCommand' => 'STR',
    'BureauReportType' => 'EXP001',
    'ReturnFileFormat' => '',
    'BatchID' => '00001234.012345678',
    'BatchOrigin' => 'EXT',
    'DwnRecordStart' => '',
    'DwnRecordCount' => ''
];

$params = [
    'MessageControl' => $MessageControl,
    'ScoringInputFile' => '',
    'ScoringInputRecords' => ''
];

$url = 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl';
$namespace = 'http://www.pdc4u.com/scoring/ws/message/pdc-v1';
$method = 'Scoring';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
}
catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/scoring/ws/message/pdc-v1' )
   ->proxy( 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# Get information for elements
my %MessageControl = (
   'ProcessingCommand' => 'STR',
   'BureauReportType' => 'EXP001',
   'ReturnFileFormat' => '',
   'BatchID' => '00001234.012345678',
   'BatchOrigin' => 'EXT',
   'DwnRecordStart' => '',
   'DwnRecordCount' => ''
);

my %params = (
   'MessageControl' => \%MessageControl,
   'ScoringInputFile' => '',
   'ScoringInputRecords' => ''
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'ScoringRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get information for elements
   messageControl = {
      'ins0:ProcessingCommand' => 'STR',
      'ins0:BureauReportType' => 'EXP001',
      'ins0:ReturnFileFormat' => '',
      'ins0:BatchID' => '00001234.012345678',
      'ins0:BatchOrigin' => 'EXT',
      'ins0:DwnRecordStart' => '',
      'ins0:DwnRecordCount' => ''
   }

   params = {
      'ins0:MessageControl' => messageControl,
      'ins0:ScoringInputFile' => '',
      'ins0:ScoringInputRecords' => ''
   }

   response = client.call(:scoring, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

This is an example on how to check the status of a previously uploaded batch.

A batch is identified by the BatchID that was returned in the BatchUploadResults object.

The URL to use for sending a scoring request is:
https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl

The namespace to use is:
http://www.pdc4u.com/scoring/ws/message/pdc-v1

The method to use is:
Scoring

Download

<?php
//special handling to create a WSSE-compliant header
class WsseAuthHeader extends SoapHeader {

    private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

    function __construct($user, $pass) {
        $auth = new stdClass();
        $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
        $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

        $username_token = new stdClass();
        $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

        $security_sv = new SoapVar(
            new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
            SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

        parent::__construct($this->wss_ns, 'Security', $security_sv, true);
    }
}

// Get information for elements
$MessageControl = [
    'ProcessingCommand' => 'DWN',
    'BureauReportType' => 'EXP002',
    'ReturnFileFormat' => 'XML',
    'BatchID' => '00001234.012345678',
    'BatchOrigin' => 'EXT',
    'DwnRecordStart' => '',
    'DwnRecordCount' => ''
];

$params = [
    'MessageControl' => $MessageControl,
    'ScoringInputFile' => '',
    'ScoringInputRecords' => ''
];

$url = 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl';
$namespace = 'http://www.pdc4u.com/scoring/ws/message/pdc-v1';
$method = 'Scoring';

$wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
$client = new SoapClient($url);
$client->__setSoapHeaders([$wsse_header]);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
}
catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://www.pdc4u.com/scoring/ws/message/pdc-v1' )
   ->proxy( 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

# Get information for elements
my %MessageControl = (
   'ProcessingCommand' => 'DWN',
   'BureauReportType' => 'EXP002',
   'ReturnFileFormat' => 'XML',
   'BatchID' => '00001234.012345678',
   'BatchOrigin' => 'EXT',
   'DwnRecordStart' => '',
   'DwnRecordCount' => ''
);

my %params = (
   'MessageControl' => \%MessageControl,
   'ScoringInputFile' => '',
   'ScoringInputRecords' => ''
);

my @data;
foreach my $key ( keys %params ) {
   push @data, SOAP::Data->name( $key => $params{$key} );
}

print $soap->call( 'ScoringRequest', $security->value(\$userToken), @data )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # Get information for elements
   messageControl = {
      'ins0:ProcessingCommand' => 'DWN',
      'ins0:BureauReportType' => 'EXP002',
      'ins0:ReturnFileFormat' => 'XML',
      'ins0:BatchID' => '00001234.012345678',
      'ins0:BatchOrigin' => 'EXT',
      'ins0:DwnRecordStart' => '',
      'ins0:DwnRecordCount' => ''
   }

   params = {
      'ins0:MessageControl' => messageControl,
      'ins0:ScoringInputFile' => '',
      'ins0:ScoringInputRecords' => ''
   }

   response = client.call(:scoring, message: params) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

This is an example on how to request a scored batch and have it returned in the form of XML.

A batch is identified by the BatchID that was returned in the BatchUploadResults object.

The URL to use for sending a scoring request is:
https://demo.pdc4u.com/pdcscoring/scoringwebservices/scoringService/scoring.wsdl

The namespace to use is:
http://www.pdc4u.com/scoring/ws/message/pdc-v1

The method to use is:
Scoring

Secure Entry Overlay API

The Secure Entry Overlay is a way for PDCflow customers/partners to easily process credit card payments from their own sites/software without PCI Compliance concerns.

It provides a tight integration between account management software and PDCflow’s Payment Processing Products and takes the core software platform out of PCI Scope. Enter payment information (credit card data) from within your software system using our secure entry overlay form. The sensitive credit and/or debit card data fields reside on our secure, PCI Level 1 Certified servers, and overlays the data entry field on the core software’s payment page.

Sensitive Card Data is encrypted, tokenized, and stored in a secure vault. The token is then returned to your software system through the webservices, eliminating your transmission of any PCI relevant data.

Implementation

Required Files

Your HTML page

<head>
    ...
    <script src="resources/js/jquery.js"></script>
    <script src=“resources/js/easyXDM.js”></script>
    <script src=“resources/js/json.js”></script>
</head>

Include the main javascript files in the <head> of your HTML.

<body>
    ...
    ​<span id="secureOverlay"></span>
    ...
</body>

Add an element in the <body> of your HTML that will contain the secure input field when it is added to the page. The id="" value will be used within the easyXDM Javascript call.

<script type="text/javascript">
    ...
    var rpc = new easyXDM.Rpc({
        local:"myPaymentPage.html",
        swf:"/js/easyxdm.swf",
        swfNoThrottle:"true",
        remote: "https://demo.pdc4u.com/SecureCCMVC/internal",
        remoteHelper:"name.html",
        container:"secureOverlay",
        props: {
            ​​style: {
                ​​​padding:"0px",
                ​​​height:"42px",
                ​​​overflow:"hidden"
            ​​}
        },
        {
            ​​local:{
                ​​​getPreloadData: function(){ },
                ​​​processResponse: function(msg){ }
            },
            remote:{
                ​​remoteTokenize:{},
                styleOptions:{}
            }
        }
    });
    ...
</script>

Create an xdm-rpc link in a custom <script> using the defined field.

Script Variable Definitions

Attribute Description
local
Your local payment page.
swf
Location of the .swf file for IE8.
swfNoThrottle
Set true to prevent newer versions of flash from throttling connection.
remote
Location of the secure input page;
Valid value(s): 'https://demo.pdc4u.com/SecureCCMVC/internal'
remoteHelper
File on the remote server to help with the connection.
Valid value(s): name.html
container
ID from the element added to the <body> of your page.
props
List of key/value pairs to be copied into iframe (use for styling of iFrame, not input field).
local
Define local functions.

getPreloadData
Will load the input field with whatever data is returned in JSON ​​format, including some style options;
    ​​​response:
        ​​​​​​backgroundColor:red;
​​​​        ​​​​​​fontSize=100px;
​​​​    ​​​    ​​​token=preloadedToken
​​​​    ​​​    ​​​focus=0;

If focus==1, input field will take focus (for autoFocus)

processResponse
Currently not used
remote
Define functions on remote site.

remoteTokenize
Will attempt to tokenize the data in the input field requires in ​​JSON format:
​​​        creds:
        (temp creds from tempCredentialsService)
    ​​​​        userName=“tempUsername”
​​​​            password=“tempPassword”
​​​        data:
​​​​            dataType=“CCN”
            ​ccExpMonth=12
​​​​            ccExpYear=2014
​​​        function(response){…process Response here}


styleOptions
Allows some styling of the input field
​​​        options:
            ​​​​backgroundColor:red;
​​​​            fontSize=100px;

Sample Code

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Payment</title>
    <meta charset="utf-8"/>
    <script src="resources/js/jquery.js"></script>
    <script src="resources/js/json2.min.js"></script>
    <script src=“resources/js/easyXDM.js”></script>
    <script type=“text/javascript”>
        var tempUsername;
        var tempPassword;
        var rpc = new easyXDM.Rpc({
            local:"myPaymentPage.html",
            swf:"/js/easyxdm.swf",
            swfNoThrottle:"true",
            remote: "https://demo.pdc4u.com/SecureCCMVC/internal",
            remoteHelper:"name.html",
            container:"secureOverlay",
            props: {
                ​​style: {
                    ​​​padding:"0px",
                    ​​​height:"42px",
                    ​​​overflow:"hidden"
                ​​}
            },
            {
                ​​local:{
                    ​​​getPreloadData: function(){ },
                    ​​​processResponse: function(msg){ }
                ​​},
                ​​remote:{
                    ​​​remoteTokenize:{},
                    ​​​styleOptions:{}
                ​​}
            }
        });
        function processPayment(){
            //Get TempCredentials
            $.ajax({
              type: 'POST',
                dataType: 'json',
                contentType:'application/json',
                url: "getTempCreds",
                data:{functionType : 'getMyCreds'},
                success: function(data) { tokenizeWithCreds(data); }
            });
        }
        function tokenizeWithCreds(creds){
            var ccRequired = new Object();
            ccRequired.dataType = "CCN";
            ccRequired.ccExpMonth = $("#expMonth").val();
            ccRequired.ccExpYear = $("#expyear").val();
            ccRequiredString = JSON.stringify(ccRequired);
            //get token
            rpc.remoteTokenize(creds, ccRequiredString,
                function(response){
                    var secureResponse = response;
                    //send parameters: timestamp, companyId, username, password
                    //returned parameters: errorMsg, token, ccType, mask, result {ERROR, OK, PREPOPULATE}
                    var token;

                    if(secureResponse.result == "OK"){
                        token = secureResponse.token;
                        $("#creditNumber").val(secureResponse.token);
                        $("#creditNumberType").val(secureResponse.ccType);
                    }
                    else if(secureResponse.result == "PREPOPULATE"){
                        $("#creditNumber").val(secureResponse.token);
                    }
                    else{
                        $("#error").val(secureResponse.errorMsg);
                    }

                    if(secureResponse.result != "ERROR"){
                        //Call the web service to process the credit card number (which is now a token)​
                    }
                },
                function(errorObj){
                alert(errorObj.toSource());
                }
            );
        }
    </script>
</head>
<body>
    <div class="container">
        <div class="ccPayment">
            <span id="secureOverlay" style="margin-bottom:0px;"></span>
            <input type="tel" id="expMonth" placeholder="Expiration Month" />
            <input type="tel" id="expYear" placeholder="Expiration Year" />
            <button id="nextButton" onclick="processPayment()">Process</button>
        </div>
    </div>
</body>
</html>

Here is a sample HTML page that has all of the code required to interact with the Secure Overlay API. It contains the complete Javascript code as well as a test form that includes additional fields other than the Secure Entry field.

Signature Service API

The signature service allows easy integration of sending requests for signatures, payments, documents, and image uploads. Integrators are also able to retrieve previously sent signatures and create transaction reports on previous requests. All requests are made through common HTTP POST, GET, PUT requests.

Authentication will be done with a Base64 encoded username:password, passed in through the BASIC Http Authorization Header.

Signature

endpoint:
https://demo.pdc4u.com/SignatureService/api/v2_0/signatures

POST to the signature endpoint to send a request though email, text, or both.
GET to retrieve a previous signature.
PUT to modify a previous signature.

Attribute Description
signatureId
Numeric20
The id of the signature request.
firstName
Alphanumeric45
Required
The first name of your client.
lastName
Alphanumeric45
Required
The last name of your client.
emailAddress
Alphanumeric65
Conditional
The email address to send the request to.
Constraint(s): Required if no mobileNumber provided. Sending both emailAddress and mobileNumber will send the request to both.
mobileNumber
Numeric15
Conditional
The phone number to send request to.
Format: With country code
Constraint(s): Required if no emailAddress provided. Sending both emailAddress and mobileNumber will send the request to both.
username
Alphanumeric65
Conditional
Username or email of the employee sending this request.
Constraint(s): Required for modification (PUT) requests.
description
Alphanumeric160
Conditional
Description of what the signature is for. Will show with the signature.
Constraint(s): Only required with standalone signature.
verificationPin
Numeric8
Required
Shared secret for client verification.
Constraint(s): Must be between 4 and 8 digits long.
pinDescription
Alphanumeric50
Required
Description of the verificationPin.
maxPinAttempts
Numeric2
Maximum amount of attempts the client is allowed for verification before transaction is locked.
Default: 3
requestGeolocation
Boolean5
Request the geolocation from the client.
Constraint(s): Client can refuse to share location, preventing capture.
Valid value(s): true, false
Default: true
timeoutMinutes
Numeric6
Number of minutes client has to complete the transaction before it expires.
Default: 2.5
redirectLink
Alphanumeric65
Link to direct client to, after signature is complete.
customMessage
AlphaNumeric320
Freeform text to display at the end of the transaction.
payment
PaymentN/A
Data for payment request.
Constraint(s): See object definition below.
document
DocumentN/A
Data for document presentation.
Constraint(s): Document must be uploaded through POST to Document endpoint, then resultant documentId specified here. See object definition below.
imageUpload
ImageUploadN/A
Information for image upload.
Constraint(s): See object definition below.
standaloneSignatureRequested
Boolean5
Whether standalone signature is desired or not.
Valid value(s): true, false
Default: true
transactionOrigin
String3
The origin of the transaction request.
Valid value(s): EXT
templateName
String50
The name of the template used for this request. Can be used to associate similar requests together.
completionDate
Date25
The date and time the full request was completed.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
signatureReceivedDate
Date25
The date and time the signature was stored on our system.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
signatureReceivedTimezone
Numeric5
The timezone in which the signature was signed.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
signatureClosed
Boolean5
Whether or not a the transaction was closed. Either all parts of the transaction were completed or an error occurred.
Valid value(s): true, false
modificationCode
Alpha5
Required
The modification to make on the transaction.
Valid value(s): CLOSE
ErrorCode
Alpha3
Code if an error occurred with the signature.
ErrorMessage
Alphanumeric160
An explanation message for the error that occurred.
Constraint(s): Will only show if an ErrorCode is present.
roundTripNVPS
ListN/A
List of roundTripNVP objects. These are Name/Value passthrough values.
Constraint(s): Max of 10 roundTripNVP objects per request. See object definition below.
pageOrder
List-AlphaN/A
A list of page enum values to define the order in which the receiver will view the pages of the request.
Constraint(s): Only pages for requested functionality can be included.
Valid value(s): PG_DOC, PG_IMG, PG_SIG, PG_PAY
Default: PG_DOC, PG_IMG, PG_SIG, PG_PAY
requestedDate
Date25
Date and time the transaction was requested.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
expirationDate
Date25
Date and time the transaction will expire. Based on the requestedDate and timeoutMinutes.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
signatureImage
Base64N/A
Base64 encoded .png format signature image.
textSuccessful
Boolean5
Whether the text was successfully sent to the client.
Valid value(s): true, false
emailSuccessful
Boolean5
Whether the email was successfully sent to the client.
Valid value(s): true, false
signatureURL
Alphanumeric160
The URL to retrieve the information, through a GET request, for this transaction.

Payment

Attribute Description
paymentTransactionId
Numeric20
The confirmation id of the payment.
accountNumber
Alphanumeric45
Account number associated with payment in this transaction.
accountDirective
Numeric10
The account directive used for the payment in this transaction.
dateCreated
Date25
The date and time the payment was entered for processing.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
dateProcessed
Date25
The date and time the payment was processed.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
paymentAmount
Numeric11
The payment amount for this transaction.
Format: XXXXXXXX.XX
feeAmount
Numeric11
The fee amount for this transaction.
Format: XXXXXXXX.XX
totalAmount
Numeric11
The total amount for this transaction.
Format: XXXXXXXX.XX
address
Alphanumeric80
The address associated with the payment.
city
Alphanumeric45
The city associated with the payment.
state
Alphanumeric2
The state abbreviation associated with the payment.
zip
Numeric9
The zip code associated with the payment.
paymentType
Alpha3
Type of payment to include in the request.
Constraint(s): Required for payment.
Valid value(s): ACH, CC
achTransaction
ObjectN/A
Data to preload for ACH payment request.
Constraint(s): See object definition below.
ccTransaction
ObjectN/A
Data to preload for credit card payment request.
Constraint(s): See object definition below.

AchTransaction

Attribute Description
achStatusData
ListN/A
List of achStatusData objects for this ach transaction.
Constraint(s): See object definition below.
bankAccountNumber
Numeric20
The payer’s bank account number for ACH transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
bankRoutingNumber
Numeric9
The payer’s bank routing number for ACH transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
bankAccountNumberLastFour
Numeric20
The last four numbers of the payer’s bank account number.
checkNumber
Numeric10
The payer’s check number for transaction.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
bankAccountType
Alpha8
The type of bank account.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
Valid value(s): CHECKING, SAVINGS

AchStatusData

Attribute Description
status
Alpha12
The status of the ACH transaction
Valid value(s):
WAITING - transaction will be included in next batch
SUBMITTED - transaction has been submitted for processing
ACKNOWLEDGED - transaction has been accepted for processing
FUNDED - money has been deposited into your account
DEDUCTION - money has been taken from your account
VOID - transaction was cancelled prior to submission for processing
RETURNED - an exception occured while processing transaction
CORRECTION - transaction was automatically corrected during processing
ERROR - an unknown error occured while processing transaction
returnCode
Alpha8
The return code for the ACH transaction, if applicable.
returnMessage
AlphanumericN/A
Explanation of the returnCode.
statusChangeDate
Date25
Date and time this ACH status was recorded.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)

CreditCardTransaction

Attribute Description
creditCardExpirationMonth
Numeric2
Expiration month of the payer’s credit card.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
creditCardExpirationYear
Numeric4
Expiration year of the payer’s credit card.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it.
creditCardToken
Alphanumeric16
Credit card token as generated by PDC4U. An actual credit card number will fail validation.
Constraint(s): Will be preloaded on form for client, though they will be able to edit it or enter a different card number.

See the Store a credit card in the vault example in the Credit Card API for help generating the token.
creditCardType
Alpha50
The type of the payer’s credit card.
authorizationCode
Alphanumeric75
The authorization code for the processed transaction

Document

endpoint:
https://demo.pdc4u.com/SignatureService/api/v2_0/documents

POST to document endpoint to upload a document.
GET to retrieve a previously uploaded document.

Attribute Description
documentName
Alphanumeric36
The name given for the document.
documentBase64String
Base64N/A
The document as a Base64 encoded string.
documentId
Numeric20
Id for document that was uploaded. Can be sent in future requests to reuse document without uploading it again.
documentUrl
Alphanumeric160
The URL to retrieve the information, through a GET request, for this document.
originalUploadDate
Date25
The date and time the document was originally uploaded.
Format: ISO-8601 (YYYY-MM-DDTHH:mm:ss)
overlayId
Numeric20
The id of an uploaded overlay to apply to this document in the request.

ImageUpload

endpoint:
https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads

GET to retrieve an image from a previous signature request.

Attribute Description
imageUploadRequested
Boolean5
Whether to request an image upload from the client.
Valid value(s): true, false
Default: false
imageUploadId
Numeric20
Id for the image that was uploaded by the client.
signatureId
Numeric20
The id of the transaction request this image is tied to.
imageUploadSuccessful
Boolean5
Whether the upload was successful or not.
Valid value(s): true, false
imageDescription
Alphanumeric160
A description of the image for the client to upload.
Default: Upload Image
ImageUploadBase64
Base64N/A
Base64 encoded value of the .png format uploaded image.
signatureUrl
Alphanumeric160
The URL to retrieve the information, through a GET request, for this transaction.
imageUploadUrl
Alphanumeric160
The URL to retrieve the information, through a GET request, for this image upload.

RoundTripNVP

Attribute Description
rtName
Alphanumeric75
Required
The name of a round trip name value pair.
rtValue
Alphanumeric75
Required
The value of a round trip name value pair.

TransactionReport

endpoint:
https://demo.pdc4u.com/SignatureService/api/v2_0/transactionReports

GET to retrieve a transaction report for a signature transaction.

Attribute Description
signatureId
Numeric20
Required
The id of the transaction request to retrieve a report for.
format
Alphanumeric3
The desired format of the transaction report.
Valid value(s): PDF
Default: PDF
emailAddress
Alphanumeric65
An email address to send the transaction report to.
reportData
Base64N/A
The full transaction report pdf as a Base64 encoded value.
closedOrExpired
Boolean5
Whether the request has been closed or expired or not.
Valid value(s): true, false

RequestErrorList

Attribute Description
requestErrorList
ListN/A
A list of RequestError objects containing validation errors.
Constraint(s): Only returned when validation errors occur. See object definition below.

RequestError

Attribute Description
code
Alpha3
The code for the validation error.
description
AlphanumericN/A
The description of the validation error.

Sample Use Case

While the signature service offers many different types of functionality, knowing how to tie them all together can be a bit tricky. Below are some potential workflows that you may encounter, and the API components that should be used. The components can be used separately, or as a group.

Get signatures on a mortgage document and image of some form of identification

<?php
$data = [
  'document' => [
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  ],
  'imageUpload' => [
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  ],
  'standaloneSignatureRequested' => 'true'
];
my $data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'imageUpload' => {
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  },
  'standaloneSignatureRequested' => 'true'
};
data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'imageUpload' => {
    'imageUploadDescription' => 'Take a picture of some form of identification',
    'imageUploadRequested' => 'true'
  },
  'standaloneSignatureRequested' => 'true'
};

Components required: Signature, Document, ImageUpload

Get a signature on a recurring payment schedule

<?php
$data = [
  'document' => [
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  ],
  'standaloneSignatureRequested' => 'true'
];
my $data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'standaloneSignatureRequested' => 'true'
};
data = {
  'document' => {
    'documentId' => 'ID_FROM_STEP_1',
    'overlayId' => ''
  },
  'standaloneSignatureRequested' => 'true'
};

Components required: Signature, Document

Sample Code

This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Signature Service REST API and are not meant for production use.

Result Status Codes

Expected Http Status codes

Status '200':
Description = 'Success.'

Status: '400':
Description = 'Malformed request. The request is either incorrectly formatted, or there are validation errors.'

Status '401':
Description = 'Invalid credentials.'

Status '403':
Description = 'Service not activated.'

Status '404':
Description = 'The requested signature/document/image was not found.'

Status '405':
Description = 'POST, GET, PUT request not supported for resource.'

Status '500':
Description = 'An internal error has occurred.'

All requests will return a status code. For example, in the case of status code 400, check for a requestErrorList in the response, containing information on validation failure.

Send Signature Request

<?php
    $payment = [
        'accountNumber' => 'YourAccountNumber',
        'paymentAmount' => '$125.00',
        'feeAmount' => '$5.00',
        'accountDirective' => '0000'
    ];
    if($paymentType == 'CARD') {
        $payment['paymentType'] = 'CC';
        $payment['ccTransaction'] = [
            'creditCardExpirationMonth' => '09',
            'creditCardExpirationYear' => '2022',
            'creditCardToken' => 'CardTokenFromPDC'
        ];
    }
    else if ($paymentType == 'CHECK'){
        $payment['paymentType'] = 'ACH';
        $payment['achTransaction'] = [
            'bankAccountNumber' => '123456',
            'bankAccountNumberLastFour' => '3456',
            'bankAccountType' => 'CHECKING',
            'bankRoutingNumber' => '124001545',
            'checkNumber' => '1'
        ];
    }
    $roundTripList = [];
    $roundTripList[] = ['rtName'=>'personalIdNumber', 'rtValue'=>'1234abcd'];

    $data = [
        'customMessage' => 'Thank you for buying!',
        'description' => 'Agreement for mortgage.',
        'emailAddress' => 'frontenduser@pdc4u.com',
        'firstName' => 'Adam',
        'lastName' => 'Test',
        'maxPinAttempts' => '2',
        'mobileNumber' => '7777777777',
        'pinDescription' => 'Last four of your social security number',
        'redirectLink' => 'https://www.pdcflow.com',
        'requestGeolocation' => 'true',
        'roundTripNVPS' => $roundTripList,
        'payment' => $payment,
        'document' => [
            'documentId' => '1',
            'overlayId' => '' //Specify to include an overlay                           
        ],
        'imageUpload' => [
            'imageUploadDescription' => 'Upload photo id',
            'imageUploadRequested' => 'true',             
        ],
        'standaloneSignatureRequested' => 'true',
        'templateName' => 'SignatureOnly',
        'timeoutMinutes' => '4.5',
        'transactionOrigin' => 'EXT',
        'username' => 'someuser@pdc4u.com',
        'verificationPin' => '1235',
    ];

    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/signatures';

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_POST, 1);
    $data = json_encode($data, JSON_UNESCAPED_SLASHES);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
                'Content-Type: application/json',
                'Content-Length: ' . strlen($data)]
    );
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
      //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $paymentType = 'CARD';
   my %payment = (
      'accountNumber' => 'YourAccountNumber',
      'paymentAmount' => '$125.00',
      'feeAmount' => '$5.00',
      'accountDirective' => '0000'
   );
   if($paymentType eq 'CARD') {
      $payment{'paymentType'} = 'CC';
      $payment{'ccTransaction'} = {
         'creditCardExpirationMonth' => '09',
         'creditCardExpirationYear' => '2022',
         'creditCardToken' => 'CardTokenFromPDC'
      };
   }
   elsif ($paymentType == 'CHECK'){
      $payment{'paymentType'} = 'ACH';
      $payment{'achTransaction'} = {
         'bankAccountNumber' => '123456',
         'bankAccountNumberLastFour' => '3456',
         'bankAccountType' => 'CHECKING',
         'bankRoutingNumber' => '124001545',
         'checkNumber' => '1'
      };
   }
   my $roundTripList = [ {'rtName'=>'personalIdNumber'}, {'rtValue'=>'1234abcd'} ];

   my $data = {
      'customMessage' => 'Thank you for buying!',
      'description' => 'Agreement for mortgage.',
      'emailAddress' => 'frontenduser@pdc4u.com',
      'firstName' => 'Adam',
      'lastName' => 'Test',
      'maxPinAttempts' => '2',
      'mobileNumber' => '7777777777',
      'pinDescription' => 'Last four of your social security number',
      'redirectLink' => 'https://www.pdcflow.com',
      'requestGeolocation' => 'true',
      'roundTripNVPS' => $roundTripList,
      'payment' => \%payment,
      'document' => {
         'documentId' => '1',
         'overlayId' => '' #Specify to include an overlay
      },
      'imageUpload' => {
         'imageUploadDescription' => 'Upload photo id',
         'imageUploadRequested' => 'true',
      },
      'standaloneSignatureRequested' => 'true',
      'templateName' => 'SignatureOnly',
      'timeoutMinutes' => '4.5',
      'transactionOrigin' => 'EXT',
      'username' => 'someuser@pdc4u.com',
      'verificationPin' => '1235',
   };

   $data = JSON::XS->new->utf8->encode ($data);

   my $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/signatures';

   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );

   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'
require 'base64'

begin
   paymentType = 'CARD'
   #paymentType = 'CHECK'

   payment = {
      'accountNumber' => 'YourAccountNumber',
      'paymentAmount' => '$125.00',
      'feeAmount' => '$5.00',
      'accountDirective' => '0000'
   }

   if paymentType == 'CARD' then
      payment['paymentType'] = 'CC'
      payment['ccTransaction'] = {
         'creditCardExpirationMonth' => '09',
         'creditCardExpirationYear' => '2022',
         'creditCardToken' => 'CardTokenFromPDC'
      }
   elsif paymentType == 'CHECK' then
      payment['paymentType'] = 'ACH'
      payment['achTransaction'] = {
         'bankAccountNumber' => '123456',
         'bankAccountNumberLastFour' => '3456',
         'bankAccountType' => 'CHECKING',
         'bankRoutingNumber' => '124001545',
         'checkNumber' => '1'
      }
   end

   roundTripList = [
      'rtName'=>'personalIdNumber',
      'rtValue'=>'1234abcd'
   ]

   data = {
      'customMessage' => 'Thank you for buying!',
      'description' => 'Agreement for mortgage.',
      'emailAddress' => 'frontenduser@pdc4u.com',
      'firstName' => 'Adam',
      'lastName' => 'Test',
      'maxPinAttempts' => '2',
      'mobileNumber' => '7777777777',
      'pinDescription' => 'Last four of your social security number',
      'redirectLink' => 'https://www.pdcflow.com',
      'requestGeolocation' => 'true',
      'roundTripNVPS' => roundTripList,
      'payment' => payment,
      'document' => {
         'documentId' => '1',
         'overlayId' => '' # Specify to include an overlay
      },
      'imageUpload' => {
         'imageUploadDescription' => 'Upload photo id',
         'imageUploadRequested' => 'true',
      },
      'standaloneSignatureRequested' => 'true',
      'templateName' => 'SignatureOnly',
      'timeoutMinutes' => '4.5',
      'transactionOrigin' => 'EXT',
      'username' => 'someuser@pdc4u.com',
      'verificationPin' => '1235',
   }

   c = Curl::Easy.new
   c.url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/signatures'
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true

   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json

   c.headers = headers
   c.http_post(payload)

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General signature requests will use this method. It will send a text or email or both to the specified emailAddress, mobileNumber.

Send a HTTP POST request, with the required data, to:
https://demo.pdc4u.com/SignatureService/api/v2_0/signatures

Signature Retrieval

<?php
    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/'.$desiredSignatureId;

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_GET, 1);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
      //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $desiredSignatureId = '1';
   my $url = "https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/$desiredSignatureId";

   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin
   desiredSignatureId = '1'
   url = "https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/#{desiredSignatureId}"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General signature retrieval will use this method. It will retrieve the details for a signature with the specified id.

Send an HTTP GET request to:
https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/[signatureId]

Signature Modification

<?php
    $idOfSignatureToModify = 1;
    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/'.$idOfSignatureToModify;

    $data = [
        'signatureId'=>$idOfSignatureToModify,
        'modificationCode'=>'CLOSE',
        'username'=>'frontenduser@pdc4u.com'
    ];

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
    $data = json_encode($data, JSON_UNESCAPED_SLASHES);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
                    'Content-Type: application/json',
                    'Content-Length: ' . strlen($data)]
    );
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
        //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;

eval {
   my $idOfSignatureToModify = 1;
   my $url = "https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/$idOfSignatureToModify";

   my $data = {
      'signatureId' => $idOfSignatureToModify,
      'modificationCode' => 'CLOSE',
      'username' => 'someuser@pdc4u.com'
   };
   $data = JSON::XS->new->utf8->encode ($data);

   my $req = HTTP::Request->new( 'PUT', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );

   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'
require 'base64'

begin
#   idOfSignatureToModify = 1;
   idOfSignatureToModify = 2560;
   url = "https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/#{idOfSignatureToModify}"

   data = {
      'signatureId' => idOfSignatureToModify,
      'modificationCode' => 'CLOSE',
      'username' => 'someuser@pdc4u.com'
   }


   c = Curl::Easy.new
   c.url = url
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true

   headers = {}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json

   c.headers = headers
   c.http_put(payload)

   #puts JSON.parse c.body_str
   puts c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General signature modification will use this method. It will modify an existing signature request. Currently, only “CLOSE” is supported.

Send an HTTP PUT request, with required data, to:
https://demo.pdc4u.com/SignatureService/api/v2_0/signatures/[signatureId]

Document Upload

<?php       
    $data = [
        'documentName' => 'HR_Document',
        'documentBase64String' => 'JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmlsdGVyIC9G...'
    ];

    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/documents';

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_POST, 1);
    $data = json_encode($data, JSON_UNESCAPED_SLASHES);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
                'Content-Type: application/json',
                'Content-Length: ' . strlen($data)]
    );
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
        //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;

eval {
   # read and encode pdf to upload
   my $pdfDocument = 'mydoc.pdf';
   my $pdfContents = read_file( $pdfDocument );
   my $documentData = encode_base64($pdfContents, ""); # encode without newlines

   my $data = {
      'documentName' => 'HR_Document',
      'documentBase64String' => $documentData
   };
   $data = JSON::XS->new->utf8->encode ($data);

   my $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/documents';

   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );

   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'
require 'base64'

begin
   # read and encode pdf to upload
   pdfDocument = 'mydoc.pdf'
   file = File.open(pdfDocument, "rb")
   contents = file.read
   file.close
   documentData = Base64.strict_encode64(contents) # encodes without newlines

   data = {
      'documentName' => 'HR_Document',
      'documentBase64String' => documentData
   }

   c = Curl::Easy.new
   c.url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/documents';
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true

   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json

   c.headers = headers
   c.http_post(payload)

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General document upload requests will use this method. It will upload a document and return a documentId to be used when sending a signature request.

Send an HTTP POST request, with required data, to:
https://demo.pdc4u.com/SignatureService/api/v2_0/documents

Document Retrieval

<?php
    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/documents/'.$desiredDocumentId;

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_GET, 1);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
        //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $desiredDocumentId = '1';
   my $url = "https://demo.pdc4u.com/SignatureService/api/v2_0/documents/$desiredDocumentId";

   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin
   desiredDocumentId = '1'
   url = "https://demo.pdc4u.com/SignatureService/api/v2_0/documents/#{desiredDocumentId}"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General document retrieval will use this method. It will retrieve the details for an uploaded document with the specified id.

Send an HTTP GET request to:
https://demo.pdc4u.com/SignatureService/api/v2_0/documents/[documentId]

ImageUpload Retrieval

<?php
    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads/'.$desiredImageUploadId;

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_GET, 1);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
        //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $desiredImageUploadId = '1';
   my $url = "https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads/$desiredImageUploadId";

   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin
   desiredImageUploadId = '1'
   url = "https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads/#{desiredImageUploadId}"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General image upload retrieval will use this method. It will retrieve the details for an image, uploaded by the client, for the given image upload id.

Send an HTTP GET request to:
https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads/[imageUploadId]

The image upload may also be received by passing the related signature Id in an HTTP GET request to:
https://demo.pdc4u.com/SignatureService/api/v2_0/imageUploads?signatureId=[signatureId]

Transaction Report Retrieval

<?php
    $url = 'https://demo.pdc4u.com/SignatureService/api/v2_0/transactionReports/'.$desiredSignatureId.'?format=PDF';

    $curl = curl_init();

    curl_setopt($curl, CURLOPT_GET, 1);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if ($statusCode == '200')
    {
        //Handle success
    }
    else
    {
        //Handle error according to status code
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $desiredSignatureId = 1;
   my $url = "https://demo.pdc4u.com/SignatureService/api/v2_0/transactionReports/$desiredSignatureId?format=PDF";

   my $req = HTTP::Request->new( 'GET', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin
   desiredSignatureId = '1'
   url = "https://demo.pdc4u.com/SignatureService/api/v2_0/transactionReports/#{desiredSignatureId}?format=PDF"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

General transaction report retrieval will use this method. It will create and retrieve a detailed report for a signature transacion.

Send an HTTP GET request to:
https://demo.pdc4u.com/SignatureService/api/v2_0/transactionReports/[signatureId]?format=PDF

Temp Credentials API

The Temporary Credentials API will do as the name implies, give you a set of temporary credentials. This API is often used in conjunction with the Secure Entry Overlay to keep your standard credentials from being exposed via javascript.

API Request

This API requires a wsse security header, which will include your username and password. Besides the security header, no further attributes are required. An example is provided below.

API Result

Attribute Description
Username
Alphanumeric36
A temporary username used for authentication.
Password
Alphanumeric36
A temporary password used for authentication.

Sample Code

This section offers an example of how to implement this within your own code. Keep in mind this is only an example to demonstrate how to use the service.

Web Service Security

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>SomeSecretUsername</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">SomeEvenMoreSecretPassword</wsse:Password>
                <wsu:Created>2014-05-07T20:33:48.015Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    ........

Each SOAP request submitted to PDCflow must contain a security header as part of the message. This header is based on an established standard: Web Services Security - UsernameToken Profile 1.1. An example of this header is shown to the right.

See: http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-UsernameTokenProfile-v1.1.1-os.html

Get a set of temporary credentials

 <?php
 //special handling to create a WSSE-compliant header
 class WsseAuthHeader extends SoapHeader {

   private $wss_ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';

   function __construct($user, $pass) {
     $auth = new stdClass();
     $auth->Username = new SoapVar($user, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);
     $auth->Password = new SoapVar($pass, XSD_STRING, NULL, $this->wss_ns, NULL, $this->wss_ns);

     $username_token = new stdClass();
     $username_token->UsernameToken = new SoapVar($auth, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns);

     $security_sv = new SoapVar(
       new SoapVar($username_token, SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'UsernameToken', $this->wss_ns),
       SOAP_ENC_OBJECT, NULL, $this->wss_ns, 'Security', $this->wss_ns);

     parent::__construct($this->wss_ns, 'Security', $security_sv, true);
   }
 }


 $url = 'https://demo.pdc4u.com/TempCredentialsService/ws/tempcredentialsservices/tempcredentialsservice.wsdl';
 $namespace = 'http://webservices.pdc4u.com/tempCredentials';
 $method = 'CreateTempCredentials';

 $wsse_header = new WsseAuthHeader('SomeSecretUsername', 'SomeSecretPassword');
 $client = new SoapClient($url);
 $client->__setSoapHeaders([$wsse_header]);


 try {
   $response = $client->__soapCall(
     $method,
     [[], $namespace]
   );

   print_r($response);
 }
 catch (SoapFault $fault) {
   print_r($fault);
 }
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1) # nice for debugging
   ->autotype(0)
   # Extract the targetNamespace from the .wsdl definitions for the desired method
   ->default_ns( 'http://webservices.pdc4u.com/tempCredentials' )
   ->proxy( 'https://demo.pdc4u.com/TempCredentialsService/ws/tempcredentialsservices/tempcredentialsservice.wsdl' );

my $username = 'SomeSecretUsername';
my $password = 'SomeSecretPassword';

my $security = SOAP::Header->name("wsse:Security")->attr({
      'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
   });
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
      \SOAP::Header->value(
         SOAP::Header->name('wsse:Username')->value($username)->type(''),
         SOAP::Header->name('wsse:Password')->value($password)->type('')->attr(
            {'Type'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'}))
   )->attr({'xmlns:wsu'=>'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'});

print $soap->call( 'CreateTempCredentialsRequest', $security->value(\$userToken) )->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/TempCredentialsService/ws/tempcredentialsservices/tempcredentialsservice.wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   response = client.call(:create_temp_credentials) do |locals|
      locals.wsse_auth "SomeSecretUsername", "SomeSecretPassword"
   end

   puts response
rescue
   puts "Caught: #$!\n"
end

The URL to test retrieving temporary credentials is:
https://demo.pdc4u.com/TempCredentialsService/ws/tempcredentialsservices/tempcredentialsservice.wsdl

The namespace to use is:
http://webservices.pdc4u.com/tempCredentials

The method to use is:
CreateTempCredentials

Transaction Inquiry API

API Request

This reporting API allows you to get a list of transactions and details about those transactions.

transactionInquiry

Contains fields to both authenticate a customer and search the archived transactions. This object is required by all search methods in the PDCflow transactionInquiry web service. The following table describes the individual elements of the transactionInquiry object.

Attribute Description
customerId
Numeric4
Required
A four digit customer ID that together with the securityKey uniquely identifies the customer requesting transaction information.
securityKey
Alphanumeric128
Required
A password that together with the customerId uniquely identifies the customer requesting transaction information.
startDate
Date10
Conditional
The starting date in the report’s date range.
Format: YYYY-MM-DD
Constraint(s): Required if endDate is populated
endDate
Date10
Conditional
The ending date in the report’s date range.
Format: YYYY-MM-DD
Constraint(s): Required if startDate is populated
accountRefereceNumber
Alphanumeric45
The account or reference number of the transaction(s) in the report. Generally each transaction has a unique account or reference number.
transactionOrigin
Alpha6
Refers to how the transaction entered PDCflow’s payment system.
Valid value(s):
AUTO - The transaction was executed by PDCflow’s recurring payments program.
SCAN - The transaction was swiped or read digitally by an external device.
YELLOW - The transaction was submitted by an HTML form on PDCflow’s online payment center.
GREEN - The transaction was submitted by an HTML form on PDCflow’s secure site.

API Result

ECheckRecord

Contains fields representing a single transaction using PDCflow’s ECheck software.

Attribute Description
achEntryCode
Alpha3
ACH standard entry code used by the ACH system.
batchTransmitDateTime
DateTime21
The date and time the check was submitted, as a batch, to one of PDCflow’s ACH vendors.
Format: YYYY-MM-DD HH:mm:SS.S
chargeAmount
Numeric10
The base dollar amount for the check.
chargePlusFeeAmount
Numeric10
The sum of chargeAmount and feeAmount in dollars.
checkNumber
Numeric10
The number of the check.
feeAmount
Numeric10
The fee dollar amount for the check.
firstName
Alpha50
Returns everything before the first SPACE in the memo field. This could be a patient first name for example. If no space is found, it returns the entire memo field.
frontEndTrace
Numeric10
PDCflow transaction id.
lastName
Alpha50
Returns everything after the first SPACE in the memo field. This could be a patient last name for example. If no space is found, it returns the entire memo field.
payorAccountId
Alphanumeric45
Customer supplied account or reference number for the check.
payorCity
Alpha45
The check payor’s city.
payorFirstName
Alpha30
The check payor’s first name.
payorLastName
Alpha45
The check payor’s last name.
payorState
Alpha2
The check payor’s 2 character US state postal code.
payorStreetAddressLine1
Alphanumeric45
The check payor’s street address.
dept
Alpha50
The department of the user who submitted the transaction.
payorZip
Numeric10
The check payor’s US zip code.
processingDate
DateTime21
Date and time the batch containing this check was processed.
Format: YYYY-MM-DD HH:mm:SS.S
transactionOrigin
Alpha6
Refers to how the transaction entered PDCflow’s system.
processingStatus
Alpha12
Current state of the check in the ACH payment cycle.
Valid value(s):
WAITING - transaction will be included in next batch
SUBMITTED - transaction has been submitted for processing
ACKNOWLEDGED - transaction has been accepted for processing
FUNDED - money has been deposited into your account
DEDUCTION - money has been taken from your account
VOID - transaction was cancelled prior to submission for processing
RETURNED - an exception occured while processing transaction
CORRECTION - transaction was automatically corrected during processing
ERROR - an unknown error occured while processing transaction
receivedDateTime
DateTime21
The date and time the check was submitted to PDCflow.
Format: YYYY-MM-DD HH:mm:SS.S
secondaryTrace
Alphanumeric32
Location information about a company.
userName
Alpha75
The user who submitted the transaction.

CreditCardRecord

Contains fields representing a single credit card transaction from PDCflow’s archives.

Attribute Description
accountNumber
Alphanumeric45
The reference or account number submitted by the customer to identify the transaction.
firstName
Alpha50
Returns everything before the first SPACE in the memo field. This could be a patient first name for example. If no space is found, it returns the entire memo field.
lastName
Alpha50
Returns everything after the first SPACE in the memo field. This could be a patient last name for example. If no space is found, it returns the entire memo field.
address
Alphanumeric80
The check payor’s street address.
city
Alpha80
The payor’s city.
state
Alpha2
The payor’s 2 character US postal code.
zip
Numeric10
The payor’s US ZIP code.
tranType
Alpha6
What type of transaction was performed.
Valid value(s):
D - Debit
C - Credit
V - Void
P - PostAuth
pmtAmt
Numeric10
The base dollar amount for the transaction.
feeAmt
Numeric10
The fee dollar amount for the transaction.
tranAmt
Numeric10
The sum of pmtAmt and feeAmt in dollars.
tranDate
DateTime21
The date and time the transaction was submitted to PDCflow.
Format: YYYY-MM-DD
orderNum
Alphanumeric50
PDCflow’s transaction id.
userName
Alpha75
The user who submitted the transaction.
dept
Alpha50
The department of the user who submitted the transaction.
cardType
Alpha1
Credit Card type.
Valid value(s):
M - Mastercard
V - Visa
A - AmericanExpress
D - Discover
DC - Diner’s Club
U - Unknown or blank
payorFirstName
Alpha30
The payor’s first name.
payorLastName
Alpha45
The payor’s last name.
secondaryTrace
Alphanumeric50
Location information about a company.
origin
Alpha6
Refers to how the transaction entered PDCflow’s payment system.

API Fault

InquiryError

Contains a pipe (|) delimited error message, containing the error code, error name, and error description.

Attribute Description & Returned Value
message
Pipe (|) Delimited String
Invalid/malformed request object
100 | Structural | Inquiry method expects valid TransactionInquiry object.

Invalid authentication fields
200 | Authentication | The submitted customer ID and security key are not a valid login.

PDCflow internal failure
300 | Internal | An internal error has occurred. PDC4U support staff has been notified.

Sample Code

getECheckTransactions

<?php

// set parameters
$transactionInquiry = [
    'customerId' => '0000',
    'securityKey' => 'SomeSecurityKey',
    'startDate' => 'YYYY-MM-DD',
    'endDate' => 'YYYY-MM-DD',
    'transactionOrigin' => '',
    'accountReferenceNumber' => '',
    'secondaryTrace' => '',
    'processingStatus' => ''
];

$url = 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl';
$namespace = 'http://transactioninquiry.webservice.pdc4u.com';
$method = 'getECheckTransactions';
$params = [
    'transactionInquiry' => $transactionInquiry
];

$client = new SoapClient($url);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
} catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transactioninquiry.webservice.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl' );

# set parameters
my %transactionInquiry = (
   'customerId' => '0000',
   'securityKey' => 'SomeSecurityKey',
   'startDate' => 'YYYY-MM-DD',
   'endDate' => 'YYYY-MM-DD',
   'transactionOrigin' => '',
   'accountReferenceNumber' => '',
   'secondaryTrace' => '',
   'processingStatus' => ''
);

print $soap->call( 'getCreditCardTransactions',
   SOAP::Data->name('transactionInquiry' => \%transactionInquiry),
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # set parameters
   transactionInquiry = {
      'customerId' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'startDate' => 'YYYY-MM-DD',
      'endDate' => 'YYYY-MM-DD',
      'transactionOrigin' => '',
      'accountReferenceNumber' => '',
      'secondaryTrace' => '',
      'processingStatus' => ''
   }

   params = {
      'transactionInquiry' => transactionInquiry
   }

   response = client.call(:get_credit_card_transactions, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Queries the PDCflow transaction database for archived ECheck transactions and returns a list of ECheckRecord objects that can be parsed by any XML reader. The input parameter is a single transactionInquiry object that contains both customer authentication and report date range. Note, only transactions made by the submitted customer ID will be returned.

The URL to use for retrieving echeck transactions is:
https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl

The namespace to use is:
http://transactioninquiry.webservice.pdc4u.com

The method to use is:
getECheckTransactions

getCreditCardTransactions

<?php

// set parameters
$transactionInquiry = [
    'customerId' => '0000',
    'securityKey' => 'SomeSecurityKey',
    'startDate' => 'YYYY-MM-DD',
    'endDate' => 'YYYY-MM-DD',
    'transactionOrigin' => '',
    'accountReferenceNumber' => '',
    'secondaryTrace' => '',
    'processingStatus' => ''
];

$url = 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl';
$namespace = 'http://transactioninquiry.webservice.pdc4u.com';
$method = 'getCreditCardTransactions';
$params = [
    'transactionInquiry' => $transactionInquiry
];

$client = new SoapClient($url);

try {
    $response = $client->__soapCall(
        $method,
        [$params, $namespace]
    );

    print_r($response);
} catch (SoapFault $fault) {
    print_r($fault);
}
#!/usr/bin/perl

use SOAP::Lite +trace => 'debug';

my $soap = SOAP::Lite
   ->readable(1)
   ->autotype(0)
   ->ns( 'http://transactioninquiry.webservice.pdc4u.com/', "ns1" )
   ->proxy( 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl' );

# set parameters
my %transactionInquiry = (
   'customerId' => '0000',
   'securityKey' => 'SomeSecurityKey',
   'startDate' => 'YYYY-MM-DD',
   'endDate' => 'YYYY-MM-DD',
   'transactionOrigin' => '',
   'accountReferenceNumber' => '',
   'secondaryTrace' => '',
   'processingStatus' => ''
);

print $soap->call( 'getECheckTransactions',
   SOAP::Data->name('transactionInquiry' => \%transactionInquiry),
)->result;
#!/usr/bin/ruby

require 'savon' # version 2.0

begin
   # create a client for the service
   client = Savon.client(wsdl: 'https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl',
      log_level: :debug,
      log: true,
      pretty_print_xml: true)

   puts "Available operations: "
   client.operations.each { |x| puts "   #{x}", "\n" } # find which operations are supported

   # set parameters
   transactionInquiry = {
      'customerId' => '0000',
      'securityKey' => 'SomeSecurityKey',
      'startDate' => 'YYYY-MM-DD',
      'endDate' => 'YYYY-MM-DD',
      'transactionOrigin' => '',
      'accountReferenceNumber' => '',
      'secondaryTrace' => '',
      'processingStatus' => ''
   }

   params = {
      'transactionInquiry' => transactionInquiry
   }

   response = client.call(:get_e_check_transactions, message: params)

   puts response
rescue
   puts "Caught: #$!\n"
end

Queries the PDCflow transaction database for archived credit card transactions and returns a list of CreditCardRecord objects that can be parsed by any XML reader. The input parameter is a single transactionInquiry object that contains both customer authentication and report date range. Note, only transactions made by the submitted customer ID will be returned.

The URL to use for retrieving card transactions is:
https://demo.pdc4u.com/TransactionInquiryService/Inquiry?wsdl

The namespace to use is:
http://transactioninquiry.webservice.pdc4u.com

The method to use is:
getCreditCardTransactions

Appendix

Here you can find information that is not part of our actual APIs, but will be useful while setting up your integration.

Test Credit Cards

This is a set of credit card numbers that can be used while testing our APIs to generate specific responses. We strongly recommend that you use these numbers instead of live credit card information while testing.

Card Info Result
4000100011112224
EXP : 09/19CVV : 123
Success
4000300011112220
EXP : 09/19CVV : 999
Declined
4000300611112224
EXP : 09/19CVV : 999
Insufficient Funds
4000301311112225
EXP : 09/19CVV : 999
CVV failure
4000000011112234
EXP : 09/19
Simulate a slow processing time : approx. 15s
4000000011112259
EXP : 09/19
Simulate a slow processing time : approx. 45s