MENU
PHP CSharp Perl Ruby

Transaction Service API

The Transaction Service allows easy integration for processing and retrieving information for Card and ACH transactions. Requests are made through POST, PUT, or GET requests.

Authentication and authorization for the TransactionService will be done with a Base64 encoded username:password, passed in through the BASIC HTTP Authorization Header.

General Service Notes

POST Create a new entity.
PUT Update and overwrite an existing entity.
PATCH Update portions of an existing entity. In general, if supplied value is null, the field will not be changed.
GET Retrieve a single entity or a list of entities.
RESPONSE In general, fields will only be returned if their value is not null or empty.


Ach Processing

-DEBIT Request

POST an AchTransaction to create a new ACH Transaction


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits

Response

AchTransaction object

-BULK DEBIT Request

POST a TransactionBulk to create and process a list of new ACH Transactions


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits/bulk
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits/bulk

Response

TransactionBulk object

When the endpoint begins processing the transactions in the background (async), the HTTP Status will be 202 ACCEPTED

-CREDIT Request

POST an AchTransaction to create a new credit ACH Transaction


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits

Response

AchTransaction object

-CREDIT Existing Request

POST an AchTransaction to credit an existing ACH Transaction with the originalTransactionId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}

Response

AchTransaction object

-VOID Existing Request

PUT an AchVoidTransaction to void an existing ACH Transaction with the originalTransactionId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}

Response

AchTransaction object


-AchTransaction Object

Attribute Description
paymentMethod
Alpha5
Readonly
The payment method of the Transaction. For AchTransactions this value is CHECK. Always present.
arrivalId
NumericString20
Readonly
The arrival id of the transaction. Always present.
transactionId
NumericString20
Readonly
The id of the transaction. Only present when transactionStatus is APPROVED.
relatedId
NumericString20
Readonly
The id of the related transaction. When the transaction transactionType is CREDIT, this value will be the transactionId of the original debit transaction. It will be blank in all other scenarios.
uniqueRequestId
Alphanumeric50
An optional id provided for the transaction. This value will be used as an additional mechanism for verifying against duplicate transactions. When a duplicate uniqueRequestId is found, the requestErrorList will contain an apiFieldNameList with the related arrivalId. If the original transaction was APPROVED this will also include the transactionId. These ids can be used to GET the original transaction. This feature is not supported when VOIDing a transaction.
accountNumber
Alphanumeric45
Account or reference number. This is often the customer account number from your system.
firstName
Alphanumeric45
The first name of your client.
lastName
Alphanumeric45
The last name of your client.
streetAddressOne
Alphanumeric80
The first line of the address.
streetAddressTwo
Alphanumeric45
The second line of the address.
city
Alphanumeric45
The city associated with the transaction.
state
Alpha2
Conditional
The abbreviation of the state. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code associated with the transaction. Some payment gateway processors require this.
country
Alpha2
The abbreviation of the country.
zipPlusFour
NumericString4
The four digit extension of the zip code.
country
Alpha2
The abbreviation of the country.
memo
Alphanumeric50
Custom memo field.
phoneNumber
NumericString10
An un-formatted phone number.
phoneNumberType
NumericString10
The type of phone number, if known. If not submitted as part of the original payment, HOME will be assumed.
Valid value(s):
CELL HOME WORK
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
flowId
NumericString20
The related Flow transaction (often a signature). See Flow Service.
transactionType
Alpha6
The type of transaction that was requested.
Valid value(s):
DEBIT CREDIT
paymentAmount
NumericString11
Conditional
The payment amount of the transaction.
Either a paymentAmount or feeAmount is required
feeAmount
NumericString11
Conditional
The fee amount of the transaction.
Either a feeAmount or paymentAmount is required
transactionAmount
NumericString11
Readonly
The total amount of the transaction.
creditAmount
NumericString11
Readonly
The total outgoing payment amount for the transaction record.
debitAmount
NumericString11
Readonly
The total amount that is expected to be delivered from the payer’s account into the merchant’s account for the transaction.
netAmount
NumericString11
Readonly
The overall sum of the debit and credit for the transaction; if this is a credit and a negative dollar amount, a “-” will display with the amount, e.g. “-12.00”
dateCreated
Date19
Readonly
The date the transaction was received.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateScheduled
Date10
Required
The date the transaction is scheduled to be processed. This date must be today or later.
Format: ISO-8601 (YYYY-MM-DD)
dateProcessed
Date19
Readonly
The date the transaction was processed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionDate
Date19
Readonly
The date the transaction was processed. Alias for dateProcessed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateNachaVerified
Date19
Readonly
The date the bank account data was verified. This verification only happens the first time unique bank payment information (bankRoutingNumber and bankAccountNumber) is provided under these conditions: The verification feature is enabled, and the processing vendor supports it (such as Payliance), and the accountDirective is for a “WEB” entryCode. Please contact our Customer Success team to learn more.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionOrigin
Alpha3
Required
The origin of the transaction. This should be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
entryCode
Alpha3
Readonly
The entry code that the transaction was processed with. Only present on transactions with a transactionStatus of APPROVED.
bankName
Alphanumeric45
Readonly
The name of the account holder’s bank. Only present for transactions with a transactionStatus of APPROVED.
bankAccountToken
Alphanumeric20
Conditional
A Token which represents the account holder’s bank data (bankAccountNumber, bankRoutingNumber, bankAccountType) to be used for processing this transaction. Either this or a bankAccountNumber is required.
NOTE: This can be generated from the TokenizationService
isReusable
BooleanN/A
Indicates whether the bankAccountToken is authorized for reuse. If false, this token may only be used for a single transaction.
Default value: true
bankAccountNumber
NumericString20
Conditional
The account holder’s bank account number. Either this or a bankAccountToken is required. During DEBIT or CREDIT processing, this value will be Tokenized and the generated token will be returned in the bankAccountToken field.
DEPRECATED: use bankAccountToken instead
bankRoutingNumber
NumericString9
Conditional
The routing number of the account holder’s bank. Required if providing a bankAccountNumber. If provided with a bankAccountToken, this value will be updated on the Token.
bankAccountType
Alpha8
Conditional
The type of bank account that is used to make the payment. Required if providing a bankAccountNumber. If provided with a bankAccountToken, this value will be updated on the Token.
Valid value(s): CHECKING, SAVINGS
bankAccountNumberLastFour
NumericString4
Readonly
The last four numbers of the account holder’s bank account number.
checkNumber
NumericString10
The check number.
currentStatus
Alpha12
Readonly
The current status of the ACH transaction.
Valid value(s):
WAITING - transaction will be included in next batch
POST_DATED - transaction will be included in a future 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 occurred while processing transaction
CORRECTION - transaction was automatically corrected during processing
currentStatusDate
Date19
Readonly
The date the transaction entered the current processing status.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
currentReturnCode
Alpha4
The current return code for the ACH transaction, if applicable.
currentReturnCodeDetail
Alphanumeric255
Explanation of the currentReturnCode.
transactionStatus
Alphanumeric8
Readonly
The status of the transaction request.
Valid value(s):
APPROVED - Transaction was successfully handled and has been, or will be, submitted to the vendor for processing. See ProcessingStatuses for current processing status.
ERROR - An error has occurred and the transaction failed processing. These transactions can typically be resubmitted once the issues have been corrected. See RequestErrorList for a list of errors.
processingStatuses
ListN/A
Readonly
A list of ProcessingStatus objects.
batchId
NumericString10
Readonly
The batch the transaction was assigned to. If the transaction still has a status of WAITING, this value will be blank.
batchTransmit
Date19
Readonly
The date when the transaction was added to a batch. If the transaction still has a status of WAITING, this value will be blank.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
settlementId
Alphanumeric20
Readonly
An identifier by which the transaction was settled, and a debit or credit was done into your bank account. This value will be provided when the transaction status is FUNDED or DEDUCTION.
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
accountDirective
Alphanumeric10
Required
The account directive to use for processing the payment.
Format: XXX-X
transactionType
Alpha5
The types of Transactions that are allowed are:
Valid value(s):
DEBIT
CREDIT
allowDuplicate
BooleanN/A
By default the system will look for and block duplicate transactions. If a duplicate transaction is intended, setting this value to true will allow processing of the duplicate transaction.
scheduleId
NumericString10
The id for the schedule that the payment was processed for.
Constraint(s): Only used for DEBIT transactions.
locationId
NumericString10
The id for the Location that the payment was processed for.
hierarchyData
Object
Readonly
A HierarchyData object containing Location and Group data. This object is populated if a valid locationId is provided.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CHECK is provided and the transaction processed successfully, a notificationEvent of CHECK_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an AchTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the AchTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided

-Ach ProcessingStatus

Attribute Description
status
Alpha12
The status of the ACH transaction
Valid value(s):
WAITING - transaction will be included in next batch
POST_DATED - transaction will be included in a future 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 occurred while processing transaction
CORRECTION - transaction was automatically corrected during processing
achReturnCode
Alpha4
The return code for the ACH transaction, if applicable.
achReturnCodeDetail
Alphanumeric255
Explanation of the achReturnCode.
changeDate
Date19
Date and time this ACH status was recorded.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)

-AchVoidTransaction

Attribute Description
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CHECK is provided and the transaction processed successfully, a notificationEvent of CHECK_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an AchTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the AchTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided



Card Processing

-SALE Request

POST a CardTransaction to create and process a new Card Transaction


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales

Response

CardTransaction object

-BULK SALE Request

POST a TransactionBulk to create and process a list of new Card Transactions


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk

Response

TransactionBulk object
When the endpoint begins processing the transactions in the background (async), the HTTP Status will be 202 ACCEPTED

-CREDIT Existing Request

POST a CardTransaction to credit a Card Transaction with the originalTransactionId. When processing a CREDIT transaction, the original cardToken will always be used.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/{originalTransactionId}

Response

CardTransaction object

-VOID Existing Request

POST a CardVoidTransaction to void a Card Transaction with the originalTransactionId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/{originalTransactionId}

Response

CardTransaction object


-VERIFY Request

POST a CardTransaction to verify a Card


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/verify
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/verify

Response

CardTransaction object

-CardTransaction Object

Attribute Description
paymentMethod
Alpha5
Readonly
The payment method of the Transaction. For CardTransactions this value is CARD. Always present.
accountNumber
Alphanumeric45
Required
Account or reference number. This is often the customer account number from your system.
firstName
Alphanumeric45
Required
The first name of the payer.
lastName
Alphanumeric45
Required
The last name of the payer.
transactionType
Alpha8
Required
The type of transaction that was requested.
Valid value(s):
SALE VOID CREDIT POSTAUTH VERIFY
paymentAmount
NumericString11
Conditional
The payment amount of the transaction.
For transactionType VERIFY, paymentAmount and feeAmount should be omitted.
For All other transactionType Either a paymentAmount or feeAmount is required. Always required when processing with a Zero Cost Processing accountDirective.
feeAmount
NumericString11
Conditional
The fee amount of the transaction.
For transactionType VERIFY, paymentAmount and feeAmount should be omitted.
For all other transactionType Either a feeAmount or paymentAmount is required
creditAmount
NumericString11
Readonly
The total outgoing payment amount for the transaction record.
debitAmount
NumericString11
Readonly
The total amount that is expected to be delivered from the payer’s account into the merchant’s account for the transaction.
netAmount
NumericString11
Readonly
The overall sum of the debit and credit for the transaction; if this is a credit and a negative dollar amount, a “-” will display with the amount, e.g. “-12.00”
transactionOrigin
Alpha3
Required
The origin of the transaction. To process a swiped card transaction, this should be set to SCN. Otherwise, this should be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
accountDirective
Alphanumeric10
Required
The method of payment to use for processing.
Format: XXX-X
cardToken
Alphanumeric16
Conditional
The card token that represents the card to be used for processing this transaction. This is required unless processing a swipe transaction with magStripeData, or when processing a CREDIT transaction. This value must not be supplied for a CREDIT transaction.
NOTE: This can be generated from the TokenizationService
isReusable
BooleanN/A
Indicates whether the cardToken has been authorized for reuse. If false, this token may only be used for a single transaction.
Default value: true
expirationMonth
Numeric2
The expiration month of the credit card to be used for processing. If this is not a swiped transaction with magStripeData, and this field is not included, the expiration date from the original creation of the cardToken will be used.
Format: MM
expirationYear
Numeric4
The expiration year of the credit card to be used for processing. If this is not a swiped transaction with magStripeData, and this field is not included, the expiration date from the original creation of the cardToken will be used.
Format: YYYY
securityCode
Numeric4
The security code or cvv2 of the credit card to be used for processing. This field is not returned.
postAuthCode
Alphanumeric9
Conditional
The postAuth code, acquired from the vendor, to be used for processing this transaction. This is required for POSTAUTH transactions, and will be ignored otherwise.
canRetryDecline
Boolean5
Option to specify if a transactionStatus of DECLINED can attempt to retry tomorrow. Only some DECLINED reasons will retry such as “Insufficient Funds”, but others like “Fraud account” will not be retried.

