ExternalServicesmanual

The external services manual cover methods used to retrieve Invoice PDFs as well as invoice and customer information.

InvoiceService methods

The complete Wsdl specification for this service can be found at:

https://connect.payex.com/PxR/InvoiceService.svc?wsdl

 (Username/password security model)

GetInvoicePdfByBillNo

Gets a specific invoice document in the format of PDF

Class diagram

1-class-diagram-external.png

Request parameters

GetInvoiceByBillNoRequest

FieldDatatypeRequiredDescription
BillNoString(15)Yes 
TrackingUserEmailString(50)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoicePDFResponse

GetInvoicePdfByExternalInvoiceId

Gets a specific invoice document in the format of PDF

Class diagram

2-class-diagram-external.png

Request parameters

GetInvoicePdfByExternalInvoiceIdRequest

FieldDatatypeRequiredDescription
ExternalInvoiceIdString(15)Yes 
TrackingUserEmailString(50)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoicePDFResponse

GetInvoiceInformationByBillNo

Gets information about a specific invoice

Class diagram

3-class-diagram-external.png

Request parameters

GetInvoiceInformationByBillNoRequest

FieldDatatypeRequiredDescription
BillNoString(15)Yes 
TrackingUserEmailString(50)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoiceInformationResponse

GetInvoiceInformationByExternalInvoiceId

Gets information about a specific invoice

Class diagram

4-class-diagram-external.png

Request parameters

GetInvoiceByExternalInvoiceIdRequest

FieldDatatypeRequiredDescription
ExternalInvoiceIdString (15)Yes 
TrackingUserEmailString (50)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoiceInformationResponse

GetOpenInvoiceInformationByCustomerNo

Gets open invoices

Class diagram

5-class-diagram-external.png

Request parameters

GetOpenInvoiceInformationByCustomerNoRequest

FieldDatatypeRequiredDescription
CustomerNoString(15)YesCustomerNo is your unique identifier of the customer.
TrackingUserEMailStringNoUser info for trackability.
TraceIdStringYes 

Response parameters

GetOpenInvoiceInformationByCustomerNoResponse

FieldDatatypeDescription
CompanyNoString 
CustomerNoStringCustomerNo is you Unique identifier of the customer.
CustomerNameString 
InvoiceListList <OpenInvoice> 
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Classes

OpenInvoice

FieldDatatypeDescription
BillNoString 
BillStatusCodeIntSee the bill status code table for available status codes.
ExternalInvoiceIdStringAdditional unique invoice identifier.
BillDateDateTime 
DueDateDateTime(Optional)Empty if BillTypeCode is Invoice.
BillTypeCodeByteSee the bill type code table for available bill type codes.
OriginalAmountDecimal 
CurrentDebtDecimal 
CurrencyCodeString 
CurrentClaimLevelCodeIntSee the claim level code table for available claim level codes.
PaymentBankAccountPaymentBankAccount 
PaymentTypeString 
ActiveRespiteActiveRespite 
ActivePaymentOrderActivePaymentOrder 

GetClosedInvoiceInformationByCustomerNo

Gets closed invoices (status “Closed” only)

Class diagram

6-class-diagram-external.png

Request parameters

GetClosedInvoiceInformationByCustomerNoRequest

FieldDatatypeRequiredDescription
CustomerNoString(15)YesCustomerNo is your unique identifier for the customer.
TrackingUserEMailStringNoUser info for trackability.
TraceIdStringYes 

Response parameters

GetClosedInvoiceInformationByCustomerNoResponse

FieldDatatypeDescription
CompanyNoStringYoyr accounts receivable number at PayEx.
CustomerNoStringCustomerNo is you Unique identifier of the customer.
CustomerNameString 
InvoiceListList <ClosedInvoice> 
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Classes

ClosedInvoice

FieldDatatypeDescription
BillNoString 
BillStatusCodeIntSee the bill status code table for available status codes.
ExternalInvoiceIdStringAdditional unique invoice identifier in accounts receivable.
BillDateDateTime 
DueDateDateTime(Optional)Empty if BillTypeCode is Invoice.
BillTypeCodeByteSee the bill type code table for available bill type codes.
OriginalAmountDecimal 
CurrencyCodeString 

AddInvoiceRespiteByBillNo10

Add respite date to an open invoice.

Class diagram
1573563792142-225.png
Request parameters

AddInvoiceRespiteByBillNo10Request

FieldDatatypeRequiredDescription
BillNoString(15)YesBill Number.
RespiteCauseString(250)YesReason for respite.
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 
ValidToDateDateTimeYes 

Response parameters

