inter-API Invoice Payment
Introduction
It is the documentation that specifies the flow of API methods to be used in bill payments.
Methods:
GetAssociationCollectionGroup
GetAssociationList
GetScreenDefinition
QueryInvoices
InvoicePayment
How to Get Started
Step 1 - Sign Up & Register: To start building with our APIs, you'll need to sign up for account. Read our documentation on how to use the Inter-API services and secure your connection with the right electronic certificate
Step 2 - Get Subscription Key: To get your Subscription Key, you'll first need to Subscribe for a package on Products page.
Step 3 - Activate: Get your subscription key under profile menu. You can also add your applications here.
Step 4 - Test API Methods: Include your access token and the information needed for that API. From there, use the response for your application and you’re all set. Now you can start building applications with our API.
Step 5 - For Production: You 're now up and running on inter-API Portal. Submit for production When you’re finished testing, you may want to submit your app for production. If it seems like we’d be a good fit, we’ll look into it and do some testing together. Then, we’ll talk about next steps to move to production.
How it Works
You can make payment by calling 5 methods sequentally.
GetAssociationCollectionGroup
This method gives you a list of all the institution groups defined in the banking system that are open to you.
Request:
{
"Header": {
"Channel": "****",
"AppKey": "****",
"ChannelSessionId": "331eb5f529c74df2b800926b5f3w342412",
"ChannelRequestId": "4dsf55daadf23sdfds564gh564gf56jh"
},
"Parameters": [
{}
]
}
Response:
{
"$type": "ServiceResponseMessage",
"Data":
{
"$type": "AssociationCollectionGroupsQueryMessage",
AsociationCollectionGroups": {
"$type": "Dictionary`2",
"11": "HAYAT SIGORTASI KURUMLARI",
"2": "SU"
}
}
}
GetAssosicationList
This method gives the list of institutions defined under all institution groups that are open to you defined in the banking system.
Request:
{
"Header": {
"Channel": "****",
"AppKey": "****",
"ChannelSessionId": "null",
"ChannelRequestId": "null"
},
"Parameters": [
{
CollectionGroup": "2"
}
]
}
Response:
{
"$type": "ServiceResponseMessage",
"Data": {
"$type": "AssociationListQueryMessage",
"Response": [
{
"$type": "Association",
"AssociationCode": "ADANA SU",
"AssociationName": "ADANA SU",
"CollectionGroup": "2",
"ValidCityCodes": [
"01"
]
}
]
}
}
GetScreenDefinition
This method returns you input information that you will use on a per institution basis for debt inquiry.
Input fields that you will use for debt query return from this method. Data in the "QueryInputFields" object can be used during querying.
Under “PaymentInputMappings”, it is the section where we hold the fields you will send to the next service, the payment service.
Request:
{
"Header": {
"Channel": "****",
"AppKey": "****",
"ChannelSessionId": "null",
"ChannelRequestId": "null"
},
"Parameters": [
{
"AssociationCode": "ARTVINSU"
}
]
}
"QueryInputFields": [
{
"$type": "FieldMapping",
"CodeString": "Abone Numarası",
"FieldName": "SubscriberNumber"
}
]
Response:
{
"$type": "ServiceResponseMessage",
"Data": {
"$type": "ScreenDefinitionQueryMessage",
"AssociationCode": "ARTVINSU",
"Response": {
"$type": "ScreenDefinitionEntity",
"AssociationCode": "ARTVINSU",
"Response": {
"$type": "ScreenDefinitionEntity",
"AssociationCode": "ARTVINSU",
"PaymentInputMappings": [
{
"$type": "PaymentInputMapping",
"PaymentInputParam": "AssociationCode"
},
{
"$type": "PaymentInputMapping",
"PaymentInputParam": "AssociationCode"
},
{
"$type": "PaymentInputMapping",
"PaymentInputParam": "SubscriberNumber"
},
{
"$type": "PaymentInputMapping",
"PaymentInputParam": "InvoiceNumber"
},
{
"$type": "PaymentInputMapping",
"PaymentInputParam": "ParametricCode"
},
"QueryInputFields": [
{
"$type": "FieldMapping",
"CodeString": "Abone Numarası",
"FieldName": "SubscriberNumber"
}
]
}
}
}
QueryInvoices
This service is used to query billing debt.
Request:
{
"Header": {
"Channel": "****",
"AppKey": "****",
"ChannelSessionId": "null",
"ChannelRequestId": "null"
},
"Parameters": [
{
"SubDealerCode": "",
"Request": {
"AssociationCode": "ARTVINSU",
"SubscriberNumber": "64291"
},
"CustomerNo": 3488017
}
]
}
Response:
{
"$type": "ServiceResponseMessage",
"Data": {
"$type": "InvoicesQueryMessage",
"Request": {
"$type": "InvoiceMessageBagEntity",
},
"Response": {
"$type": "InvoiceMessageBagEntity",
"ResponseCode": "00",
"NameSurname": "******* *******",
"BillInformation": [
{
"$type": "InvoiceMessageBagEntity",
"SubscriberName": " ",
"SubscriberNumber": "64291",
"InvoiceNumber": "20190320200125",
"LastPaymentDate": "2020-01-25T00:00:00",
"InvoiceAmount": 29.2,
"PaymentAmount": 29.2,
"InvoiceDate": "2020-01-25T00:00:00",
"InvoiceCurrency": "TRY",
"PaymentCurrency": "TRY",
"CurrencyCode": "TRY",
"AssociationCode": "ARTVINSU"
}
]
}
}
}
InvoicePayment
Cashman payment services work in conjunction with the query service. A request is sent to this service with the result returned from the inquiry service. “InvoiceMessageBag” object received from the invoice inquiry service should be sent in the request field of this method.
Request:
{
"Header": {
"AppKey": "****",
"Channel": "****",
"ChannelSessionId": "54dsaf4ds3h2g1jhg651d",
"ChannelRequestId": "a7f77648-dfb7-42ef-a4b8-db6b79c1cfab"
},
"Parameters": [
{
"SubDealerCode": "",
"AssociationCode": "ARTVINSU",
"CustomerNo": 3488017,
"Amount": 2,
"InvoiceMessageBag": {
"SubscriberName": " ",
"SubscriberNumber": "12563",
"InvoiceNumber": "0000012563000000000002.00200108",
"LastPaymentDate": "2020-01-08T00:00:00",
"InvoiceAmount": 2,
"PaymentAmount": 2,
"InvoiceDate": "2020-01-08T00:00:00",
"InvoiceCurrency": "TRY",
"PaymentCurrency": "TRY",
"AssociationCode": "ARTVINSU"
},
"PaymentEntry": {
"AccountBranchCode": 9142,
"AccountNumber": 3488017,
"AccountSuffix": 357,
"CurrencyCode": "TRY",
"DealerCode":"",
"SubDealerCode":""
},
"SourceAccount": {
"CustomerNo": 3488017,
"BranchCode": 9142,
"AccountSuffix": 357,
"CurrencyCode": "TRY"
}
}
]
}
Response:
{
"$type": "ServiceResponseMessage",
"Data": {
"$type": "PaymentEsbTransactionMessage",
"State": 2
}
}
Cancel Payment
It is the service that controls the automatic payment orders. Only requests made during the day are canceled.
{
"Header": {
"AppKey": "****",
"Channel": "****",
"ChannelSessionId": "54dsaf4ds3h2g1jhg651d",
"ChannelRequestId": "a7f77648-dfb7-42ef-a4b8-db6b79c1cfab"
},
"Parameters": [
{
"SubDealerCode": "",
"AssociationCode": "ARTVINSU",
"SubscriberNumber": "7511742",
"InvoiceNumber": "751174226",
"PaymentDate": "2021-05-16T00:00:00",
"PaymentAmount": 10.0,
"CustomerNo": 3488017
}
]
}
{
"$type": "ServiceResponseMessage",
"Data": {
"$type": "CancelPaymentTransactionMessage",
"State": 2
}
}