A.P.I dokumentation

(API: Application Programming Interface)

Betalingsstatus

Du kan, som ERP udbyder, bruge vores HTTPS/REST API til at se status på de banktransaktioner som er oprettet igennem vores system.
Denne side omhandler alene API funktioner til at modtage status på betalingsanmodninger.

Alle anmodninger skal godkendes, se mere her: beregning af godkendelses header


GET
https://api.bankintegration.dk/status?requestId=<RequestId>
POST
https://api.bankintegration.dk/status

På en anmodning om status på en eller flere betalinger, sendes et JSON objekt tilbage i svarets body.

{
  "account": "52470021527478",
  "requestId": "REQ_01",
  "time" : "2015-05-21T12:45:23+02:00",
  "answers": [ 
    {
      "transId": "254778516",
      "paymentId": "PAY_0122457",
      "endToEndId": "72F0A84C17424C7EB2C71E88A4551395",
      "status": 2, // Pending
      "info": {
        "text": "Inv. 012254 - Otto Hansen",
        "instructed": {
          "amount": 145.7,
          "currency": "DKK"
        }
      }
    },
    {
      "transId": "254778516",
      "paymentId": "PAY_9985424",
      "endToEndId": "9D7D35DCAACC41BDB018D0624CD87340",
      "status": 4, // Accepted
      "info": {
        "text": "Faktura 259",
        "instructed": {
          "amount": 1754.1,
          "currency": "DKK"
        }
      }
    },
    {
      "transId": "254457881",
      "paymentId": "PAY_9775424",
      "endToEndId": "9D7D547AACB44578DB08D0624CD87340",
      "status": 8, // Succeeded
      "info": {
        "text": "Faktura 114",
        "instructed": {
          "amount": 100,
          "currency": "EUR"
        },
        "transacted": {
          "amount": 744.12,
          "currency": "DKK"
        }
      }
    },
    {
      "transId": "254778516",
      "paymentId": "PAY_1245889",
      "endToEndId": "CBE958F3813C4B8C9F6DA01E25E85B1F",
      "status": 16, // Rejected
      "errors": [
        {
          "code": "AC03",
          "text": "Beneficiary's account number not found - please check"
        }
      ]
    }
  ]
}

Status på betalinger kan hentes via. en GET eller POST anmodning.

Status kan være en af følgende værdier;
1 = "Created" - Afventer overførelse til banken.
2 = "Pending" - Sendt og modtaget af banken, eller afventer svar ved to-faktor godkendelse.
4 = "Accepted" - Valideret i banken, men ikke betalt endnu og kan stadig blive afvist.
8 = "Succeeed" - Betaling gennemført.
16 = "Rejected" - Afvist i banken (se fejl).
32 = "Failed" - Afvist i validering (se fejl)
64 = "NotFound" - Ikke fundet.
128 = "Warning" - Betaling kan ikke udføres, men er ikke afvist endnu – ex. ikke dækning på konto.
256 = "Cancelling" - Betaling er under fortrydelse af brugeren (kun nogle banker understøttes)
512 = "Waiting" - Betaling afventer godkendelse/signering i netbank (kun nogle banker understøttes)

GET anmodning

På anmodningen skal sættes et RequestId som returneres i svaret.

  • requestId: [string, required] ERP udbyderens ID på status anmodning. Returneres i svaret.
  • transId: [object, optional] Et transaktions ID returneret fra en tidligere betalings anmodning.
  • status: [integer, optional] En status værdi på de betalinger som ønskes returneret.
  • from: [date, optional] Fra betalingsdato fra tidligere betalinger. Format "yyyy-MM-dd" eller "yyMMdd".
  • to: [date: optional] Til betalingsdato fra tidligere betalinger. Format "yyyy-MM-dd" eller "yyMMdd".
  • paymentId: [string, optional] ERP udbyderens betalings ID fra en tidligere anmodning.
  • endToEndId: [string, optional] EndToEnd ID fra en tidligere anmodning.
POST anmodninger:

Status kan alternativt hentes med en POST admodning.