If a CardTransaction can be retried, a new CardTransaction will be created with a transactionStatus of POST_DATED and a dateScheduled of tomorrow. The post back body sent to the postBackUrl will include the retryArrivalId which is the arrivalId for the new POST_DATED CardTransaction.

There can be up to three total attempts which are the original plus two additional retry attempts if needed.
dialog
AlphaNumeric5000
Conditional
It may be necessary to store the exact dialog that a user acknowledged when creating a payment, for reporting or auditing purposes. When a value is provided, the dialog is stored with the transaction and a dialogId is returned. Integrators can retrieve a transaction’s dialog at a later point in time with the Search Dialog Endpoint using the dialogId.
Some payment gateway processors, such as Pay N Seconds, require this. For Pay N Seconds the dialog text comes from the Dialog Templates.
dialogId
NumericString20
Readonly
This value is generated when passing in a dialog. Use the Search Dialog Endpoint to retrieve the dialog
magStripeData
AlphanumericN/A
Conditional
The encrypted mag-stripe data for a swiped card transaction. This is required instead of the cardToken to process a swiped card. This value must not be supplied for a CREDIT transaction. This field is not returned.
streetAddressOne
Alphanumeric80
The first line of the address.
streetAddressTwo
Alphanumeric45
The second line of the address.
city
Alphanumeric45
The city associated with the transaction.
state
Alpha2
Conditional
The abbreviation of the state. Some payment gateway processors require this.
zip
NumericString5
The zip code associated with the transaction.
zipPlusFour
NumericString4
The four digit extension of the zip code.
country
Alpha2
The abbreviation of the country.
memo
Alphanumeric50
Custom memo field.
phoneNumber
NumericString10
An un-formatted phone number.
phoneNumberType
NumericString10
The type of phone number, if known. If not submitted as part of the original payment, HOME will be assumed.
Valid value(s):
CELL HOME WORK
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
flowId
NumericString20
The related Flow transaction (often a signature). See Flow Service.
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
allowDuplicate
BooleanN/A
By default, the system will look for and block duplicate transactions. If a duplicate transaction is intentional and intended, setting this to true will allow processing of the duplicate transaction.
arrivalId
NumericString20
Readonly
The arrival id of the transaction. Always present.
transactionId
NumericString20
Readonly
The id of the transaction. Only present when transactionStatus is APPROVED. This will be used as the originalTransactionId when processing a CREDIT or VOID request.
relatedId
NumericString20
Readonly
The id of the related transaction. When the transaction transactionType is VOID or CREDIT, this value will be the transactionId of the original sale transaction. It will be blank in all other scenarios.
bulkId
NumericString10
Readonly
The id of the Bulk processing request if the transaction was processed using the BULK Sale Endpoint.
uniqueRequestId
Alphanumeric50
An optional id provided for the transaction. This value will be used as an additional mechanism for verifying against duplicate transactions. When a duplicate uniqueRequestId is found, the requestErrorList will contain an apiFieldNameList with the related arrivalId. If the original transaction was APPROVED this will also include the transactionId. These ids can be used to GET the original transaction. This feature is not supported when VOIDing a transaction.
transactionAmount
NumericString11
Readonly
The total amount of the transaction.
dateCreated
Date19
Readonly
The date the transaction was received.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateScheduled
Date10
The date the transaction is scheduled to be processed. This date must be today or later.

When provided, the transactionType must be SALE. While this date is in the future, the transactionStatus will be POST_DATED. When the transaction processes, the transactionStatus will update based on the results of the processing attempt.
Format: ISO-8601 (YYYY-MM-DD)
dateProcessed
Date19
Readonly
The date the transaction was processed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionDate
Date19
Readonly
The date the transaction was processed. Alias for dateProcessed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
cardType
Alpha50
Readonly
The type of card used for the transaction. Only present for transactions with a transactionStatus of APPROVED.
cardNumberLastFour
NumericString4
Readonly
The last four digits of the card number.
transactionStatus
Alphanumeric8
Readonly
The status of the transaction request.
Valid value(s):
APPROVED - Transaction was processed successfully.
POST_DATED - Temporary status while a Card or PayPal Transaction has a future dateScheduled.
ERROR - An error has occurred and the transaction failed processing. These transactions can typically be resubmitted once the issues have been corrected. See RequestErrorList for a list of errors.
DECLINED - The transaction was sent to the vendor, but the vendor declined the transaction. These transactions will typically not be accepted regardless of how many times they are retried. See RequestErrorList for a list of errors.
authorizationCode
AlphanumericN/A
Readonly
An authorization code may be provided by the processing vendor for a successfully processed transaction.
avsCode
Alpha3
Readonly
The address verification result code as returned from the vendor.
avsDescription
AlphaN/A
Readonly
The address verification result description as returned from the vendor.
binType
Alpha6
Readonly
Specifies if the card used was a DEBIT or CREDIT type. This value will only be present for some USAePay SALE transactions when doing a GET or search starting Jan 1st, 2023, this is not available with the initial response data.
securityCodeResult
Alpha1
Readonly
Result of the CVV2/CVC2/CID verification system.
Valid value(s):
M - Match
N - No match
P - Not processed
S - Should be on card but not so indicated
U - Issuer not certified
X - No response from association
(blank) - No CVV2/CVC data available for transaction
hasSecurityCode
BooleanN/A
Readonly
Was the security code provided in the original transaction request.
hasMagStripData
BooleanN/A
Readonly
Was the cardMagStripData provided in the original transaction request.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
scheduleId
NumericString10
The id for the schedule that the payment was processed for.
Constraint(s): Only used for SALE transactions.
locationId
NumericString10
The id for the Location that the payment was processed for.
hierarchyData
Object
Readonly
A HierarchyData object containing Location and Group data. This object is populated if a valid locationId is provided.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CARD is provided and the transaction processed successfully, a notificationEvent of CARD_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an CardTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the CardTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided


-CardVoidTransaction

Attribute Description
memo
Alphanumeric50
Custom memo field.
transactionOrigin
Alpha3
Required
The origin of the transaction. For a VOID transaction, this should always be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
transactionType
Alpha8
Required
The type of transaction that was requested.
Valid value(s):
VOID
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CARD is provided and the transaction processed successfully, a notificationEvent of CARD_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an CardTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the CardTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided



Cash Processing

-SALE Request

POST a CashTransaction to create a new Cash Transaction


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales

Response

CashTransaction object

-VOID Existing Request

POST a CashVoidTransaction to void a Cash Transaction with the originalTransactionId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/{originalTransactionId}

Response

CashTransaction object


-CashTransaction Object

Attribute Description
paymentMethod
Alpha5
Readonly
The payment method of the Transaction. For CashTransactions this value is CASH. Always present.
accountNumber
Alphanumeric45
Required
Account or reference number. This is often the customer account number from your system.
firstName
Alphanumeric45
Required
The first name of the payer.
lastName
Alphanumeric45
Required
The last name of the payer.
transactionType
Alpha8
Required
The type of transaction that was requested.
Valid value(s):
SALE VOID
paymentAmount
NumericString11
Conditional
The payment amount of the transaction.
Either a paymentAmount or feeAmount is required
feeAmount
NumericString11
Conditional
The fee amount of the transaction.
Either a feeAmount or paymentAmount is required
creditAmount
NumericString11
Readonly
The total outgoing payment amount for the transaction record.
debitAmount
NumericString11
Readonly
The total amount that is expected to be delivered from the payer’s account into the merchant’s account for the transaction.
netAmount
NumericString11
Readonly
The overall sum of the debit and credit for the transaction; if this is a credit and a negative dollar amount, a “-” will display with the amount, e.g. “-12.00”
transactionOrigin
Alpha3
Required
The origin of the transaction. This should be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
accountDirective
Alphanumeric10
Required
The method of payment to use for processing.
Format: XXX-X
streetAddressOne
Alphanumeric80
The first line of the address.
streetAddressTwo
Alphanumeric45
The second line of the address.
city
Alphanumeric45
The city associated with the transaction.
state
Alpha2
The abbreviation of the state.
zip
NumericString5
Conditional
The zip code associated with the transaction. Some payment gateway processors require this.
zipPlusFour
NumericString4
The four digit extension of the zip code.
country
Alpha2
The abbreviation of the country.
memo
Alphanumeric50
Custom memo field.
phoneNumber
NumericString10
An un-formatted phone number.
phoneNumberType
NumericString10
The type of phone number, if known. If not submitted as part of the original payment, HOME will be assumed.
Valid value(s):
CELL HOME WORK
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
flowId
NumericString20
The related Flow transaction (often a signature). See Flow Service.
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
allowDuplicate
BooleanN/A
By default, the system will look for and block duplicate transactions. If a duplicate transaction is intentional and intended, setting this to true will allow processing of the duplicate transaction.
arrivalId
NumericString20
Readonly
The arrival id of the transaction. Always present.
transactionId
NumericString20
Readonly
The id of the transaction. Only present when transactionStatus is APPROVED. This will be used as the originalTransactionId when processing a VOID request.
relatedId
NumericString20
Readonly
The id of the related transaction. When the transaction transactionType is VOID, this value will be the transactionId of the original sale transaction. It will be blank in all other scenarios.
uniqueRequestId
Alphanumeric50
An optional id provided for the transaction. This value will be used as an additional mechanism for verifying against duplicate transactions. When a duplicate uniqueRequestId is found, the requestErrorList will contain an apiFieldNameList with the related arrivalId. If the original transaction was APPROVED this will also include the transactionId. These ids can be used to GET the original transaction. This feature is not supported when VOIDing a transaction.
transactionAmount
NumericString11
Readonly
The total amount of the transaction.
dateCreated
Date19
Readonly
The date the transaction was received.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateProcessed
Date19
Readonly
The date the transaction was processed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionDate
Date19
Readonly
The date the transaction was processed. Alias for dateProcessed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionStatus
Alphanumeric8
Readonly
The status of the transaction request.
Valid value(s):
APPROVED - Transaction was processed successfully.
ERROR - An error has occurred and the transaction failed processing. These transactions can typically be resubmitted once the issues have been corrected. See RequestErrorList for a list of errors.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
scheduleId
NumericString10
The id for the schedule that the payment was processed for.
Constraint(s): Only used for SALE transactions.
locationId
NumericString10
The id for the Location that the payment was processed for.
hierarchyData
Object
Readonly
A HierarchyData object containing Location and Group data. This object is populated if a valid locationId is provided.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CARD is provided and the transaction processed successfully, a notificationEvent of CARD_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an CashTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the CashTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided

-CashVoidTransaction

Attribute Description
memo
Alphanumeric50
Custom memo field.
transactionOrigin
Alpha3
Required
The origin of the transaction. This should be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
transactionType
Alpha8
Required
The type of transaction that was requested.
Valid value(s):
VOID
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CARD is provided and the transaction processed successfully, a notificationEvent of CARD_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an CashTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the CashTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided



PayPal Processing

-SALE Request

POST a PayPalTransaction to create and process a new PayPal Transaction


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales

Response

PayPalTransaction object

-CREDIT Existing Request

POST a PayPalTransaction to credit a PayPalTransaction Transaction with the originalTransactionId. When processing a CREDIT transaction, the original vaultId will always be used.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/{originalTransactionId}

Response

PayPalTransaction object



-PayPalTransaction Object

Attribute Description
paymentMethod
Alpha5
Readonly
The payment method of the Transaction. For PayPalTransaction this value is PAYPAL. Always present.
accountNumber
Alphanumeric45
Required
Account or reference number. This is often the customer account number from your system.
firstName
Alphanumeric45
Required
The first name of the payer.
lastName
Alphanumeric45
Required
The last name of the payer.
transactionType
Alpha8
Required
The type of transaction that was requested.
Valid value(s):
SALE CREDIT
paymentAmount
NumericString11
Conditional
The payment amount of the transaction.
Either a feeAmount or paymentAmount is required
feeAmount
NumericString11
Conditional
The fee amount of the transaction.
Either a feeAmount or paymentAmount is required
creditAmount
NumericString11
Readonly
The total outgoing payment amount for the transaction record.
debitAmount
NumericString11
Readonly
The total amount that is expected to be delivered from the payer’s account into the merchant’s account for the transaction.
netAmount
NumericString11
Readonly
The overall sum of the debit and credit for the transaction; if this is a credit and a negative dollar amount, a “-” will display with the amount, e.g. “-12.00”
transactionOrigin
Alpha3
Required
The origin of the transaction. This should be set to EXT.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
accountDirective
Alphanumeric10
Required
The method of payment to use for processing.
Format: XXX-X
vaultId
Alphanumeric16
Required
Reference to the PayPal payment information to be used for processing this transaction.