AddInvoiceRespiteByBillNo10Response

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Error codes

GetCustomerCurrentStateByCustomerNoResponse

CodeNameDescription
5074InvalidDateValidToDate is not within a valid date.
5046InvalidAccountTypeBill of BillNo is not of a valid AccountType.
1208InvalidAccountStatusRespite not a valid action on this bill.

AddPaymentOrderOnDueDate

Add paymentorder to an open invoice.

Class diagram
PxR_InvoiceService_AddPaymentOrderOnDueDateRequest.png
Request parameters

AddPaymentOrderOnDueDate

FieldDatatypeRequiredDescription
BillNoString(15)YesBill Number.
CompanyNoString(15)YesCompany number
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

AddPaymentOrderOnDueDate

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Error codes

GetCustomerCurrentStateByCustomerNoResponse

CodeNameDescription
5080InvalidBillNoNo bill found with billNo and companyNo
5117AddPaymentOrderException

Customer ain't available for PaymentOrder.

5002InvalidOpenBillBillStatus ain't Open

ConvertInvoiceToAccount10

Convert an invoice account to a credit account.

Class diagram

1573569373687-299.png

Request parameters

ConvertInvoiceToAccount10Request

FieldDatatypeRequiredDescription
BillNoString(15)YesBill Number.
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

ConvertInvoiceToAccount10Response

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

DeletePaymentOrder

Abort a PaymentOrder for billNo

Class diagram

PxR_InvoiceService_DeletePaymentOrder.png

Request parameters

DeletePaymentOrderRequest

FieldDatatypeRequiredDescription
BillNoStringYesBill to match paymentorder.
CompanyNoString YesCompany number
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

DeletePaymentOrderResponse

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Error codes

DeletePaymentOrderResponse

CodeNameDescription
5080InvalidBillNoBillNo is invalid
5115PaymentOrderNotFoundFound no paymentorders connected to bill
5116DeletePaymentOrderNotAllowedFound paymentOrder but are not allowed to Delete since the paymentorder has begun/finished processing

RegisterInvoiceDirectPaymentByBillNo10

Register a direct payment on given invoice.

Class diagram

1573570140844-820.png

Request parameters

RegisterInvoiceDirectPaymentByBillNo10Request

FieldDatatypeRequiredDescription
AmountDecimalYesDirectPayment Amount.
BillNoStringYesBill to match payment to.
PaymentDateDateTimeYesDate when payment occured.
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

RegisterInvoiceDirectPaymentByBillNo10Response

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Error codes

GetCustomerCurrentStateByCustomerNoResponse

CodeNameDescription
5080InvalidBillNoBillNo is invalid
1207InvalidAmountAmount is invalid
5074InvalidDatePaymentDate is not within a valid date

AddInvoiceCopyOrderByBillNo10

Order a copy of the invoice to be delivered.

Class diagram

1573631474317-399.png

Request parameters

AddInvoiceCopyOrderByBillNo10Request

FieldDatatypeRequiredDescription
BillNoStringYes 
DistributionMethodStringYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

RegisterInvoiceDirectPaymentByBillNo10Response

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Error codes

GetCustomerCurrentStateByCustomerNoResponse

CodeNameDescription
5089BillsNotFoundFound no matching Invoices for BillNo

GetClosedInvoiceInformationByCustomerNo20

Get information about a customer's closed invoice(s) by customer number.

Class diagram
1573632921277-742.png

Request parameters

GetClosedInvoiceInformationByCustomerNo20Request

FieldDatatypeRequiredDescription
CustomerNoStringYes 
TrackingUserEmailStringYesUser info for trackability.
TraceId yes 

Response parameters

GetClosedInvoiceInformation20Response

GetClosedInvoiceInformationByRegNo20

Get information about a customer's closed invoice(s) by social security number.

Class diagram

1573646248641-666.png

Request parameters

GetClosedInvoiceInformationByRegNo20Request

FieldDatatypeRequiredDescription
RegNoRegNoYesSee RegNo
TrackingUserEmailStringYesUser info for trackability.
TraceId yes 

Response parameters

GetClosedInvoiceInformation20Response

Error codes

GetClosedInvoiceInformation20Response

CodeNameDescription
5006ExpectedCustomerNumberFound multiple customer on RegNo, use CustomerNo instead.
5075MissingAccountForBillFound no matching customer for RegNo.
1024ErrorInvalidRegNoInvalid RegNo format.

GetInvoiceInformationByBillNo20

Class diagram

1573648586121-179.png

Request parameters

GetInvoiceInformationByBillNo20Request

