POST | /collectionattempts/{id}/payments | Creates a payment. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | path | Guid | Yes | Colletion attempt id to apply the payment to |
PaymentToken | body | string | Yes | Token for payment info provided by the payment processing gateway |
PaymentAmount | body | decimal | Yes | The Payment Amount without Convenience fees |
ConvenienceFee | body | decimal | No | The convenience fee |
Payor | body | object | Yes | Payor information |
CardType | body | string | Yes | The type of card being used: visa, master, american_express, discover, jcb, diners_club, dankort |
LastFour | body | string | Yes | The last 4 digits of the card being used |
Fingerprint | body | string | Yes | The card fingerprint from spreedly |
PaymentMethod | body | string | No | The Payment Method: CC, DC, EC, CP, OTHER DEFAULTS ....to CC when not defined |
IsFeePayment | body | bool | Yes | are we paying fees?, if so, we will use the fee gateway to process those fees |
GatewayName | body | string | No | The Payment gateway to charge |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
FirstName | body | string | Yes | First name of the person making the payment |
LastName | body | string | Yes | Last name of the person making the payment |
Address | body | string | No | Address of the person making the payment -Default Values will be inserted if not supplied to meet data inetgrity rules |
Address2 | body | string | No | Address2 of the person making the payment |
City | body | string | No | City of the person making the payment -Default Values will be inserted if not supplied to meet data inetgrity rules |
State | body | string | No | State of the person making the payment-Default Values will be inserted if not supplied to meet data inetgrity rules |
Country | body | string | No | Country Code of the person making the payment--Default Values will be inserted if not supplied to meet data inetgrity rules |
Zip | body | string | No | Zip Code of the person making the payment |
body | string | No | Email of the person making the payment--Default Values will be inserted if not supplied to meet data inetgrity rules | |
Phone | body | string | No | Phone of the person making the payment |
Note | body | string | No | Note taken regarding the person making the payment |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Result | form | PaymentProcessingResult | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Errors | form | List<string> | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PaymentId | form | Guid | No | Guid/unique identifier for the payment |
OriginatingAttemptId | form | Guid | No | Guid/unique identifier reference to the original attempt |
AmountApplied | form | decimal | No | |
PaymentProcessingOutcome | form | PaymentProcessingOutcome | No | |
IsSuccessful | form | bool | No | |
TsysMappedGatewayResponse | form | string | No |
Name | Value |
---|---|
None | 0 |
Done | 1 |
VoidSecurityFee | 4 |
CashPaymentResultsInZeroBalance | 8 |
LockDownPage | 16 |
CardTokenNotSaved | 32 |
PaymentDeclined | 64 |
FailedAvsCheck | 128 |
FailedCvv2Check | 256 |
PaymentFailedToSave | 512 |
OverPayment | 1024 |
OverRefund | 2048 |
RemainderLessThanGatewayMinimum | 4096 |
PaymentUnderGatewayMinimum | 8192 |
PaymentOverGatewayMaximum | 16384 |
RefundWasSuccessful | 32768 |
NoGatewayResponse | 65536 |
NoGatewayRequest | 131072 |
OperationNotSupportedByGateway | 262144 |
FailedAutoPaymentAllocation | 524288 |
FailedAutoRefundAllocation | 1048576 |
ECashPaymentBarCodeOutstanding | 2097152 |
CardDeclinedRecently | 4194304 |
CardUsedTooRecently | 8388608 |
MissingCardFingerprint | 16777216 |
MaximumCardsReached | 33554432 |
MaximumPaymentAttempts | 67108864 |
FraudCheckFailure | 134217728 |
ChargebackCard | 268435456 |
PhoneNumberAssociatedWithChargebacks | 536870912 |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /collectionattempts/{id}/payments HTTP/1.1
Host: api.paylock.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":"00000000000000000000000000000000","paymentToken":"String","paymentAmount":0,"convenienceFee":0,"payor":{"firstName":"String","lastName":"String","address":"String","address2":"String","city":"String","state":"String","country":"String","zip":"String","email":"String","phone":"String","note":"String"},"cardType":"String","lastFour":"String","fingerprint":"String","paymentMethod":"String","isFeePayment":false,"gatewayName":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"result":{"paymentId":"00000000000000000000000000000000","originatingAttemptId":"00000000000000000000000000000000","amountApplied":0,"paymentProcessingOutcome":0,"isSuccessful":false,"tsysMappedGatewayResponse":"String"},"errors":["String"]}