NOTE: This can be generated from the PayPal Vault endpoint
streetAddressOne
Alphanumeric80
The first line of the address.
streetAddressTwo
Alphanumeric45
The second line of the address.
city
Alphanumeric45
The city associated with the transaction.
state
Alpha2
Conditional
The abbreviation of the state. Some payment gateway processors require this.
zip
NumericString5
The zip code associated with the transaction.
zipPlusFour
NumericString4
The four digit extension of the zip code.
country
Alpha2
The abbreviation of the country.
memo
Alphanumeric50
Custom memo field.
phoneNumber
NumericString10
An un-formatted phone number.
phoneNumberType
NumericString10
The type of phone number, if known. If not submitted as part of the original payment, HOME will be assumed.
Valid value(s):
CELL HOME WORK
emailAddress
Alphanumeric75
Conditional
The email address of the payer. Required if sendReceiptToEmailAddress is true.
sendReceiptToEmailAddress
BooleanN/A
Required
Specify if the service should send a transaction receipt to the payer email. This field is not stored in the database and will not be returned on GET requests.
customReceiptLabels
ObjectN/A
A Name/Value list of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This field is not stored in the database and will not be returned on GET requests.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
flowId
NumericString20
The related Flow transaction (often a signature). See Flow Service.
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.
Constraint(s): Max of 10 RoundTripNVP objects per request.
allowDuplicate
BooleanN/A
By default, the system will look for and block duplicate transactions. If a duplicate transaction is intentional and intended, setting this to true will allow processing of the duplicate transaction.
arrivalId
NumericString20
Readonly
The arrival id of the transaction. Always present.
transactionId
NumericString20
Readonly
The id of the transaction. Only present when transactionStatus is APPROVED. This will be used as the originalTransactionId when processing a CREDIT request.
relatedId
NumericString20
Readonly
The id of the related transaction. When the transaction transactionType is CREDIT, this value will be the transactionId of the original sale transaction. It will be blank in all other scenarios.
uniqueRequestId
Alphanumeric50
An optional id provided for the transaction. This value will be used as an additional mechanism for verifying against duplicate transactions. When a duplicate uniqueRequestId is found, the requestErrorList will contain an apiFieldNameList with the related arrivalId. If the original transaction was APPROVED this will also include the transactionId. These ids can be used to GET the original transaction. This feature is not supported when VOIDing a transaction.
transactionAmount
NumericString11
Readonly
The total amount of the transaction.
dateCreated
Date19
Readonly
The date the transaction was received.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateScheduled
Date10
The date the transaction is scheduled to be processed. This date must be today or later.

When provided, the transactionType must be SALE. While this date is in the future, the transactionStatus will be POST_DATED. When the transaction processes, the transactionStatus will update based on the results of the processing attempt.
Format: ISO-8601 (YYYY-MM-DD)
dateProcessed
Date19
Readonly
The date the transaction was processed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionDate
Date19
Readonly
The date the transaction was processed. Alias for dateProcessed.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionStatus
Alphanumeric8
Readonly
The status of the transaction request.
Valid value(s):
APPROVED - Transaction was processed successfully.
POST_DATED - Temporary status while a Card or PayPal Transaction has a future dateScheduled.
ERROR - An error has occurred and the transaction failed processing. These transactions can typically be resubmitted once the issues have been corrected. See RequestErrorList for a list of errors.
DECLINED - The transaction was sent to the vendor, but the vendor declined the transaction. These transactions will typically not be accepted regardless of how many times they are retried. See RequestErrorList for a list of errors.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.
scheduleId
NumericString10
The id for the schedule that the payment was processed for.
Constraint(s): Only used for SALE transactions.
locationId
NumericString10
The id for the Location that the payment was processed for.
hierarchyData
Object
Readonly
A HierarchyData object containing Location and Group data. This object is populated if a valid locationId is provided.
notificationEvent
String15
The type of notification event to send after the payment is processed. _PROCESSED or _FAILED will be appended to the provided type based on the result of the transaction.
If this field is not provided, no notificationEvent will be sent.
example: CARD is provided and the transaction processed successfully, a notificationEvent of CARD_PROCESSED will be sent.
Valid value(s):
CARD
CASH
CHECK
PAYPAL
SCHEDULE_CARD
SCHEDULE_CHECK
postBackUrl
URL500
Conditional
A URL to POST when an CardTransaction is finished attempting to process.

POSTed body will be json with at least these fields from the CardTransaction object:
arrivalId, transactionId, paymentMethod, transactionStatus
Constraint(s): Must be a secure HTTPS URL
Required if postBackAuthHeader is provided
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided


TransactionBulk Object

Attribute Description
bulkId
NumericString10
Readonly
The auto-generated ID for the bulk batch of Transactions.
status
Alpha20
Readonly
Status of the Bulk Process
Valid value(s):
  • PROCESSING - The bulk process is still running in the background (async).
  • COMPLETED - The bulk process has finished successfully.
  • ERROR - The bulk process failed. See requestErrorList for the reason(s).
dateStart
Date19
Readonly
Date the processing started.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
dateEnd
Date19
Readonly
Date the processing ended.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
elapsedMs
NumericN/A
Readonly
Number of milliseconds the processing took to finish.
username
Alphanumeric75
The user that is performing the bulk.
description
Alphanumeric100
Bulk description.
transactionCountRequest
NumericN/A
Readonly
Number of transactions requested to process.
transactionCountSuccess
NumericN/A
Readonly
Number of transactions successfully processed.
transactionCountFail
NumericN/A
Readonly
Number of transactions which failed to process.
postBackUrl
URL500
A URL to POST when a bulk process is COMPLETED.
Constraint(s): Must be a secure HTTPS URL

POSTed body will be json with at least these fields from the TransactionBulk object:
bulkId, status, dateStart, dateEnd description, transactionCountRequest, transactionCountSuccess

To retrieve the transactions use the bulkIdList parameter on the Transaction Search Endpoint
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided.
cardTransactionList
List5000
Conditional
A list of CardTransaction objects to process.
Required if processing Bulk Card Sales.
This list is not returned because the transactions will be processed async by the service. To retrieve the transactions use the bulkIdList parameter on the Transaction Search Endpoint.
achTransactionList
List5000
Conditional
A list of AchTransaction objects to process.
Required if processing Bulk Ach Debits
This list is not returned because the transactions will be processed async by the service. To retrieve the transactions use the bulkIdList parameter on the Transaction Search Endpoint.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors
Constraint(s): Only returned if status is ERROR


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.

SearchRoundTripNVP

Attribute Description
rtName
Alphanumeric75
Required
The name of a round trip name value pair to filter a search by.
Constraint(s): Each name must be unique
rtValueList
ListN/A
Required
A list of values of a round trip name value pair to filter a search by
If the list contains a value of -1, the results will also be filtered to include transactions that do not contain a RoundTripNVP with the specified name
If the list contains a value of 0, the results will also be filtered to include transactions that contain a RoundTripNVP whose value is null for the specified name. This functionality is designed for legacy signatures as the service now requires all RoundTripNVP objects to contain both a name and value.
Constraint(s): Each value must not exceed 75 characters

CustomReceiptLabels

Attribute Description
PAYMENT
Alphanumeric30
Default value: Payment.
FEE
Alphanumeric30
Default value: Fee.
TOTAL
Alphanumeric30
Default value: Total.
ACCOUNT_NUMBER
Alphanumeric30
Default value: Account Number.
MEMO
Alphanumeric30
Default value: Memo.
CHECK_NUMBER
Alphanumeric30
Default value: Check Number. Applies to AchTransactions.
BANK_ACCOUNT_TYPE
Alphanumeric30
Default value: Bank Account Type. Applies to AchTransactions.
DATE_SCHEDULED
Alphanumeric30
Default value: Date Scheduled.

CustomReceiptValues

Attribute Description
COMPANY_NAME
Alphanumeric50
A custom company name that will appear on receipts in place of the default name.

HierarchyData

Attribute Description
locationId
NumericString
Readonly
The internal id for a Location that the payment was processed for
customLocationId
AlphaNumeric
Readonly
A custom id for the Location
locationName
AlphaNumeric
Readonly
The name of the Location
groupId
NumericString
Readonly
The internal id for the Group that the Location is a member of (if applicable)
customGroupId
AlphaNumeric
Readonly
A custom id for the Group
groupName
AlphaNumeric
Readonly
The name of the Group



Patch CardTransaction

PATCH a CardTransaction object to update an existing POST_DATED or APPROVED CardTransaction for a specific arrivalId.

Patch CardTransaction Notes


Test URL:
https://transactiondemo.pdc4u.com/api/v1_0/cardtransactions/{arrivalId}
Live URL:
https://transaction.pdc4u.com/api/v1_0/cardtransactions/{arrivalId}

Response

The updated CardTransaction. Below are notes for any field(s) with special handling:

Attribute Description
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.

Any RoundTripNVP with a new rtName will add to the existing list. Any RoundTripNVP with an rtName that matches an existing RoundTripNVP will save the updated rtValue.
Constraint(s): Max of 10 RoundTripNVP objects per request.



Patch PayPalTransaction

PATCH a PayPalTransaction object to update an existing POST_DATED or APPROVED PayPalTransaction for a specific arrivalId.

Patch PayPalTransaction Notes


Test URL:
https://transactiondemo.pdc4u.com/api/v1_0/paypaltransactions/{arrivalId}
Live URL:
https://transaction.pdc4u.com/api/v1_0/paypaltransactions/{arrivalId}

Response

The updated PayPalTransaction. Below are notes for any field(s) with special handling:

Attribute Description
roundTripNVPS
ListN/A
List of RoundTripNVP objects. These are Name/Value pass-through values.

Any RoundTripNVP with a new rtName will add to the existing list. Any RoundTripNVP with an rtName that matches an existing RoundTripNVP will save the updated rtValue.
Constraint(s): Max of 10 RoundTripNVP objects per request.



Receipt

Request

POST a Receipt object to send a receipt


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/receipts
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/receipts

Response

A Receipt object will be returned which contains the generated HTML. The service will only email the receipt if at least one valid recipient is provided. If there were validation or processing errors, this object will have a list of RequestError objects.

Receipt

Attribute Description
transactionId
Numeric20
Required
The id of the Transaction to generate and/or send a receipt.
emailTo
ListN/A
A list of TO email addresses. Each address can be up to 75 characters.
emailCC
ListN/A
A list of CC email addresses. Each address can be up to 75 characters.
emailBCC
ListN/A
A list of BCC email addresses. Each address can be up to 75 characters.
customReceiptLabels
ObjectN/A
A Name/Value lists of CustomReceiptLabels to show on the Receipt. If a label is sent, it must be accompanied by a value.
customReceiptText
Alphanumeric5000
Custom text to show on the Receipt. If not provided, the service will use the company default. This value will not be stored or returned with any response.
customReceiptValues
ObjectN/A
A Name/Value list of CustomReceiptValues that specifies fields on a receipt to override.
receiptHtml
AlphanumericN/A
Generated HTML for displaying the receipt.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.



Reporting

-Single Transaction

GET a single AchTransaction or CardTransaction or CashTransaction for a specific transactionId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}

Response

AchTransaction or CardTransaction or CashTransaction object

GET a list of related AchTransaction or CardTransaction or CashTransaction objects for a specific transactionId. Information about the requested transaction will be returned in the response along with any related transactions.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}/relatedtransactions
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}/relatedtransactions

Response

List of related AchTransaction or CardTransaction or CashTransaction objects

-Search Transactions

POST TransactionSearchParameters to get a transactionList of AchTransaction and/or CardTransaction and/or CashTransaction and/or PayPalTransaction objects matching the TransactionSearchParameters provided


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/search
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/search

Response

TransactionSearch object with a transactionList of AchTransaction and/or CardTransaction and/or CashTransaction and/or PayPalTransaction objects matching the TransactionSearchParameters

TransactionSearchParameters

Attribute Description
searchOptions
ObjectN/A
Options to provide related to the search. For example, use this to send a timeout and activate background (async) searching. See TransactionSearchOptions
transactionIdList
List - Alphanumeric20
List of Transaction IDs.

NOTE: This option will ignore other search options.
arrivalIdList
List - Alphanumeric20
List of Arrival IDs.

