Process Transactions
- Process an ACH (Electronic Check) transaction.
- Process a keyed credit card transaction.
- Process a tokenized transaction.
- You can also re-bill via a Schedule ID from a previously created recurring schedule.
- You can re-bill via a previous Transaction ID.
- If you have uploaded ACH/Card data it can be re-billed via a Vault ID.
Parameters
ACH
| required | name | format | description |
|---|---|---|---|
| * | achRoutingNumber | Valid Check Routing Number | ACH Routing Number |
| * | achAccountNumber | Valid Check Account Number, Max Length 17 | ACH Account Number |
| * | achAccountType | SAVINGS | CHECKING | SAVINGS - Savings Account CHECKING - Checking Account |
| * | achType | PPD | CCD |
PPD - Consumer Account
CCD - Business Account
|
ACH WEB
Create an ACH WEB transaction using a plaidAccessToken.
| required | name | format | description |
|---|---|---|---|
| * | plaidAccessToken | string |
plaidAccessToken obtained from POST /plaid/item/public_token/exchange. |
Keyed Card
Please consider the PCI Implications of transmitting full card number data.
| required | name | format | description |
|---|---|---|---|
| * | cardNumber | Valid Credit Card Number. |
Credit/Debit Card Number NOTE: To reduce the PCI Scope of your application we recommend avoiding any contact with the full card number. Java Script Tokenization is the recommended approach. |
| * | cardExpMonth | 1-12, Ex: 8 | Expiration Month. |
| * | cardExpYear | 4 Digit Format. Ex: 2015 | Expiration Year. |
| cardCvv | Valid CVV. Max Length 4 | Card Verification Value. |
Token
| required | name | format | description |
|---|---|---|---|
| * | tokenId | Valid Token ID | A Token ID created using Tokenization SDK. |
Re-Bill by Schedule ID
| required | name | format | description |
|---|---|---|---|
| * | scheduleId | Valid Schedule ID |
A Schedule ID from a previously created recurring schedule. NOTE:
|
Re-Bill by Transaction ID
| required | name | format | description |
|---|---|---|---|
| * | transactionId | Valid Transaction ID |
A Transaction ID from a previously charged transaction.
NOTES:
|
Re-Bill by Vault ID
| required | name | format | description |
|---|---|---|---|
| * | vaultId | Valid Vault ID | A Vault ID from a previously stored account. |
| achType | PPD | CCD | Required for ACH Vaults. ACH Type for this transaction. This is optional. If not present, the default ACH Type for the Vault will be used. PPD - Consumer Account CCD - Business Account |
Credit Card Security
| required | name | format | description |
|---|---|---|---|
| avs | ADDRESS ZIP ADDRESS_AND_ZIP ADDRESS_OR_ZIP BYPASS OFF |
This will check the billingAddress and billingZip. OFF - Do not run AVS
NOTES:
|
|
| cvv | ON | OFF |
ON - CVV check on.
NOTES:
|
|
| cardCvv | String | The CVV code from the card. |
Transaction Fields
All amount* fields have a max value of 1,000,000. Amounts higher than 1,000,000 will cause a validation error.
| required | name | format | description |
|---|---|---|---|
| action | CHARGE | REFUND | VERIFY |
Action to perform. Charge the account, refund the account, or verify the account. Verifying accounts are only supported for cards and will run a zero dollar authorization to verify the card number.
NOTE: In ACH terms charge is a debit and refund is a credit, but we use the terms charge and refunds for both transaction types. If not present, the default value of CHARGE will be used. |
|
| status | HOLD | CAPTURE | VOID |
Transaction Status affects whether or not the transaction will be settled. More Details NOTE: If not present, the default value of CAPTURE will be used. |
|
| * | terminalId | Valid Terminal Id |
The terminal that will process and settle the transaction.
Always specify a terminalId to ensure consistent behavior. If omitted, the default terminal assigned to the API Credential will be used (if set and on). If no default is configured or the terminal is off, the request will fail.
For ACH WEB transactions using a plaidAccessToken, this must be a valid ACH terminal. |
| amountBase | Money, Format: X.XX Ex: 1000.00 |
Base amount to charge. Required for ACH, Credit Card, and Re-Bill Vault ID. NOTE: Not required for action=VERIFY. |
|
| amountShipping | Money | Tracks separate shipping amounts. | |
| amountTip | Money | Adds a tip to the transaction. | |
| amountReject | Money | Used when re-billing a rejected ACH transaction with a reject fee. | |
| amountSurcharge | Money |
Learn about PayJunction surcharge Disabled when value is $0.00 or empty. |
|
| amountSurchargeTax | Money | Tax applied to the surcharge. | |
| amountTax | Money | Tax amount for the transaction. |
Billing Contact
| required | name | format | description |
|---|---|---|---|
| billingIdentifier | Max Length 64 | Billing customer id. If you have your own customer ID you want to associate with the transaction. | |
* |
billingFirstName | Max Length 16 | Billing first name. Required for ACH PPD and ACH WEB transactions. |
| billingMiddleName | Max Length 32 | Billing middle name. | |
| * | billingLastName | Max Length 32 | Billing last name. Required for ACH PPD and ACH WEB transactions. |
| * | billingCompanyName | Max Length 64 | Billing company name. Required for ACH CCD transactions. |
| billingJobTitle | Max Length 32 | Billing job title. Ex: President | |
| billingPhone | Max Length 24 | Billing phone number. | |
| billingPhone2 | Max Length 24 | Billing alternate phone number. | |
| billingAddress | Max Length 128 |
Billing street address. Test values for Labs environment here. |
|
| billingCity | Max Length 32 | Billing city. | |
| billingState | Max Length 32 | Billing state. | |
| billingZip | Max Length 12 |
Billing zip. Test values for Labs environment here. |
|
| billingCountry | Max Length 32 | Billing country. | |
| billingEmail | Max Length 128 | Billing email. | |
| billingWebsite | Max Length 128 | Billing website. |
Shipping Contact
| required | name | format | description |
|---|---|---|---|
| shippingIdentifier | Max Length 64 | Shipping customer id. If you have your own customer ID you want to associate with the transaction. | |
| shippingFirstName | Max Length 16 | Shipping first name. | |
| shippingMiddleName | Max Length 32 | Shipping middle name. | |
| shippingLastName | Max Length 32 | Shipping last name. | |
| shippingCompanyName | Max Length 64 | Shipping company name. | |
| shippingJobTitle | Max Length 32 | Shipping job title. Ex: President | |
| shippingPhone | Max Length 24 | Shipping phone number | |
| shippingPhone2 | Max Length 24 | Shipping alternate phone number. | |
| shippingAddress | Max Length 128 | Shipping street address | |
| shippingCity | Max Length 32 | Shipping city. | |
| shippingState | Max Length 32 | Shipping state | |
| shippingZip | Max Length 12 | Shipping zip. | |
| shippingCountry | Max Length 32 | Shipping country. | |
| shippingEmail | Max Length 128 | Shipping email address. | |
| shippingWebsite | Max Length 128 | Shipping website. |
Other Fields
| required | name | format | description |
|---|---|---|---|
| invoiceNumber | Max Length 32 |
Invoice number. If you would like to include an invoice number on the transaction for accounting. NOTE: To bypass Duplicate Transaction Blocking, send a different invoice number for each "duplicate transaction". A Duplicate Transaction is a transaction that includes the same card number and same amount, processed within 10 minutes of each other. |
|
metadata[externalId] |
Text, Valid ASCII Max Length 36 |
Optional identifier that can be used to link a transaction to the corresponding record in your system for reconciliation and tracking. |
|
metadata[externalData] |
Text, Valid ASCII Max Length 36 |
Optional status/value field for storing additional system context, like reconciliation state, on a transaction. | |
| note | Max Length 2048 | A note field for you to annotate the transaction. | |
| purchaseOrderNumber | Max Length 32 | Purchase order number. If you would like to mark this transaction with your own PO for accounting. |
Example Request in the "Labs Demo" account:
The example below is only sending the minimum mandatory fields.
Please note you will need to replace the API User/PW and the Application Key with your specific values.
curl -X POST -u "YOUR_USER:YOUR_PASSWORD" -H "Accept: application/json" -H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
-d "cardNumber=4444333322221111" \
-d "cardExpMonth=01" \
-d "cardExpYear=2029" \
-d "amountBase=1901.00" \
-d "metadata[externalId]=e1ad3185-6f93-458c-9df7-3d88edb4953e" \
-d "metadata[externalData]=UNRECONCILED" \
"https://api.payjunctionlabs.com/transactions"Example Response
API version 2023-05-16 or above required to receive the surcharge object and fields in transaction response details. See how to use API versions here.
Click here for more information regarding surcharge.
{
"transactionId": 3601,
"uri": "https://api.payjunction.com/transactions/3601",
"terminalId" : 10000,
"action" : "CHARGE",
"amountBase" : "1.11",
"amountTax" : "3.00",
"amountShipping" : "1.00",
"amountTip" : "2.00",
"amountSurcharge" : "0.21",
"amountTotal" : "7.32",
"surcharge" : {
"percentage" : 3.00,
"status" : "APPLIED"
},
"invoiceNumber": "Invoice 5",
"method": "KEYED",
"purchaseOrderNumber": "Custom PO",
"service": "API",
"signatureStatus": "SIGNED",
"status": "CAPTURE",
"created": "2013-11-18T22:15:32Z",
"lastModified": "2013-11-18T22:15:32Z",
"response": {
"approved": true,
"code": "00",
"message": "Approved",
"processor": {
"authorized": true,
"approvalCode": "PJ20AP",
"avs": {
"status": "REQUESTED",
"requested": "BYPASS",
"match": {
"ZIP": true,
"ADDRESS": true
}
},
"cvv": {
"status": "NOT_REQUESTED"
}
}
},
"settlement": {
"settled": false
},
"vault": {
"type": "CARD",
"accountType": "VISA",
"lastFour": "1111"
},
"metadata" : {
"externalId" : "e1ad3185-6f93-458c-9df7-3d88edb4953e",
"externalData" : "UNRECONCILED"
},
"billing": {
"firstName": "John",
"middleName": "J",
"lastName": "Doe",
"companyName": "PayJunction",
"email": "jdoe@payjunction.com",
"phone": "8006010230 x2",
"phone2": "8006010230 x2",
"jobTitle": "Support",
"identifier": "Billing Customer id",
"website": "http://www.payjunction.com",
"address": {
"address": "1903 State St",
"city": "Santa Barbara",
"state": "CA",
"country": "USA",
"zip": "93101"
}
},
"shipping": {
"firstName": "Jane",
"middleName": "J",
"lastName": "Doe",
"companyName": "PayJunction",
"email": "janedoe@payjunction.com",
"phone": "8006010230 x2",
"phone2": "8006010230 x2",
"jobTitle": "Support",
"identifier": "Shipping Customer Id",
"website": "https://www.payjunction.com",
"address": {
"address": "1903 State St",
"city": "Santa Barbara",
"state": "CA",
"country": "USA",
"zip": "93101"
}
}
}
Example Request for ACH WEB
curl -X POST https://api.payjunction.com/transactions \
-u "YOUR_USER:YOUR_PASSWORD" \
-H "Accept: application/json" \
-H "X-PJ-Application-Key: YOUR_PRODUCTION_APP_KEY" \
-d "plaidAccessToken=access-production-1f5c0cbd-1fa8-490f-ab61-1d4e57fb4ec1" \
-d "billingFirstName=first" \
-d "billingLastName=last" \
-d "amountBase=1.00"Example Response for ACH WEB
{
"transactionId" : 1775,
"uri" : "https://api.payjunction.com/transactions/1775",
"terminalId" : 11657,
"action" : "CHARGE",
"achType" : "WEB",
"amountBase" : "1.00",
"amountTotal" : "1.00",
"method" : "PLAID",
"service" : "API",
"status" : "CAPTURE",
"created" : "2022-09-08T21:28:54Z",
"lastModified" : "2022-09-08T21:28:53Z",
"response" : {
"approved" : true,
"code" : "00",
"message" : "Approved"
},
"settlement" : {
"settled" : false
},
"vault" : {
"type" : "ACH",
"accountType" : "CHECKING",
"lastFour" : "6789",
"achRoutingNumber" : "121000358"
},
"billing" : {
"firstName" : "first",
"lastName" : "last"
}
}