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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<CreatePayment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BootView.WebApi.ServiceModel">
<CardType>String</CardType>
<ConvenienceFee>0</ConvenienceFee>
<Fingerprint>String</Fingerprint>
<GatewayName>String</GatewayName>
<Id>00000000-0000-0000-0000-000000000000</Id>
<IsFeePayment>false</IsFeePayment>
<LastFour>String</LastFour>
<PaymentAmount>0</PaymentAmount>
<PaymentMethod>String</PaymentMethod>
<PaymentToken>String</PaymentToken>
<Payor>
<Address>String</Address>
<Address2>String</Address2>
<City>String</City>
<Country>String</Country>
<Email>String</Email>
<FirstName>String</FirstName>
<LastName>String</LastName>
<Note>String</Note>
<Phone>String</Phone>
<State>String</State>
<Zip>String</Zip>
</Payor>
</CreatePayment>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreatePaymentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BootView.WebApi.ServiceModel"> <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>String</d2p1:string> </Errors> <Result> <AmountApplied>0</AmountApplied> <IsSuccessful>false</IsSuccessful> <OriginatingAttemptId>00000000-0000-0000-0000-000000000000</OriginatingAttemptId> <PaymentId>00000000-0000-0000-0000-000000000000</PaymentId> <PaymentProcessingOutcome>None</PaymentProcessingOutcome> <TsysMappedGatewayResponse>String</TsysMappedGatewayResponse> </Result> </CreatePaymentResult>