NOTE: This option will ignore other search options. However, this is ignored if transactionIdList is also provided.
startDate
Date19
The starting date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
endDate
Date19
The ending date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
dateSearched
Alpha20
The date which startDate and endDate will apply.
Valid value(s):
  • CREATED - Search by Transaction created date.
  • SCHEDULED - Search by Transaction scheduled date.
  • PROCESSED - Search by Transaction processed date.
  • ACH_STATUS_UPDATED - Search by latest ACH status updated date. This option will only return AchTransactions
Default: CREATED
firstName
Alphanumeric45
The first name of the account holder.
lastName
Alphanumeric45
The last name of the account holder.
lastFour
Numeric4
The last four numbers of the account holder’s bank account number or credit card number.
NOTE: This option will only return AchTransactions or CardTransactions
achHistoricalSummaryType
Alpha12
Search for AchTransactions based on TransactionType and historical ACH Status.
Valid value(s):
  • EXCEPTION - AchTransaction with historical ACH Status of RETURNED within the date range
  • SENT_DEBIT - AchTransaction with TransactionType of DEBIT and historical ACH Status of SUBMITTED within the date range
  • SENT_CREDIT - AchTransaction with TransactionType of CREDIT and historical ACH Status of SUBMITTED within the date range
  • DEPOSITED - AchTransaction with historical ACH Status of FUNDED and achReturnCodeDetail contains CREDIT within the date range
  • DEDUCTED - AchTransaction with historical ACH Status of FUNDED or DEDUCTION and achReturnCodeDetail contains DEBIT within the date range
NOTE: This option will only return AchTransactions and will ignore the search options achProcessingStatusList, transactionTypeList and dateSearched
achProcessingStatusList
List - Alpha12
Search for AchTransactions that have a specific currentStatus.
Valid value(s):
  • WAITING - transaction will be included in next batch
  • POST_DATED - transaction will be included in a future batch. NOTE: When the dateSearched parameter is set to ACH_STATUS_UPDATED the startDate and endDate will also search the dateScheduled
  • 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 occurred while processing transaction
  • CORRECTION - transaction was automatically corrected during processing
NOTE: This option will only return AchTransactions
achBatchIdList
List - Numeric10
Search for AchTransactions that have a specific ACH Batch ID. Searching for a Batch ID of 0 (zero) will find AchTransactions without a Batch ID.

NOTE: This option will ignore a provided date range unless it contains only 0 (zero) and will only return AchTransactions.
achSettlementIdList
List - AlphaNumeric20
Search for AchTransactions that have a specific ACH Settlement ID.

NOTE: This option will ignore a provided date range and only return FUNDED or DEDUCTION AchTransactions.
paymentMethodList
List - Alpha5
List of Payment Methods.
Valid value(s):
  • CARD
  • CASH
  • CHECK
  • PAYPAL
Default: All PaymentMethods
transactionTypeList
List - Alpha8
A list of transaction types.
Valid value(s):
  • DEBIT
  • CREDIT
  • VOID
  • POSTAUTH
  • VERIFY
  • SALE
Default: All TransactionTypes
NOTE: If the search includes VOID, this will also search the AchTransaction currentStatus for VOID.
transactionStatusList
List - Alpha8
A list of transaction statuses.
Valid value(s):
  • APPROVED - transaction has been, or will be, sent to the vendor for processing
  • POST_DATED - temporary status while a CardTransaction has a future dateScheduled.
  • DECLINED - CardTransaction has been declined by the vendor
  • ERROR - transaction has failed, but the issues can be corrected and the transaction retried
Default: APPROVED
accountDirectiveList
List - Alphanumeric10
List of account directives used to process the payment
Format: XXX-X
accountNumberList
List - Alphanumeric45
List of account numbers.
memoList
List - Alphanumeric50
List of memos.
emailList
List - Alphanumeric75
List of email addresses.
bulkIdList
List - Numeric10
List of Bulk IDs to find transactions that were processed using a BULK Transaction Endpoint.
locationIdList
List - Numeric10
List of Location IDs. Searching for a Location ID of 0 (zero) will find Transactions without a Location ID.
scheduleIdList
List - Numeric10
List of Schedule IDs.
transactionOriginList
List - Alphanumeric3
List of Transaction Origins. This will typically be EXT and/or SCN.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
flowIdList
List - NumericN/A
List of Flow IDs. If 0 (zero) is included in this list, the results will include transactions without a FlowId present.
recordStart
Numeric20
The record count to start on.
Default: 0
recordCount
Numeric4
How many records to return.
Default: 2000
Maximum: 5000

NOTE: This recordCount limit is separate for APPROVED and DECLINED/ERROR Transactions. If the requested transactionStatusList contains a mix of APPROVED and DECLINED and/or ERROR, then the count of Transactions returned could be double the recordCount amount, up to an overall max of 10,000.
searchRoundTripNVPList
ListN/A
List of SearchRoundTripNVP objects.
locationId
Numeric10
Location ID.
DEPRECATED: use locationIdList
scheduleId
Numeric10
Schedule ID.
DEPRECATED: use scheduleIdList
accountNumber
Alphanumeric45
Account number.
DEPRECATED: use accountNumberList
transactionOrigin
Alphanumeric3
The origin of the transaction.
DEPRECATED: use transactionOriginList
employeeList
List - Alphanumeric75
List of employees.
DEPRECATED: Use searchRoundTripNVPList with a rtName of "employee"


–Transaction Search Options

Attribute Description
timeoutMs
Numeric900000
The amount of time (in milliseconds) to wait for the search results before the search finishes in the background (async). Please allow a couple additional seconds for general overhead of the request before/after the actual searching. For example, providing a timeoutMs of 13 seconds may actually take 15 seconds for the request to respond.

NOTE: If the search takes longer than the provided timeoutMs the HTTP Status will be 202 ACCEPTED
username
Alphanumeric75
The user that is performing the search. This is used as a reference and to help search for previously performed searches.

NOTE: Only used if a timeoutMs is provided.
description
Alphanumeric100
A description for the search for reference and to help search for previously performed searches.

NOTE: Only used if a timeoutMs is provided.
postBackUrl
URL500
A URL to POST when a search is COMPLETED.
Constraint(s): Must be a secure HTTPS URL

POSTed body will be json with at least these fields from the TransactionSearch object:
reportId, status, description, transactionListCount

The reportId can be used to GET the full transactionList from the GET TransactionSearch endpoint

NOTE: Only used if a timeoutMs is provided.
postBackAuthHeader
AlphaNumeric512
Conditional
An Authorization Header that will be provided when we POST to the provided postBackUrl.
Required if postBackUrl is provided.

NOTE: Only used if a timeoutMs is provided.
timezone
AlphaN/A
Return transaction dates in this timezone.
Valid value(s): Timezone name
Examples:
  • America/Denver
  • America/Chicago
  • America/Los_Angeles
  • America/New_York
exportFileType
AlphaN/A
Conditional
Option to have the search results exported to a file of the requested type. If provided, the exportColumnMap is required. To download the generated file use the Download Saved Report Endpoint.
Valid value(s):
  • CSV - File with Comma Separated Values.
  • PSV - File with Pipe Separated Values.
  • TSV - File with Tab Separated Values.
Required if exportColumnMap is provided.

NOTE: Only used if a timeoutMs is provided.
exportColumnMap
ObjectN/A
Conditional
Object used to specify which columns will be exported in the requested exportFileType. This is a set of key/value pairs where the key is the internal field name and the value will be used as the column header on the exported file.
To see a list of possible field names refer to the AchTransaction and/or CardTransaction and/or CashTransaction and/or PayPalTransaction object definitions or use the Export Field List Endpoint.
For fields that are lists (such as roundTripNVPS) or nested objects (such as hierarchyData) the column will be a JSON string. A single field may be extracted from a nested object by specifying it as {objectName}.{fieldName}, for example hierarchyData.locationName. For roundTripNVPS a specific rtName can be extracted when specified like roundTripNVPS.{rtName}, for example roundTripNVPS.employee.

Required if exportFileType is provided.
Both the Key and Value are required and the value must be 50 characters or fewer.

NOTE: Only used if a timeoutMs is provided.


POST TransactionBulkSearchParameters to get a list of TransactionBulk objects matching the TransactionBulkSearchParameters provided


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/transactions/bulk/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/transactions/bulk/search

Response

List of TransactionBulk objects that match the TransactionBulkSearchParameters

TransactionBulkSearchParameters

Attribute Description
dateStart
Date19
The starting date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
dateEnd
Date19
The ending date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
usernameList
List - Alphanumeric75
List of usernames provided with the TransactionBulk
descriptionList
List - Alphanumeric100
List of descriptions provided with the TransactionBulk
statusList
List - Alpha10
A list of transaction bulk statuses.
Valid Values: See TransactionBulk status
Default: All Statuses
recordStart
Numeric20
The record count to start on.
Default: 0
recordCount
Numeric4
How many records to return.
Default: 2000
Maximum: 5000


-Single Saved Report

GET a single TransactionSearch for a specific reportId. You may include an optional recordStart and/or a recordCount parameter from the SavedSearchReportParameters object as part of the url to further refine a saved report.
POST to regenerate a single TransactionSearch for a specific reportId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}

Response

TransactionSearch object

-Download Saved Report

GET a file for a specific reportId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}/download
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}/download

Response

A “text/plain” file download for a COMPLETED TransactionSearch which requested an exportFileType. If the TransactionSearch did not request an exportFileType or the status is not COMPLETED, an HTTP 404 will be provided. The file will be available for up to 72 hours before the TransactionSearch and file are PURGED.

-Search Saved Reports

POST SavedReportSearchParameters to get a list of TransactionSearch objects matching the SavedReportSearchParameters provided


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/transactions/savedreports/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/transactions/savedreports/search

Response

List of TransactionSearch objects that match the SavedReportSearchParameters

SavedReportSearchParameters

Attribute Description
reportIdList
List - Alphanumeric50
List of Report IDs to search for.

NOTE: This option will ignore other search options.
dateStart
Date19
The starting date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
dateEnd
Date19
The ending date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
usernameList
List - Alphanumeric75
List of usernames provided with the TransactionSearchOptions
descriptionList
List - Alphanumeric100
List of descriptions provided with the TransactionSearchOptions
statusList
List - Alpha10
A list of transaction search statuses.
Valid Values: See TransactionSearch status
Default: All Statuses
exportFileTypeList
List - AlphaN/A
List of file types provided with the TransactionSearchOptions
Valid value(s):
  • CSV - File with Comma Separated Values.
  • PSV - File with Pipe Separated Values.
  • TSV - File with Tab Separated Values.
recordStart
Numeric20
The record count to start on.
Default: 0
recordCount
Numeric4
How many records to return.
Default: 2000
Maximum: 5000


-TransactionSearch Object

Attribute Description
reportId
AlphanumericN/A
Readonly
The id of the TransactionSearch.

The reportId can be used to GET the full transactionList from the GET TransactionSearch endpoint

NOTE: Only returned if the TransactionSearchOptions timeoutMs was provided.
status
Alpha10
Readonly
The status of the TransactionSearch.
Valid value(s):
  • PROCESSING - The search is still running in the background (async).
  • COMPLETED - The search has finished successfully.
  • PURGED - A transactionList will only be saved for up to 72 hours. After 72 hours a COMPLETED status changes to PURGED and the transactionList is deleted.
    The reportId can also be used to POST to the TransactionSearch endpoint to regenerate the transactionList.
  • ERROR - The search failed. See requestErrorList for the reason(s).


NOTE: Only returned if the TransactionSearchOptions timeoutMs was provided.
description
Alphanumeric100
Readonly
The description of the TransactionSearch provided with the TransactionSearchOptions.

NOTE: Only returned if the TransactionSearchOptions timeoutMs and description was provided.
dateStart
Date19
Readonly
The date the TransactionSearch started.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)

NOTE: Only returned if the TransactionSearchOptions timeoutMs was provided.
dateEnd
Date19
Readonly
The date the TransactionSearch ended.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)

NOTE: Only returned if the TransactionSearchOptions timeoutMs was provided.
elapsedMs
NumericN/A
Readonly
The number of milliseconds the TransactionSearch took to finish.

NOTE: Only returned if the TransactionSearchOptions timeoutMs was provided.
exportFileType
AlphaN/A
Readonly
Requested File Type. To download the generated file use the Download Saved Report Endpoint.
Valid value(s):
  • CSV - File with Comma Separated Values.
  • PSV - File with Pipe Separated Values.
  • TSV - File with Tab Separated Values.
exportColumnMap
ObjectN/A
Readonly
Requested columns for the exportFileType
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors

NOTE: Only returned if status is ERROR
transactionListCount
NumericN/A
Readonly
The number of transactions contained in the transactionList.
transactionList
ListN/A
Readonly
A list of AchTransaction and/or CardTransaction and/or CashTransaction and/or PayPalTransaction objects matching the TransactionSearchParameters


-Export Field List

GET ExportFieldList for Field Names to be used with the exportColumnMap parameter of the TransactionSearchOptions


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/transactions/savedreports/fieldnamelist
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/transactions/savedreports/fieldnamelist

Response

ExportFieldList object

ExportFieldList

Attribute Description
fieldNameList
List - Alphanumeric
All possible field names for AchTransaction, CardTransaction, CashTransaction, and PayPalTransaction objects
transactionFieldNameList
List - Alphanumeric
Field names shared across AchTransaction, CardTransaction, CashTransaction, and PayPalTransaction objects
achTransactionFieldNameList
List - Alphanumeric
Specific field names for AchTransaction
cardTransactionFieldNameList
List - Alphanumeric
Specific field names for CardTransaction
cashTransactionFieldNameList
List - Alphanumeric
Specific field names for CashTransaction
paypalTransactionFieldNameList
List - Alphanumeric
Specific field names for PayPalTransaction


-Summary Totals

POST TransactionSummarySearchParameters for a TransactionSummarySearch object which contains Transaction Summary Totals.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/transactions/summary
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/transactions/summary

Response

TransactionSummarySearch object


TransactionSummarySearchParameters

Attribute Description
startDate
Date19
Required
The starting date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
endDate
Date19
The ending date and time for the report range.
Format: URL Encoded ISO-8601 (YYYY-MM-dd HH:mm:ss)
columnGroupList
List - Alpha
The fields to show and group the Transactions by. A field will show in the TransactionSummary object.
Valid value(s):
  • day - The dateCreated formatted as YYYY-MM-dd.
  • month - The dateCreated formatted as YYYY-MM.
  • year - The dateCreated formatted as YYYY.
  • paymentMethod
  • transactionType
  • cardType - Using this field will only return CardTransactions
  • cardBinType - Using this field will only return CardTransactions
  • locationId
  • accountDirective
  • transactionOrigin
  • roundTripNVPS.{rtName} - For example roundTripNVPS.employee. The columnGroupList can contain multiple roundTripNVPS.{rtName} fields.
paymentMethodList
List - Alpha
List of payment methods.
Valid value(s):
  • CARD
  • CASH
  • CHECK
  • PAYPAL
Default: All PaymentMethods
transactionTypeList
List - Alpha
A list of transaction types.
Valid value(s):
  • DEBIT
  • CREDIT
  • VOID
  • POSTAUTH
  • SALE
Default: All TransactionTypes
NOTE: If the search includes VOID, this will also search the AchTransaction currentStatus for VOID.
cardTypeList
List - Alpha
A list of card types.
Valid value(s):
  • AMERICAN_EXPRESS
  • DISCOVER
  • MASTERCARD
  • VISA
  • UNKNOWN
NOTE: Using this option will only return CardTransactions
cardBinTypeList
List - Alpha
A list of card types.
Valid value(s):
  • DEBIT
  • CREDIT
NOTE: Using this option will only return CardTransactions
accountDirectiveList
List - Alphanumeric10
List of account directives used to process the payment
Format: XXX-X
locationIdList
List - Numeric10
List of Location IDs. Searching for a Location ID of 0 (zero) will find Transactions without a Location ID.
transactionOriginList
List - Alphanumeric3
List of Transaction Origins. This will typically be EXT and/or SCN.
NOTE: There are other possible values. Please contact our Customer Success team to learn more.
searchRoundTripNVPList
List
List of SearchRoundTripNVP objects.


TransactionSummarySearch

Attribute Description
totalTransactionCount
Numeric
Readonly
Total Count for all Transactions matching the TransactionSummarySearchParameters
totalPaymentAmount
Numeric
Readonly
Total Payment Amount for all Transactions matching the TransactionSummarySearchParameters
totalFeeAmount
Numeric
Readonly
Total Fee Amount for all Transactions matching the TransactionSummarySearchParameters
transactionSummaryListSize
Numeric
Readonly
Size of the transactionSummaryList
transactionSummaryList
List - Object
Readonly
List of TransactionSummary group objects with fields shown based on the provided columnGroupList


TransactionSummary

Attribute Description
transactionCount
Numeric
Readonly
Total Count for Transactions in the group
paymentAmount
Numeric
Readonly
Total Payment Amount for Transactions in the group
feeAmount
Numeric
Readonly
Total Fee Amount for Transactions in the group
day
Alphanumeric
Readonly
The dateCreated formatted as YYYY-MM-dd for Transactions in the group.

Only shown if columnGroupList contains day.
month
Alphanumeric
Readonly
The dateCreated formatted as YYYY-MM for Transactions in the group.

Only shown if columnGroupList contains month.
year
Alphanumeric
Readonly
The dateCreated formatted as YYYY for Transactions in the group.

Only shown if columnGroupList contains year.
paymentMethod
Alphanumeric
Readonly
The paymentMethod for Transactions in the group.

Only shown if columnGroupList contains paymentMethod.
transactionType
Alphanumeric
Readonly
The transactionType for Transactions in the group.

Only shown if columnGroupList contains transactionType.
cardType
Alphanumeric
Readonly
The cardType for Transactions in the group.

Only shown if columnGroupList contains cardType.
locationId
Numeric
Readonly
The locationId for Transactions in the group.

Only shown if columnGroupList contains locationId.
accountDirective
Alphanumeric
Readonly
The accountDirective for Transactions in the group.

Only shown if columnGroupList contains accountDirective.
transactionOrigin
Alphanumeric
Readonly
The transactionOrigin for Transactions in the group.

Only shown if columnGroupList contains transactionOrigin.
roundTripNVPS.{rtName}
Alphanumeric
Readonly
The roundTripNVPS.{rtName} for Transactions in the group.

Only shown if columnGroupList contains roundTripNVPS.{rtName}.


POST BatchSearchParameters to get a list of recent AchBatch objects matching the BatchSearchParameters provided


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/achtransactions/recentbatches/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/achtransactions/recentbatches/search

Response

List of recent AchBatch objects that match your BatchSearchParameters

BatchSearchParameters

Attribute Description
recordStart
Numeric20
The starting index of ACH batch record results.
Default: 0
recordCount
Numeric4
The number of records to retrieve.
Default: 100. Max: 5000. Values that exceed this limit will be forced to 5000.


AchBatch Object

Attribute Description
batchId
NumericN/A
Readonly
The id of the ACH batch.
batchName
AlphanumericN/A
Readonly
The name of the ACH batch.
batchDate
DateN/A
Readonly
The the date the ACH batch was submitted to the bank.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionCount
NumericN/A
Readonly
The number of transactions contained within the ACH batch.


POST SettlementSearchParameters to get a list of recent AchSettlement objects matching the SettlementSearchParameters provided


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/achtransactions/recentsettlements/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/achtransactions/recentsettlements/search

Response

List of recent AchSettlement objects that match your SettlementSearchParameters

SettlementSearchParameters

Attribute Description
recordStart
Numeric20
The starting index of Settlement list record results.
Default: 0
recordCount
Numeric4
The number of records to retrieve.
Default: 100. Max: 5000. Values that exceed this limit will be forced to 5000.


AchSettlement Object

Attribute Description
settlementId
AlphaNumericN/A
Readonly
The id of the ACH Settlement.
settlementDate
DateN/A
Readonly
The the date of the ACH Settlement.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
transactionCount
NumericN/A
Readonly
The number of transactions contained within the ACH Settlement.

-Ach Report Summary

POST an AchReportSummary object to generate an Ach Report Summary


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/reportsummary
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/reportsummary

Response

An AchReportSummary object will be returned which contains the generated HTML. If there were validation or processing errors, this object will have a list of RequestError objects.


AchReportSummary

Attribute Description
startDate
Date19
Required
The starting date and time for the report range.
Format: ISO-8601 (yyyy-MM-dd HH:mm:ss)
endDate
Date19
Required
The ending date and time for the report range.
Format: ISO-8601 (yyyy-MM-dd HH:mm:ss)
reportHtml
AlphanumericN/A
Readonly
Generated HTML for displaying the report.


-RDFI Search: Receiving Depository Financial Institution

GET a list of RDFI - Receiving Depository Financial Institution objects by providing RdfiSearchParameters as a Query String.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?{search}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?{search}

Response

List of RDFI objects that match your RdfiSearchParameters

RdfiSearchParameters

Attribute Description
bankNameOrRoutingNumber
AlphaNumeric2
Required
The Bank Name or Routing Number to search for.
NOTE: This must be at least 2 characters.

RDFI Object

Attribute Description
bankRoutingNumber
NumericN/A
Readonly
The Routing Number of the Bank
bankName
AlphaNumericN/A
Readonly
The Name of the Bank



Zero Cost Fees

Obtain the expected fee amount for a given accountDirective configured for zero cost processing and paymentAmount

Card

POST an ExpectedFeeList object

Response will be an ExpectedFeeList in the same order as provided in the request

In case of an error, a RequestErrorList will be included with the response. the ApiFieldName will be expectedFeeListIndex with a value referencing the array index (Zero based) of ExpectedFeeList with the error.


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist

ExpectedFeeList

Attribute Description
expectedFeeList
List - Object
Required
List of ExpectedFee objects


ExpectedFee

Attribute Description
accountDirective
Alphanumeric10
Required
Account directive configured with zero cost processing
Format: XXX-X

NOTE: The accountDirective must be the same for each element of the list
paymentAmount
NumericString11
Required
The intended transaction payment amount
state
Alpha2
Conditional
The abbreviation of the state. Some payment gateway processors require this.
origin
Alpha3
The origin of the transaction. This should be set to EXT.

NOTE: There are other possible values. Please contact our Customer Success team to learn more.
relatedId
NumericString11
The transactionId for the original Transaction being CREDITed. This is used to look up any related Transactions for the expectedFeeAmount to correctly calculate when comparing the original SALE paymentAmount to any other partial CREDIT(s) and potential rounding issues.
zeroCostFeePercent
NumericString11
Readonly
The percentage fee configured on the accountDirective
expectedFeeAmount
NumericString11
Readonly
The expected fee based on the paymentAmount and zeroCostFeePercent
isZeroAllowed
Boolean5
Readonly
Boolean to indicate if a Transaction feeAmount could be zero. Otherwise, the Transaction feeAmount must be the expectedFeeAmount.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors
Constraint(s): Only returned if errors occur



Dialog Templates

Specific dialogs must be used for some transactions. The payment processor Pay N Seconds requires that a dialog be displayed and acknowledged by the user before a payment is created.

Contact us to request access to the Pay N Seconds dialog templates.



-Generate Dialog

POST TransactionDialog for a TransactionDialog object which contains the generated Dialog.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates
Live URL:
https://transaction.pdc4u.com/v1_0/transactions/dialogtemplates

Response

TransactionDialog object


TransactionDialog

Attribute Description
templateId
AlphaNumeric20
Required
See Dialog Templates for more information and a list of possible values.
templateVariableMap
ObjectN/A
Required
This object is a set of key/value pairs where the key is the template placeholder and the value will be used instead of the placeholder. Each placeholder is required.
See Dialog Templates for more information.
name
AlphaNumeric
Readonly
The name for the Template
description
AlphaNumeric
Readonly
The description for the Template
template
AlphaNumeric
Readonly
The Template with placeholder values
templateVariableList
List - Alpha
Readonly
A list of the required placeholder values in the the template
dialog
AlphaNumeric
Readonly
The generated Dialog with Template placeholders replaced with values from the templateVariableMap



-Search Dialog Templates

POST TransactionDialogTemplateSearchParameters for a TransactionDialogTemplateSearch object which contains a list of Dialogs or Templates.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates/search
Live URL:
https://transaction.pdc4u.com/v1_0/transactions/dialogtemplates/search

Response

TransactionDialogTemplateSearch object


TransactionDialogTemplateSearchParameters

Attribute Description
templateIdList
List - AlphaNumeric20
List of templateIds.
dialogIdList
List - Numeric20
List of dialogIds.
Note: Using this option will show the generated dialog rather than the template and templateVariableList.
arrivalIdList
List - Numeric20
List of arrivalIds.
Note: Using this option will show the generated dialog rather than the template and templateVariableList.
scheduleIdList
List - Numeric10
List of scheduleIds.
Note: Using this option will show the generated dialog rather than the template and templateVariableList.


TransactionDialogTemplateSearch

Attribute Description
dialogTemplateListSize
Numeric
Readonly
Size of the dialogTemplateList
dialogTemplateList
List - Object
Readonly
List of TransactionDialogTemplate objects based on the provided TransactionDialogTemplateSearchParameters