I anmodnings body indsættes et JSON objekt til at selekterer de betalinger der ønskes en status på.
Kun betalinger fra den konto angivet i godkendelses header medtages.

  • requestId: [string, required] ERP udbyderens ID på status anmodning. Returneres i svaret.
  • transId: [object, optional] Et transaktions ID returneret fra en tidligere betalings anmodning.
  • status: [integer, optional] En status værdi på de betalinger som ønskes returneret.
  • from: [date, optional] Fra betalingsdato fra tidligere betalinger. Format "yyyy-MM-dd" eller "yyMMdd".
  • to: [date: optional] Til betalingsdato fra tidligere betalinger. Format "yyyy-MM-dd" eller "yyMMdd".
  • paymentId: [string, array, optional] Et array af ERP udbyderens betalings ID'er fra, en eller flere, tidligere anmodninger.
  • endToEndId: [string, array, optional] Et array af End-To-End ID'er fra, en eller flere, tidligere anmodninger.
{
  "requestId": "string",
  "transId": "string",
  "status: "integer",
  "from": "date",
  "to": "date",
  "paymentId": ["string, array"],
  "endToEndId": ["string, array"],
}
Status svar

På en anmodning (GET/POST) på status på en eller flere betalinger, sendes en JSON objekt tilbage i svarets body.

  • accountId: [string] Konto nr. i BBAN format (47110012457890).
  • requestId: [string] RequestId kopieret fra anmodning.
  • transId: [string, optional] Transaktion ID fra tidligere betalingsanmodning.
  • time: [dateTime] Tidspunkt for afsendelse fra vores server.
  • answers: [object, array] Et array af status svar på betalingsanmodninger i scope.

{
  "accountId": "string",
  "requestId": "string",
  "time" : "datetime",
  "answers": [ "object:PaymentAnswer", "object:PaymentAnswer" ]
}
PaymentAnswer

  • transId: [string] Transaktions ID som returneret ved anmodning.
  • paymentId: [string] ERP udbyders betalings ID af betalingsanmodningen.
  • endToEndId: [string] Et unikt nr. genereret af systemet som også sendes til banken.
  • status: [integer] Status på betaling.
  • errors: [object, array] Et array af fejl beskeder hvis status er 16="Rejected" eller 32="Failed".
  • warnings: [object, array, optional] Et array af advarsler, om nogen.
  • info: [object, optional] Oplysninger om tekst på betalingens, samt beløb hhv. ved anmodning og gennemførelse.

{
  "transId": "string",
  "paymentId": "string",
  "endToEndId": "string",
  "status": "integer", // 1="Created", 2="Pending", 4="Accepted", 8="Succeeded" osv."
  "errors": [ "object:PaymentError", "object:PaymentError"],
  "warnings": [ "object:PaymentWarning", "object:PaymentWarning"],
  "info": { "object:PaymentInfo" }
}
PaymentError

  • code: [string] Fejlkode if. med betalingsfejl. Se nedenfor.
  • text: [string] Besked if. med fejl.

{
  "code": "string",
  "text": "string"
}
PaymentWarning

  • code: [string] Fejlkode if. med advarsel eller ændring. Ex. betalingsdato eller tekst. Se nedenfor.
  • text: [string] Besked vedr. advarsel.
  • param: [string, optional] Den oprindelige værdi, om nogen, der er blevet ændret if. med advarsel/ændring.

{
  "code": "string",
  "text": "string",
  "param": "string"
}
PaymentInfo

  • text: [string] Tekst på eget kontoudtog som angivet ved anmodning.
  • amounts: [object, optional] Oplysninger om beløb if. med betaling.
  • instructed: [object, optional] Beløb som angivet på anmodning.
  • transacted: [object, optional] Beløb som gennemført, forudsat status 8="Succeeded".
  • amount: [double] Det givne beløb.
  • currency: [string] Valutakode for det givne beløb.

{
  "text": "Min EUR betaling",
  "amounts": {
    "instructed": {
      "amount": 100,
      "currency": "EUR"
    }
    "transacted": {
      "amount": 748.52,
      "currency": "DKK"
    }
  }
}
Fejlkoder (ved PaymentError og/eller PaymentWarning)