FieldDatatypeRequiredDescription
BillNoStringYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoinceInformation20Response

Error codes

GetInvoinceInformation20Response

CodeNameDescription
5072InvalidExternalBillIdExternalInvoiceId does not match any valid invoices.
5089BillsNotFoundInvoice match but invoice not valid. May be older than 1 year.

GetInvoiceInformationByExternalInvoiceId20

Class diagram

1573822272252-854.png

Request parameters

GetInvoiceInformationByExternalInvoiceId20Request

FieldDatatypeRequiredDescription
ExternalInvoiceIdStringYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoinceInformation20Response

Error codes

GetInvoinceInformation20Response

CodeNameDescription
5072InvalidExternalBillIdExternalInvoiceId does not match any valid invoices.
5089BillsNotFoundInvoice match but invoice not valid. May be older than 1 year.

GetInvoicePdfByBillNoExternalBillType10

Class diagram

1573822789308-786.png

Request parameters

GetInvoicePdfByBillNoExternalBillType10Request

FieldDatatypeRequiredDescription
BillNoStringYes 
ExternalBillTypeStringYes

Document type.
Existing ExternalBillType can be retrived from GetInvoiceInformationByBillNo20 or GetInvoiceInformationByExternalInvoiceId20.

TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetInvoicePDFResponse

Error codes

GetInvoincePDFResponse

CodeNameDescription
5046InvalidAccountTypeWrong account type. The requested bill number is not an invoice.
5080InvalidBillNoInvoice document not found.
5095ExternalBillTypeCodeInvalid ExternalBillType.

GetOpenInvoiceInformationByCustomerNo20

Class diagram

1573825242764-218.png

Request parameters

GetOpenInvoiceInformationByCustomerNo20Request

FieldDatatypeRequiredDescription
CustomerNoStringYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetOpenInvoiceInformation20Response

GetOpenInvoiceInformationByRegNo20

Class diagram

1573825242764-218.png

Request parameters

GetOpenInvoiceInformationByRegNo20Request

FieldDatatypeRequiredDescription
RegNoRegNoYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

GetOpenInvoiceInformation20Response

RegisterInvoicePSPPaymentByBillNo10

Class diagram

1573825460421-413.png

Request parameters

RegisterInvoicePSPPaymentByBillNoRequest

FieldDatatypeRequiredDescription
BillNoStringYes 
AmountDecimalYes 
PaymentDateDateTimeYes 
SellerTransactionIdStringYes 
TrackingUserEMailString(1-256)YesUser info for trackability.
TraceIdStringYes 

Response parameters

RegisterInvoicePSPPaymentByBillNoResponse

FieldDatatypeDescription
ResponseCodeString 
ResponseMessageString 
TraceIdString 

CustomerService methods

The complete Wsdl specification for this service can be found at:
https://connect.internaltest.payex.com/PxR/CustomerService.svc

 (Username/password security model)

GetcustomerCurrentStateByCustomerNo

Get information about current state of a customer.

Class diagram

7-class-diagram-external.png

Request parameters

GetCustomerCurrentStateByCustomerNoRequest

FieldDatatypeRequiredDescription
CustomerNumberString(15)Yes 
TrackingUserEMailStringNo 

Response parameters

GetCustomerCurrentStateByCustomerNoResponse

FieldDatatypeDescription
CustomerConsentsCustomerConsentArray.
CustomerInfoCustomerInfo 
CustomerNoString 
CustomerStatusCustomerStatusArray.
RegNoRegNo 

Classes

CustomerConsent

FieldDatatypeDescription
ConsentTypeCodeIntSee the consent type codes table for available consent type codes.

CustomerInfo

FieldDatatypeDescription
NameString 
DistributionAddressInfoDistributionAddressInfo 
LanguageString 
LegalEntityCodeIntSee the legal entity codes table for available legal entity codes.
VatNoString 
Category  

CustomerStatus

FieldDatatypeDescription
CustomerStatusTypeCodeIntSee code specification.

DistributionAddressInfo

FieldDatatypeRequiredDescription
AddressesArrayYesSee address.
EMailAddressStringNo 
CellphoneStringNo 

Address

FieldDatatypeRequiredDescription
AddresseeString(72)Yes 
StreetAdressString(35)No 
ZipCodeString(9)Yes 
CityString(27)Yes 
CoAddressString(35)No 
CountryCodeString(2)Yes 

GetCustomerCurrentStateByRegNo10

Class diagram

1574422177227-663.png

Request parameters

GetCustomerCurrentStateByRegNo10Request

FieldDatatypeRequiredDescription
RegNoRegNoYes 
TrackingUserEMailStringYes 
TraceIdStringYes 