TransactionDialogTemplate

Attribute Description
templateId
Numeric
Readonly
The ID for the Template
name
AlphaNumeric
Readonly
The name for the Template
description
AlphaNumeric
Readonly
The description for the Template
template
AlphaNumeric
Readonly
The Template with placeholder values
templateVariableList
List - Alpha
Readonly
A list of the required placeholder values in the the template
dialogId
Numeric
Readonly
The ID for a generated Dialog
arrivalId
Numeric
Readonly
The Transaction arrivalId which used the generated Dialog
scheduleId
Numeric
Readonly
The Transaction scheduleId which used the generated Dialog
dialog
AlphaNumeric
Readonly
The generated Dialog with Template placeholders replaced with values from the templateVariableMap



Account Directives Migration

Migrate WAITING AchTransactions not yet in a batch, and all POST_DATED transactions, from one accountDirective to another. Returns a MigrationResponse

Send an HTTP PATCH with an AccountDirectiveMigration object in the body to:


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives

AccountDirectiveMigration

Attribute Description
oldAccountDirective
Alphanumeric String 10
Required
The accountDirective assigned to the targeted transactions.
newAccountDirective
Alphanumeric String 10
Required
The desired accountDirective to assign to the targeted transactions.

MigrationResponse

Attribute Description
response
String
A description of the processing status.
requestErrorList
List
A list of RequestError objects. Only returned on unsuccessful migrations.

PostBack Transaction Events

Basic information about a Transaction can be sent back to your system for some Transaction events. The information returned can be used to securely GET further details from Transaction Service. The PostBackBody will always come as JSON using an HTTPs POST.

If something goes wrong attempting to postback to your system, we will automatically retry on this schedule:

To be considered successful, we expect your server to return HTTP STATUS 200. Once that is received or after Attempt #5 we will no longer try to post the data.

To enable sending, please log into your app.pdcflow.com account and navigate to CONFIGURE > NOTIFICATIONS. This is where you can configure PostBacks for each Transaction event:

Event Description
CARD_FAILED A card payment has failed to process.
CARD_PROCESSED A card payment processed successfully.
CASH_FAILED A cash payment has failed to process.
CASH_PROCESSED A cash payment processed successfully.
CHECK_FAILED A check payment has failed to process.
CHECK_PROCESSED A check payment processed successfully.
PAYPAL_FAILED A PayPal payment has failed to process.
PAYPAL_PROCESSED A PayPal payment processed successfully.
SCHEDULE_CARD_FAILED A card payment on a schedule has failed to process.
SCHEDULE_CARD_PROCESSED A card payment on a schedule has processed successfully.
SCHEDULE_CHECK_FAILED A check payment on a schedule has failed to process.
SCHEDULE_CHECK_PROCESSED A check payment on a schedule has processed successfully.
CHECK_EXCEPTION_REPORT A daily email that includes summaries of the previous day’s ACH transactions.
NOTE: The PostBackBody for this event will be a list of PostBackBody Check Exception Report

PostBackBody Transaction

Attribute Description
arrivalId
Numeric20
The PDC Transaction Arrival ID, always present. Use this to pull further details on a payment from Transaction Service. Generally only needed if the payment request failed.
transactionId
Numeric20
The PDC Transaction ID. Only populated on a successful APPROVED transaction. Use this to pull further details on a payment, check the status, issue a CREDIT, etc. from Transaction Service.
paymentMethod
Alpha5
The method of payment, always present.
Valid value(s): CARD, CASH, CHECK, PAYPAL
transactionStatus
Alpha8
Result of the payment attempt, always present.
Valid value(s):
APPROVED - Transaction was processed successfully.
DECLINED - The transaction was sent to the vendor, but the vendor declined the transaction. These transactions will typically not be accepted regardless of how many times they are retried.
ERROR - An error has occurred and the transaction failed processing. These transactions can typically be resubmitted once the issues have been corrected.

PostBackBody Check Exception Report

Attribute Description
reportType
Alpha
ACH Report Type.
Valid value(s):
  • EXCEPTION - AchTransaction with historical ACH Status of RETURNED within the day
  • SENT_DEBIT - AchTransaction with TransactionType of DEBIT and historical ACH Status of SUBMITTED within the day
  • SENT_CREDIT - AchTransaction with TransactionType of CREDIT and historical ACH Status of SUBMITTED within the day
  • DEPOSITED - AchTransaction with historical ACH Status of FUNDED and achReturnCodeDetail contains CREDIT within the day
  • DEDUCTED - AchTransaction with historical ACH Status of FUNDED or DEDUCTION and achReturnCodeDetail contains DEBIT within the day
reportUrl
URL
URL to view the full report.



PayPal Vault

POST PayPalVault to create a new PayPalVault object.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/paypaltransactions/vault
Live URL:
https://transaction.pdc4u.com/v1_0/paypaltransactions/vault

Response

PayPalVault object


PayPalVault

Attribute Description
vaultId
AlphaNumeric20
Readonly
The auto-generated ID for the PayPal vault which is a reference to the payment details on PayPal. This value will be used to process a PayPalTransaction once the vault payment details have been provided.
dateCreated
Date19
Readonly
The date the vault was created. Ready to be authorized by the consumer.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
approveUrl
URL500
Readonly
The URL provided by PayPal which you will use to redirect the consumer to. On this page the consumer will provide, or select, their payment details on PayPal. If they successfully provide their payment details, we will redirect them to the provided successUrl, otherwise we will redirect to the provided cancelUrl.
accountDirective
Alphanumeric10
Required
The account directive associated with the vault.
Format: XXX-X
successUrl
URL500
Required
A URL which will be used to redirect the consumer when they successfully provide their payment details to PayPal.
Constraint(s): Must be a secure HTTPS URL
cancelUrl
URL500
Required
A URL which will be used to redirect the consumer if they cancel while attempting to provide their payment details to PayPal.
Constraint(s): Must be a secure HTTPS URL
locationId
NumericString10
The id for the Location that the vault is created for.
dateTokenized
Date19
Readonly
The date the PayPal payment details were tokenzied which means they are authorized and ready to be used.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
emailAddress
Alphanumeric100
Readonly
The email address associated with the PayPal account.
requestErrorList
ListN/A
Readonly
A list of RequestError objects containing errors.
Constraint(s): Only returned when errors occur.



-Get PayPal Vault

GET a single PayPalVault using a specific vaultId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}

Response

PayPalVault object



REST Fault

RequestErrorList

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

RequestError

Attribute Description
code
Alpha3
The code for the validation error.
errorCode
Numeric5
The error code of the validation error.
description
AlphanumericN/A
The description of the validation error.
retriable
Boolean5
Boolean to specify if the same request can be retried. This indicates a temporary failure.
apiFieldNameList
ListN/A
List of ApiFieldName with the specified RequestError

ApiFieldName

Attribute Description
apiFieldName
Alphanumeric
The name of the Api Field.
apiFieldValue
Alphanumeric
The value of the Api Field. When the Api Field is a list, this will show the specific list value which failed.



Sample Code

This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Transaction 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 '498'
Description = 'JWT validation token is expired'

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

Status '503':
Description = 'The requested service (Credit Card, ACH) is not activated.'

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.

-Sample ACH Debit

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits/';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '2222-1',
  'transactionType' => 'DEBIT',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'dateScheduled' => 'yyyy-mm-dd',
  'bankRoutingNumber' => '987654321',
  'bankAccountToken' => 'aSampleToken1234',
  'bankAccountType' => 'CHECKING',
  'checkNumber' => '1234',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '2222-1',
            'transactionType' => 'DEBIT',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'dateScheduled' => 'yyyy-mm-dd',
            'bankRoutingNumber' => '987654321',
            'bankAccountToken' => 'aSampleToken1234',
            'bankAccountType' => 'CHECKING',
            'checkNumber' => '1234',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits/';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '2222-1',
        'transactionType' => 'DEBIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'dateScheduled' => 'yyyy-mm-dd',
        'bankRoutingNumber' => '987654321',
        'bankAccountToken' => 'aSampleToken1234',
        'bankAccountType' => 'CHECKING',
        'checkNumber' => '1234',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits/'
    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 = transaction.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

This will process an ACH DEBIT transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/debits

-Sample ACH Credit

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '2222-1',
  'transactionType' => 'CREDIT',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'dateScheduled' => 'yyyy-mm-dd',
  'bankRoutingNumber' => '987654321',
  'bankAccountToken' => 'aSampleToken1234',
  'bankAccountType' => 'CHECKING',
  'checkNumber' => '1234',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '2222-1',
            'transactionType' => 'CREDIT',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'dateScheduled' => 'yyyy-mm-dd',
            'bankRoutingNumber' => '987654321',
            'bankAccountToken' => 'aSampleToken1234',
            'bankAccountType' => 'CHECKING',
            'checkNumber' => '1234',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '2222-1',
        'transactionType' => 'CREDIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'dateScheduled' => 'yyyy-mm-dd',
        'bankRoutingNumber' => '987654321',
        'bankAccountToken' => 'aSampleToken1234',
        'bankAccountType' => 'CHECKING',
        'checkNumber' => '1234',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/'
    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 = transaction.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

This will process an ACH CREDIT transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits

-Sample ACH Credit Existing

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '2222-1',
  'transactionType' => 'CREDIT',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'dateScheduled' => 'yyyy-mm-dd',
  'bankRoutingNumber' => '987654321',
  'bankAccountToken' => 'aSampleToken1234',
  'bankAccountType' => 'CHECKING',
  'checkNumber' => '1234',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '2222-1',
            'transactionType' => 'CREDIT',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'dateScheduled' => 'yyyy-mm-dd',
            'bankRoutingNumber' => '987654321',
            'bankAccountToken' => 'aSampleToken1234',
            'bankAccountType' => 'CHECKING',
            'checkNumber' => '1234',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '2222-1',
        'transactionType' => 'CREDIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'dateScheduled' => 'yyyy-mm-dd',
        'bankRoutingNumber' => '987654321',
        'bankAccountToken' => 'aSampleToken1234',
        'bankAccountType' => 'CHECKING',
        'checkNumber' => '1234',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}'
    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 = transaction.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

This will CREDIT an existing ACH transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/credits/{originalTransactionId}

-Sample ACH Void Existing

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '2222-1',
            'transactionType' => 'CREDIT',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'dateScheduled' => 'yyyy-mm-dd',
            'bankRoutingNumber' => '987654321',
            'bankAccountToken' => 'aSampleToken1234',
            'bankAccountType' => 'CHECKING',
            'checkNumber' => '1234',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '2222-1',
        'transactionType' => 'CREDIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'dateScheduled' => 'yyyy-mm-dd',
        'bankRoutingNumber' => '987654321',
        'bankAccountToken' => 'aSampleToken1234',
        'bankAccountType' => 'CHECKING',
        'checkNumber' => '1234',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}'
    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 = transaction.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

This will VOID an existing ACH transaction.

Send an HTTP PUT request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/voids/{originalTransactionId}

-Sample Card SALE

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '111-1',
  'transactionType' => 'SALE',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'cardToken' => 'ThisIsAToken22224',
  'expirationMonth' => '12',
  'expirationYear' => '2022',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '111-1',
            'transactionType' => 'SALE',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'cardToken' => 'ThisIsAToken2224',
            'expirationMonth' => '12',
            'expirationYear' => '2022',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '111-1',
        'transactionType' => 'SALE',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'cardToken' => 'ThisIsAToken2224',
        'expirationMonth' => '12',
        'expirationYear' => '2022',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/'
    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 = transaction.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

This will process a Card SALE transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales

-Sample Card CREDIT Existing

<?php
$originalTransactionId = 12;
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/' . $originalTransactionId;

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '111-1',
  'transactionType' => 'CREDIT',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '115.00',
  'cardToken' => 'ThisIsAToken22224',
  'expirationMonth' => '12',
  'expirationYear' => '2022'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $originalTranasctionId = '12';

    my $transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '111-1',
        'transactionType' => 'CREDIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'cardToken' => 'ThisIsAToken2224',
        'expirationMonth' => '12',
        'expirationYear' => '2022'
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/' . $originalTransactionId;

    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'