Følgende fejl koder er pt. kendte. Listen udbygges løbende. Tekster if. med fejl/advarsler kan varierer efter bank, sprog og hændelse.

  • AC01: Format of the account number specified is not correct
  • AC03: Wrong IBAN
  • AC04: Account number specified has been closed on the bank of account's books
  • AC06: Account specified is blocked, prohibiting posting of transactions against it.
  • AC13: Debtor account type is missing or invalid
  • AC14: An agent in the payment chain is invalid.
  • AG01: Transaction forbidden on this type of account (formerly NoAgreement)
  • AG02: Bank Operation code specified in the message is not valid for receiver
  • AM01: Specified message amount is equal to zero
  • AM02: Specific transaction/message amount is greater than allowed maximum
  • AM03: Specified message amount is an non processable currency outside of existing agreement
  • AM04: Amount of funds available to cover specified message amount is insufficient.
  • AM05: Duplication
  • AM06: Specified transaction amount is less than agreed minimum.
  • AM07: Amount of funds available to cover specified message amount is insufficient.
  • AM09: Amount received is not the amount agreed or expected
  • AM10: Sum of instructed amounts does not equal the control sum.
  • BE01: Identification of end customer is not consistent with associated account number.
  • BE04: Specification of creditor's address, which is required for payment, is missing/not correct.
  • BE05: Party who initiated the message is not recognised by the end customer
  • BE06: End customer specified is not known at associated Sort/National Bank Code or does no longer exist in the books
  • BE07: Specification of debtor's address, which is required for payment, is missing/not correct.
  • BE08: Returned as a result of a bank error.
  • CNOR: Creditor bank is not registered under this BIC in the CSM
  • CURR: Currency of the payment is incorrect
  • CUST: Cancellation requested by the Debtor
  • DNOR: Debtor bank is not registered under this BIC in the CSM
  • DS28: Return following technical problems resulting in erroneous transaction.
  • DT01: Invalid date (eg, wrong settlement date)
  • ED01: Correspondent bank not possible.
  • ED03: Balance of payments complementary info is requested
  • ED05: Settlement of the transaction has failed.
  • EMVL: The card payment is fraudulent and was not processed with EMV technology for an EMV card.
  • FF05: Local Instrument code is missing or invalid
  • FOCR: Return following a cancellation request
  • FR01: Returned as a result of fraud.
  • FRTR: Final response/tracking is recalled as mandate is cancelled.
  • MD01: No Mandate
  • MD02: Mandate related information data required by the scheme is missing.
  • MD06: Return of funds requested by end customer
  • MD07: End customer is deceased.
  • MS02: Reason has not been specified by end customer
  • MS03: Reason has not been specified by agent.
  • NARR: Reason is provided as narrative information in the additional reason information.
  • NOAS: No response from Beneficiary
  • NOOR: Original SCT never received
  • PINL: The card payment is fraudulent (lost and stolen fraud) and was processed as EMV transaction without PIN verification.
  • RC01: Bank Identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode).
  • RC07: Incorrrect BIC of the beneficiary Bank in the SCTR
  • RF01: Transaction reference is not unique within the message.
  • RR01: Debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing
  • RR02: Debtor’s name and/or address needed for regulatory requirements is insufficient or missing.
  • RR03: Creditor’s name and/or address needed for regulatory requirements is insufficient or missing.
  • RR04: Regulatory Reason
  • RUTA: Return following investigation request and no remediation possible.
  • SL01: Due to specific service offered by the Debtor Agent
  • SL02: Due to specific service offered by the Creditor Agent
  • SL13: Due to Maximum allowed Direct Debit Transactions per period service offered by the Debtor Agent.
  • SL14: Due to Maximum allowed Direct Debit Transaction amount service offered by the Debtor Agent.
  • TM01: Associated message was received after agreed processing cut-off time.
  • TRAC: Return following direct debit being removed from tracking process.
  • UPAY: Payment is not justified.
  • -
  • BI01: Unknown Account Format
  • BI02: Invalid Payment Id
  • BI03: Payment Type Not Supported
  • BI04: Text Truncated
  • BI05: Country Changed
  • -
  • BI87: Rejected By User
  • BI88: Account Insufficient Access.
  • BI89: Invalid Transaction State.
  • BI90: Transport Failed.
  • BI91: Account Not Found.
  • BI92: Bank Not Found.
  • BI93: Customer Not Found.
  • BI94: Transport Provider Not Found.
  • BI95: Document Factory Not Found.
  • BI96: Invalid Transaction.
  • BI97: Agreement Not Found.
  • BI98: Invalid Agreement State.
  • BI99: Certificate Missing.