Response parameters

GetCustomerCurrentStateByRegNo10Response

FieldDatatypeDescription
CustomerConsentsCustomerConsentArray.
CustomerInfoCustomerInfo 
CustomerNoString 
CustomerStatusCustomerStatusArray.
RegNoRegNo 

Appendix 1 Shared Classes

Response parameters

GetInvoicePDFResponse

FieldDatatypeDescription
PdfByte[] 
RegNoRegNo 
CustomerNoString 
ResponseCodeString 
ResponseMessageString 
TraceIdString 

GetInvoiceInformationResponse

FieldDatatypeDescription
RegNoRegNo 
CustomerNoString 
InvoiceInvoice 
ResponseCodeString 
ResponseMessageString 
TraceIdString 

Invoice

FieldDatatypeDescription
PaymentReferenceString 
BillNoString 
BillStatusCodeIntSee the bill type code table for available bill type codes.
ExternalInvoiceIdString 
ExternalReferenceString 
SellerNoString 
BillDateDateTime 
DueDateDateTime (Optional) 
OriginalAmountDecimal 
InterestInterest 
CurrentBalanceListList <Balance> 
CurrencyCodeString 
CurrentClaimLevelCodeIntSee the claim level codes table for available claim level codes.
CollectionStatusCodeIntSee the collection status code table for available collection status codes.
PaymentBankAccountPaymentBankAccount 
PaymentTypeString 
ActiveRespiteActiveRespite 
ActivePaymentOrderActivePaymentOrder 
BillIdLong 
BillTypeCodeByteSee the bill type code table for available bill type codes.
InvoiceHistoryList <InvoiceHistory> 

PaymentBankAccount20 inherit PaymentBankAccount

FieldDatatypeDescription
PaymentTypeNameString 

PaymentBankAccount

FieldDatatypeDescription
BankAccountNoString 
BankAccountTypeString 
BICString 
IBANString 

ActiveRespite

FieldDatatypeDescription
RespiteValidToDateDateTime 
RespiteTypeCodeint 

InvoiceHistory

FieldDatatypeDescription
BillDateDateTime 
BillIdlong 
BillTypeCodebyteSee the bill type code table for available bill type codes.

GetClosedInvoiceInformation20Response

FieldDatatypeDescription
CompanyNoString 
CustomerNostring 
CustomerNameString 
InvoiceListList<ClosedInvoice20>See ClosedInvoice20

ClosedInvoice20

FieldDatatypeDescription
CurrencyCodeString 
BillNostring 
BillStatusCodeInt 
ExternalInvoiceIdString 
BillDateDateTime 
DueDateDateTime? 
ExternalBillTypeString 
OriginalAmountDecimal 
SellerNameString 
SellerNoString 

GetInvoiceInformation20Response

FieldDatatypeDescription
CompanyNoString 
RegNoRegNo 
CustomerNostring 
CustomerNameString 
InvoiceInvoiceInformation20 

InvoiceInformation20 inherit OpenInvoice20

FieldDatatypeDescription
PenaltyIntestIntrest 
CurrentBalanceList<Balance> 
InvoiceHistoryList<InvoiceHistory20> 

InvoiceHistory20

FieldDatatypeDescription
BillDateDateTime 
ExternalBillTypeString 
BillAmountDecimal? 

OpenInvoice20 inherit ClosedInvoice20

FieldDatatypeDescription
CurrentDebtDecimal 
PaymentBankAccountPaymentBankAccount 
PaymentTypeString 
ActiveRespiteActiveRespite20 
ActivePaymentOrderActivePaymentOrder 
PaymentReferenceString 
ExportedToCollectionBool 

RegNo

FieldDatatypeDescription
CountryCodeString 
ValueStringNational identification number

Interest

FieldDatatypeDescription
CurrentInterestRatedecimal 
InterestIntervalCodebyteSee the Interest Interval Codes for available intererest interval codes.

Balance

FieldDatatypeDescription
BalanceTypeCodeintSee the balance type codes table for available balance type codes.
Amountdecimal 

PaymentBankAccount20 inherit PaymentBankAccount

FieldDatatypeDescription
PaymentTypeNameString 

PaymentBankAccount

FieldDatatypeDescription
BankAccountNoString 
BankAccountTypeString 
BICString 
IBANString 

ActiveRespite

FieldDatatypeDescription
RespiteValidtoDateDateTime 
RespiteTypeCodeintSee the respite type code table for available respite type codes. 

ActivePaymentOrder

FieldDatatypeDescription
PaymentTypeString 
ExecutionDateDateTime 