begin
    originalTransactionId = '12'
    transaction = {
      'sendReceiptToEmailAddress' => false,
      'accountDirective' => '111-1',
      'transactionType' => 'CREDIT',
      'firstName' => 'First',
      'lastName' => 'Last',
      'accountNumber' => '1234',
      'transactionOrigin' => 'EXT',
      'allowDuplicate' => 'true',
      'paymentAmount' => '215.00',
      'cardToken' => 'ThisIsAToken2224',
      'expirationMonth' => '12',
      'expirationYear' => '2022'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/' + originalTransactionId
    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 = transaction.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

Card transaction processing will use this method. This will process a card CREDIT transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/credits/{originalTransactionId}

-Sample Card VOID Existing

<?php
$originalTransactionId = 12;
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/' . $originalTransactionId;

$cardVoidTransaction = [
  'sendReceiptToEmailAddress' => false,
  'transactionType' => 'VOID',
  'transactionOrigin' => 'EXT',
  'memo' => 'I am writing a memo'
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($cardVoidTransaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $originalTranasctionId = '12';
    my $cardVoidTransaction = [
      'sendReceiptToEmailAddress' => false,
      'transactionOrigin' => 'EXT',
      'memo' => 'I am writing a memo',
    ];
    $data = JSON::XS->new->utf8->encode ($cardVoidTransaction);
        my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/' . $originalTransactionId;

        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'

begin
    originalTransactionId = '12'
    voidTransaction = {
        'sendReceiptToEmailAddress' => false,
        'transactionOrigin' => 'EXT',
        'memo' => 'Void this transaction'
        }
    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/' + originalTransactionId
    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'] = 0

    payload = cardVoidTransaction.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

Card transaction processing will use this method. This will VOID a card transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/voids/{originalTransactionId}

-Sample Cash SALE

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales/';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '111-1',
  'transactionType' => 'SALE',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '111-1',
            'transactionType' => 'SALE',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '111-1',
        'transactionType' => 'SALE',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales/'
    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 = transaction.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

This will process a Cash SALE transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cashtransactions/sales

-Sample Cash VOID Existing

<?php
$originalTransactionId = 12;
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/' . $originalTransactionId;

$cashVoidTransaction = [
  'sendReceiptToEmailAddress' => false,
  'transactionType' => 'VOID',
  'transactionOrigin' => 'EXT',
  'memo' => 'I am writing a memo'
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($cashVoidTransaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $originalTranasctionId = '12';
    my $cashVoidTransaction = [
      'sendReceiptToEmailAddress' => false,
      'transactionOrigin' => 'EXT',
      'memo' => 'I am writing a memo',
    ];
    $data = JSON::XS->new->utf8->encode ($cashVoidTransaction);
        my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/' . $originalTransactionId;

        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'

begin
    originalTransactionId = '12'
    voidTransaction = {
        'sendReceiptToEmailAddress' => false,
        'transactionOrigin' => 'EXT',
        'memo' => 'Void this transaction'
        }
    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/' + originalTransactionId
    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'] = 0

    payload = voidTransaction.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

This will VOID a cash transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cashtransactions/voids/{originalTransactionId}

-Sample PayPal SALE

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales/';

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '111-1',
  'transactionType' => 'SALE',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '215.00',
  'vaultId' => 'vaultId1234',
  'customReceiptLabels' => [
    'PAYMENT' => "Amount to pay"
  ],
  'customReceiptValues' => [
    'COMPANY_NAME' => 'My Custom Company Name'
  ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $transaction = {
            'sendReceiptToEmailAddress' => false,
            'accountDirective' => '111-1',
            'transactionType' => 'SALE',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'allowDuplicate' => 'true',
            'paymentAmount' => '215.00',
            'vaultId' => 'vaultId1234',
            'customReceiptLabels' => {
                'PAYMENT' => 'Amount to pay'
            },
            'customReceiptValues' => {
                'COMPANY_NAME' => 'My Custom Company Name'
            }
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales';

    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'

begin

    transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '111-1',
        'transactionType' => 'SALE',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00',
        'vaultId' => 'vaultId1234',
        'customReceiptLabels' => [
            'PAYMENT' => 'Amount to pay'
        ],
        'customReceiptValues' => {
            'COMPANY_NAME' => 'My Custom Company Name'
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales/'
    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 = transaction.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

This will process a PayPal SALE transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/sales

-Sample PayPal CREDIT Existing

<?php
$originalTransactionId = 12;
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/' . $originalTransactionId;

$transaction = [
  'sendReceiptToEmailAddress' => false,
  'accountDirective' => '111-1',
  'transactionType' => 'CREDIT',
  'firstName' => 'First',
  'lastName' => 'Last',
  'accountNumber' => '1234',
  'transactionOrigin' => 'EXT',
  'allowDuplicate' => 'true',
  'paymentAmount' => '115.00'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($transaction, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $originalTranasctionId = '12';

    my $transaction = {
        'sendReceiptToEmailAddress' => false,
        'accountDirective' => '111-1',
        'transactionType' => 'CREDIT',
        'firstName' => 'First',
        'lastName' => 'Last',
        'accountNumber' => '1234',
        'transactionOrigin' => 'EXT',
        'allowDuplicate' => 'true',
        'paymentAmount' => '215.00'
    }

    $data = JSON::XS->new->utf8->encode ($transaction);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/' . $originalTransactionId;

    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'

begin
    originalTransactionId = '12'
    transaction = {
      'sendReceiptToEmailAddress' => false,
      'accountDirective' => '111-1',
      'transactionType' => 'CREDIT',
      'firstName' => 'First',
      'lastName' => 'Last',
      'accountNumber' => '1234',
      'transactionOrigin' => 'EXT',
      'allowDuplicate' => 'true',
      'paymentAmount' => '215.00'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/' + originalTransactionId
    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 = transaction.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

This will process a PayPal CREDIT transaction.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/{originalTransactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/credits/{originalTransactionId}

-Sample Bulk Transaction

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk';

$data = [
    'description' => 'Bulk Transaction Description',
    'cardTransactionList' => [
        [
            'accountDirective' => '111-1',
            'transactionType' => 'SALE',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'paymentAmount' => '215.00',
            'cardToken' => 'ThisIsAToken22224',
            'expirationMonth' => '12',
            'expirationYear' => '2022',
            'sendReceiptToEmailAddress' => false
        ],
        [
            'accountDirective' => '111-1',
            'transactionType' => 'SALE',
            'firstName' => 'First',
            'lastName' => 'Last',
            'accountNumber' => '1234',
            'transactionOrigin' => 'EXT',
            'paymentAmount' => '215.00',
            'cardToken' => 'ThisIsAToken22224',
            'expirationMonth' => '12',
            'expirationYear' => '2022',
            'sendReceiptToEmailAddress' => false
        ]
    ]
]

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($request, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $data = {
        'description' => 'Bulk Transaction Description',
        'cardTransactionList' => {
            {
                'accountDirective' => '111-1',
                'transactionType' => 'SALE',
                'firstName' => 'First',
                'lastName' => 'Last',
                'accountNumber' => '1234',
                'transactionOrigin' => 'EXT',
                'paymentAmount' => '215.00',
                'cardToken' => 'ThisIsAToken22224',
                'expirationMonth' => '12',
                'expirationYear' => '2022',
                'sendReceiptToEmailAddress' => false
            },
            {
                'accountDirective' => '111-1',
                'transactionType' => 'SALE',
                'firstName' => 'First',
                'lastName' => 'Last',
                'accountNumber' => '1234',
                'transactionOrigin' => 'EXT',
                'paymentAmount' => '215.00',
                'cardToken' => 'ThisIsAToken22224',
                'expirationMonth' => '12',
                'expirationYear' => '2022',
                'sendReceiptToEmailAddress' => false
            }
        }
    }

    $data = JSON::XS->new->utf8->encode ($request);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk';

    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'

begin

    data = {
        'description' => 'Bulk Transaction Description',
        'cardTransactionList' => {
            {
                'accountDirective' => '111-1',
                'transactionType' => 'SALE',
                'firstName' => 'First',
                'lastName' => 'Last',
                'accountNumber' => '1234',
                'transactionOrigin' => 'EXT',
                'paymentAmount' => '215.00',
                'cardToken' => 'ThisIsAToken22224',
                'expirationMonth' => '12',
                'expirationYear' => '2022',
                'sendReceiptToEmailAddress' => false
            },
            {
                'accountDirective' => '111-1',
                'transactionType' => 'SALE',
                'firstName' => 'First',
                'lastName' => 'Last',
                'accountNumber' => '1234',
                'transactionOrigin' => 'EXT',
                'paymentAmount' => '215.00',
                'cardToken' => 'ThisIsAToken22224',
                'expirationMonth' => '12',
                'expirationYear' => '2022',
                'sendReceiptToEmailAddress' => false
            }
        }
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk'
    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

POST a TransactionBulk object to create and process a list of new Card Transactions

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/cardtransactions/sales/bulk

-Sample Patch CardTransaction

<?php
$url = 'https://transactiondemo.pdc4u.com/v1_0/cardtransactions/123456';

$patch = [
  'accountNumber' => '123456',
  'firstName' => 'UpdatedFirstName',
  'roundTripNVPS' => [
    [
      'rtName'=>'myName',
      'rtValue'=>'myValue'
    ]
   ]
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_PATCH, 1);
$data = json_encode($patch, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_PATCHFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);

PATCH a CardTransaction object to update an existing POST_DATED or APPROVED CardTransaction for a specific arrivalId.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/cardtransactions/{arrivalId}
Live URL:
https://transaction.pdc4u.com/v1_0/cardtransactions/{arrivalId}

-Sample Patch PayPalTransaction

<?php
$url = 'https://transactiondemo.pdc4u.com/v1_0/paypaltransactions/123456';

$patch = [
  'accountNumber' => '123456',
  'firstName' => 'UpdatedFirstName',
  'roundTripNVPS' => [
    [
      'rtName'=>'myName',
      'rtValue'=>'myValue'
    ]
   ]
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_PATCH, 1);
$data = json_encode($patch, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_PATCHFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);

PATCH a PayPalTransaction object to update an existing POST_DATED or APPROVED PayPalTransaction for a specific arrivalId.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/paypaltransactions/{arrivalId}
Live URL:
https://transaction.pdc4u.com/v1_0/paypaltransactions/{arrivalId}

-Sample Receipt Generation

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/receipts';

$receipt = [
  'transactionId' => 12,
  'emailTo' => ["toEmail1@example.com", "toEmail2@example.com"],
  'emailCC' => ["ccEmail1@example.com", "ccEmail2@example.com"],
  'emailBCC' => ["bccEmail1@example.com", "bccEmail2@example.com"],
  'customReceiptLabels' => [
    'PAYMENT' => 'Amount to pay'
  ],
  'customReceiptText' => "My Custom Text",
  'customReceiptValues' => [
    'COMPANY_NAME' => "My Custom Company Name"
  ]
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($receipt, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);

Send an HTTP POST request to:
Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/receipts
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/receipts

-Sample Ach Report Summary Request

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/reportsummary';

$request = [
  'startDate' => 'yyyy-MM-dd HH:mm:ss',
  'endDate' => 'yyyy-MM-dd HH:mm:ss'
];
$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($request, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);

Send an HTTP POST request to:
Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/reportsummary
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/reportsummary

-Sample Transaction Retrieval

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}';

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $uri = URI->new("https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionID}");

   my $req = HTTP::Request->new( 'GET', $uri );
   $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

   url = "https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionID}"

   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

GET a single AchTransaction or CardTransaction or CashTransaction for a specific transactionId

Send an HTTP GET request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}

<?php
$transactionId = "1323445";
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/' . $transactionId . '/relatedtransactions';

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $uri = URI->new("https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionid}/relatedtransactions");

   my $req = HTTP::Request->new( 'GET', $uri );
   $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

   url = "https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionid}/relatedtransactions"

   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

GET a list of related AchTransaction or CardTransaction objects for a specific transactionId

Send an HTTP GET request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}/relatedtransactions
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/{transactionId}/relatedtransactions

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/search';

$searchParameters = [
  'searchOptions' => [
    'timeoutMs' => 13000,
    'username' => 'Some Username',
    'description' => 'Some Description',
    'postBackUrl' => 'https://www.example.com'
    'postBackAuthHeader' => 'BEARER abc123...',
    'exportFileType' => 'CSV',
    'exportColumnMap' => [
        'transactionId' => 'Transaction ID',
        'paymentMethod' => 'Payment Method',
        'transactionStatus' => 'Status',
        'transactionAmount' => 'Total',
        'roundTripNVPS.employee' => 'Employee ID',
        'hierarchyData.locationName' => 'Location'
    ]
  ],
  'firstName' => 'First',
  'lastName' => 'Last',
  'lastFour' => '1111',
  'searchRoundTripNVPList' => [
    [
      'rtName' => 'employee',
      'rtValueList' => [
        "admin@demo.com",
        "billing@demo.com"
      ]
    ],
    [
      'rtName' => 'purchaseOrderNumber',
      'rtValueList' => [
        "123456",
        "-1",
        "0"
      ]
    ]
  ] 
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'searchOptions' => {
            'timeoutMs' => 13000,
            'username' => 'Some Username',
            'description' => 'Some Description',
            'postBackUrl' => 'https://www.example.com'
            'postBackAuthHeader' => 'BEARER abc123...',
            'exportFileType' => 'CSV',
            'exportColumnMap' => [
                'transactionId' => 'Transaction ID',
                'paymentMethod' => 'Payment Method',
                'transactionStatus' => 'Status',
                'transactionAmount' => 'Total',
                'roundTripNVPS.employee' => 'Employee ID',
                'hierarchyData.locationName' => 'Location'
            ]
        },
        'firstName' => 'First',
        'lastName' => 'Last',
        'lastFour' => '1111',
        'searchRoundTripNVPList' => [
            {
                'rtName' => 'employee',
                'rtValueList' => [
                    "admin@demo.com",
                    "billing@demo.com"
                ]
            },
            {
                'rtName' => 'purchaseOrderNumber',
                'rtValueList' => [
                    "123456",
                    "-1",
                    "0"
                ]
            }
        ] 
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/search';

    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'

begin

    searchParameters = {
        'searchOptions' => {
            'timeoutMs' => 13000,
            'username' => 'Some Username',
            'description' => 'Some Description',
            'postBackUrl' => 'https://www.example.com'
            'postBackAuthHeader' => 'BEARER abc123...',
            'exportFileType' => 'CSV',
            'exportColumnMap' => {
                'transactionId' => 'Transaction ID',
                'paymentMethod' => 'Payment Method',
                'transactionStatus' => 'Status',
                'transactionAmount' => 'Total',
                'roundTripNVPS.employee' => 'Employee ID',
                'hierarchyData.locationName' => 'Location'
            }
        },
        'firstName' => 'First',
        'lastName' => 'Last',
        'lastFour' => '1111',
        'searchRoundTripNVPList' => [
            {
                'rtName' => 'employee',
                'rtValueList' => [
                    "admin@demo.com",
                    "billing@demo.com"
                ]
            },
            {
                'rtName' => 'purchaseOrderNumber',
                'rtValueList' => [
                    "123456",
                    "-1",
                    "0"
                ]
            }
        ]
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/search'
    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 = searchParameters.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

POST TransactionSearchParameters to get a list of AchTransaction or CardTransaction objects matching the TransactionSearchParameters provided

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/search
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/search

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/bulk/search';

$searchParameters = [
  'dateStart' => 'YYYY-MM-dd HH:mm:ss',
  'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
  'statusList' => [
    'PROCESSING',
    'COMPLETED'
  ] 
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'dateStart' => 'YYYY-MM-dd HH:mm:ss',
        'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
        'statusList' => [
            'PROCESSING',
            'COMPLETED'
        ] 
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/bulk/search';

    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'

begin

    searchParameters = {
        'dateStart' => 'YYYY-MM-dd HH:mm:ss',
        'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
        'statusList' => [
            'PROCESSING',
            'COMPLETED'
        ]
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/bulk/search'
    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 = searchParameters.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

POST TransactionBulkSearchParameters get a list of TransactionBulk objects matching the TransactionBulkSearchParameters provided

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/bulk/search
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/bulk/search

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}';

$curl = curl_init();

curl_setopt($curl, CURLOPT_GET, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}';

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

    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'

begin

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}'
    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'

    c.headers = headers
    c.http_get()

    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

GET a single saved TransactionSearch for a specific reportId

Send an HTTP GET request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/{reportId}

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/search';

$searchParameters = [
  'dateStart' => 'YYYY-MM-dd HH:mm:ss',
  'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
  'statusList' => [
    'PROCESSING',
    'COMPLETED'
  ] 
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'dateStart' => 'YYYY-MM-dd HH:mm:ss',
        'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
        'statusList' => [
            'PROCESSING',
            'COMPLETED'
        ] 
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/search';

    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'

begin

    searchParameters = {
        'dateStart' => 'YYYY-MM-dd HH:mm:ss',
        'dateEnd' => 'YYYY-MM-dd HH:mm:ss',
        'statusList' => [
            'PROCESSING',
            'COMPLETED'
        ]
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/search'
    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 = searchParameters.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

POST SavedReportSearchParameters get a list of TransactionSearch objects matching the SavedReportSearchParameters provided

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/search
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/transactions/savedreports/search

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/summary';

$searchParameters = [
  'startDate' => 'YYYY-MM-dd HH:mm:ss',
  'columnGroupList' => [
    'month',
    'roundTripNVPS.employee'
  ],
  'searchRoundTripNVPList' => [
    [
      'rtName' => 'employee',
      'rtValueList' => [
        "admin@demo.com",
        "billing@demo.com"
      ]
    ]
  ] 
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'startDate' => 'YYYY-MM-dd HH:mm:ss',
        'columnGroupList' => [
            'month',
            'roundTripNVPS.employee'
        ],
        'searchRoundTripNVPList' => [
            {
                'rtName' => 'employee',
                'rtValueList' => [
                    "admin@demo.com",
                    "billing@demo.com"
                ]
            }
        ] 
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/summary';

    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'

begin

    searchParameters = {
        'startDate' => 'YYYY-MM-dd HH:mm:ss',
        'columnGroupList' => [
            'month',
            'roundTripNVPS.employee'
        ],
        'searchRoundTripNVPList' => [
            {
                'rtName' => 'employee',
                'rtValueList' => [
                    "admin@demo.com",
                    "billing@demo.com"
                ]
            }
        ]
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/transactions/summary'
    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 = searchParameters.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

POST TransactionSummarySearchParameters for a TransactionSummarySearch object which contains Transaction Summary Totals.

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/transactions/summary
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/transactions/summary

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentbatches/search';

$searchParameters = [
  'recordStart' => '0',
  'recordCount' => '100'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'recordStart' => '0',
        'recordCount' => '100'
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentbatches/search';

    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'

begin

    searchParameters = {
        'recordStart' => '0',
        'recordCount' => '100'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentbatches/search'
    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 = searchParameters.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

POST BatchSearchParameters to get a list of recent AchBatch objects matching the BatchSearchParameters provided

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/achtransactions/recentbatches/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/achtransactions/recentbatches/search

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentsettlements/search';

$searchParameters = [
  'recordStart' => '0',
  'recordCount' => '100'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($searchParameters, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $searchParameters = {
        'recordStart' => '0',
        'recordCount' => '100'
    }

    $data = JSON::XS->new->utf8->encode ($searchParameters);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentsettlements/search';

    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'

begin

    searchParameters = {
        'recordStart' => '0',
        'recordCount' => '100'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/recentsettlements/search'
    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 = searchParameters.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

POST SettlementSearchParameters to get a list of recent AchSettlement objects matching the SettlementSearchParameters provided

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/v1_0/achtransactions/recentsettlements/search
Live URL:
https://transaction.pdc4u.com/TransactionService/v1_0/achtransactions/recentsettlements/search

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?bankNameOrRoutingNumber=123';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  $authorization
]);
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') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $uri = URI->new("https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?bankNameOrRoutingNumber=123");

   my $req = HTTP::Request->new( 'GET', $uri );
   $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

   url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?bankNameOrRoutingNumber=123'

   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

GET a list of RDFI - Receiving Depository Financial Institution objects by providing RdfiSearchParameters as a Query String.

Send an HTTP GET request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?{search}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/achtransactions/rdfi?{search}

-Sample ExpectedFee Retrieval

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist';
$expectedFeeList = ['expectedFeeList': [
    [
      'accountDirective' => '123-1',
      'paymentAmount' => '100.00'
    ],
    [
      'accountDirective' => '123-1',
      'paymentAmount' => '130.00'
    ]
]];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($expectedFee, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $expectedFee);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($expectedFee),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $expectedFeeList = {'expectedFeeList': {
        {
            'accountDirective' => '123-1',
            'paymentAmount' => '100.00'
        },
        {
            'accountDirective' => '123-1',
            'paymentAmount' => '130.00'
        }
    }}

    $data = JSON::XS->new->utf8->encode ($expectedFee);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($expectedFee) );
    $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'

begin

    expectedFeeList = {'expectedFeeList': {
        {
            'accountDirective' => '123-1',
            'paymentAmount' => '100.00'
        },
        {
            'accountDirective' => '123-1',
            'paymentAmount' => '130.00'
        }
    }}

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist'
    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'] = expectedFee.to_json.length
    payload = expectedFee.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

POST an ExpectedFeeList object in the body

Send an HTTP POST request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/fees/card/zerocostlist

-Sample Generate Dialog

<?php
$url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates';
$request = [
    'templateId' => 'PNS_2',
    'templateVariableMap' => [
        'billingDescriptor' => 'My Company Name'
    ]
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($expectedFee, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($request),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $request = {
        'templateId' => 'PNS_2',
        'templateVariableMap' => [
            'billingDescriptor' => 'My Company Name'
        ]
    }

    $data = JSON::XS->new->utf8->encode ($request);
    my $url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($request) );
    $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'

begin

    request = {
        'templateId' => 'PNS_2',
        'templateVariableMap' => [
            'billingDescriptor' => 'My Company Name'
        ]
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates'
    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'] = request.to_json.length
    payload = request.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

POST TransactionDialog for a TransactionDialog object which contains the generated Dialog.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates
Live URL:
https://transaction.pdc4u.com/v1_0/transactions/dialogtemplates

-Sample Search Dialog Template

<?php
$url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates/search';
$request = [
    'templateIdList' => ['PNS_1'],
    'dialogIdList' => ['1']
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($expectedFee, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($request),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $request = {
        'templateIdList' => ['PNS_1'],
        'dialogIdList' => ['1']
    }

    $data = JSON::XS->new->utf8->encode ($request);
    my $url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates/search';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($request) );
    $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'

begin

    request = {
        'templateIdList' => ['PNS_1'],
        'dialogIdList' => ['1']
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates/search'
    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'] = request.to_json.length
    payload = request.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

POST TransactionDialogTemplateSearchParameters for a TransactionDialogTemplateSearch object which contains a list of Dialogs or Templates.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/transactions/dialogtemplates/search
Live URL:
https://transaction.pdc4u.com/v1_0/transactions/dialogtemplates/search

-Sample POST PayPalVault

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault';

$body = [
  'accountDirective' => '2222-1',
  'successUrl' => 'https://www.example.com/vault/success',
  'cancelUrl' => 'https://www.example.com/vault/cancel'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($body, 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_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $body = {
        'accountDirective' => '2222-1',
        'successUrl' => 'https://www.example.com/vault/success',
        'cancelUrl' => 'https://www.example.com/vault/cancel'
    }

    $data = JSON::XS->new->utf8->encode ($body);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault';

    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'

begin

    body = {
        'accountDirective' => '2222-1',
        'successUrl' => 'https://www.example.com/vault/success',
        'cancelUrl' => 'https://www.example.com/vault/cancel'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault'
    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'] = body.to_json.length
    payload = body.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

POST PayPalVault to create a new PayPalVault object.


Test URL:
https://transactiondemo.pdc4u.com/v1_0/paypaltransactions/vault
Live URL:
https://transaction.pdc4u.com/v1_0/paypaltransactions/vault

-Sample GET PayPalVault

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}';

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $uri = URI->new("https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}");

   my $req = HTTP::Request->new( 'GET', $uri );
   $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

   url = "https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}"

   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

GET a single PayPalVault using a specific vaultId


Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/paypaltransactions/vault/{vaultId}

-Sample AccountDirective Migration

<?php
$url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/migration/accountdirectives';

$accountDirectiveMigration = [
  'oldAccountDirective' => '123-1',
  'newAccountDirective' => '123-2'
];

$curl = curl_init();

curl_setopt($curl, CURLOPT_PATCH, 1);
$data = json_encode($accountDirectiveMigration, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_PATCHFIELDS, $accountDirectiveMigration);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($accountDirectiveMigration),
  ]);
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);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

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

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
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 $accountDirectiveMigration = {
        'oldAccountDirective' => '123-1',
        'newAccountDirective' => '123-2'
    }

    $data = JSON::XS->new->utf8->encode ($accountDirectiveMigration);
    my $url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives';

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

    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'

begin

    accountDirectiveMigration = {
        'oldAccountDirective' => '123-1',
        'newAccountDirective' => '123-2'
    }

    c = Curl::Easy.new
    c.url = 'https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives'
    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'] = accountDirectiveMigration.to_json.length
    payload = accountDirectiveMigration.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

PATCH an AccountDirectiveMigration to migrate transactions from one account directive to another

Send an HTTP PATCH request to:

Test URL:
https://transactiondemo.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives
Live URL:
https://transaction.pdc4u.com/TransactionService/api/v1_0/migrations/accountdirectives