ActiveRespite20

FieldDatatypeDescription
RespiteValidToDateDateTime 
RespiteTypeCodeIntSee the respite type code table for available respite type codes. 

ActiveRespite21

FieldDatatypeDescription
RespiteValidToDateDateTime 
RespiteTypeCodeIntSee the respite type code table for available respite type codes. 

GetInvoiceInformation20Response

FieldDatatypeDescription
CompanyNoString 
RegNoRegNo 
CustomerNostring 
CustomerNameString 
InvoiceInvoiceInformation20 

BillDetail

FieldDatatypeDescription
ExternalBillIdString 
DueDateDateTime 
ExportedToCollectionBool 
BillNoString 
ActiveRespiteActiveRespite20 
ActivePaymentOrderActivePaymentOrder 
CurrentBalanceListList<Balance> 
BillHistoryListList<BillHistory> 

BillHistory

FieldDatatypeDescription
BillDateDateTime 
ExternalBillTypeStringI_Invoice
I_Reminder
I_Collection
I_RestReminder (reminder of fees that has not been payed on the invoice)
BillAmountDecimal 

Appendix 2 Code specification

Bill status codes

BillStatusCodesDescription
1Open
2Closed
3Closed_Diff
4Closed_Loss
5Reversed
6Arrears
7Closed_Rest
8Closed_Convert
9Closed_Sold
10Closed_Reversal
11Pending

Claim level codes

ClaimLevelCodeDescription
1Invoice
2RestReminderSent
3ReminderSent
4RestReminderSent
5SecondReminderSent
6RestReminderSent
7CollectionClaimSent
8RestReminderSent
9*DebtCollection*
10Late Fee, credit account
11TerminationNoticeSent, credit account

*Additional fees and interest may have occured in collection system, but is not included in the response. 

Bill type codes

BillTypeCodeDescription
1Invoice
4CreditInvoice

Consent type codes

ConsentTypeCodeDescription
1BGAGSE
2EInvoiceB2CSE
3EInvoiceB2CNO
4BKAGNO
5KivraSE
6EInvoiceB2CFI
7EInvoice20B2CNO
8AGDK
9PSPRecurringCardConsent
10EcBoks

CustomerStatus type codes

CustomerStatusTypeCodeDescription
1ConfirmedDeceased
2ConfirmedBankruptcy
3ActiveComplaints

Legal entity codes

LegalEntiytCodeDescription
NoneNone
1Business
2Private

Balance type codes

BalanceTypeCodeDescription
0None
1Capital
2ReminderFee
3PenaltyInterest
4CalculatedPenaltyInterest
5CollectionFee
6BusinessReminderFee
7BillingFee
8DelayFee
9DebtInterest
10DebtCollectionCharge
11Rounding

Collection status codes

CollectionStatusCodeDescription
1PreDebtCollection
2DebtCollection
3LegalProcess
4Monitoring
5External
6Closed
7ReturnedWrongAddress

Interest Interval Codes

InterestIntervalCodeDescription
1Year
2Month

Respite type codes

InterestIntervalCodeDescription
1Stop
2Stop, complaint
3Stop, return
4Stop, complaint rejected
5Stop, complaint approved
6Stop, collection inquiry
7Stop, deceased
10Respite
11Respite, interest inquiry
12Respite, interest free
13Respite, installment plan
20Respite, disbursement
25Respite, collection inquiry

Address type codes

AddressTypeCodeDescription
1BillingAddress
3LegalAddress

TransactionTypeGroup codes

AddressTypeCodeDescription
0Unknown
1Payment
2DirectPayment
3Adjustment
4SurplusAdjustment
5Writedown
6Collection
7CollectionAccount
8Disbursement
9Monitoring
10Invoice
11Credit
12ReminderFee
13CollectionFee
14Interest
15DisbursementReturned
16InvoiceFee
17Converted

TransactionCause codes

TransactionCauseCodeDescription
1Bankruptcy
2CompositionArrangement
3Settlement
4WrongAddress
5Complaint
6WrongRegNo
7UnderAge
8Deceased
9Fraud
10Dispute
15Monitoring
20ApprovedDiff
21Remission
22Unknown
23PurchasedClaim
24DirectPayment
25Migration
26ReversalCorrection
27PurchaseCorrection
28CashWithdrawalCorrection
29CashWithdrawal
30InterestAsIncome

ComplaintCause codes

ComplaintCauseCodeDescription
1InvoiceComplaint
2FraudComplaint
3ContractComplaint
4ImproperComplaint
Created by David Persson on 2019/06/20 09:24