../credit-account-onboarding

Integrate to PayEx Credit Account Onboarding API 

Offers

List

Request
GET /ledger/credit-account-onboarding/v1/XXX/offers HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json

Resource

Response
HTTP/1.1 200 OK
Content-Type: application/json

{                        
   "accountProfile" : "kontotyp-1000",
   "title" : "kontotyp 1,000",
   "currency" : "NOK",
   "creditLimit" : 1000.00,
   "interestFreePurchaseMonth" : true|false,
   "monthlyAdminFee" : 35.00,
   "reminderFee" : 35.00,
   "interest" : 35.00,
   "termsAndConditions" :
    {
       "standardEuropeeanAgreements" : "https://www.payex.com/term-and-conditions/no/-----.pdf",
       "accountTerms" : "https://www.payex.com/term-and-conditions/no/-----.pdf"
    },
   "@id" : "/ledger/credit-account-onboarding/v1/501/offers/kontotyp-1000",
   "operations" :
        [
            {
               "title" : "apply-for-account",
               "href" : "/ledger/credit-account-onboarding/v1/501/offers/kontotyp-1000/applications",
               "action" : "post"
            }
        ]
}

Resource properties

PropertyData typeFormatDescription
@id stringMaxlength:  
accountProfilestringMaxlength:  
titlestringMaxlength 
currencystringMaxlength:  
creditLimitdecimalMaxlength:  
interestFreePurchaseMonthboolISO 8601 
monthlyAdminFeedecimal  
reminderFeedecimal  
termsAndConditions.standardEuropeeanAgreementsstringUri 
termsAndConditions.accountTermsstringUri 

Applications

List

Request
GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json

Get

Request
GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications/NNN  HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json

Post

Request
GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures  HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json

{    
   "nationalConsumerIdentifier" : {
       "value" : "19101010-1010",
       "countryCode" : "SE"                
    },
   "customerNo" : "951753456",
   "emailAddress" : "test@testshop.se",
   "cellPhone" : "+46701234456",  
   "ipAddress": "1.1.1.1",     
   "LegalAddress" : {
       "name" : "John Smith",
       "streetAddress" : "Teststreet",
       "city" : "Testcity",
       "coAddress" : "",
       "zipCode" : "12345",
       "countryCode" : "SE"
    }
}

Resource

Response
HTTP/1.1 200 OK
Content-Type: application/json

{    
   "nationalConsumerIdentifier" : {
       "value" : "19101010-1010",
       "countryCode" : "SE"                
    },
   "status" : "awaiting-sign",
   "customerNo" : "951753456",
   "emailAddress" : "test@testshop.se",
   "cellPhone" : "+46701234456",  
   "ipAddress": "1.1.1.1",     
   "LegalAddress" : {
       "name" : "John Smith",
       "streetAddress" : "Teststreet",
       "city" : "Testcity",
       "coAddress" : "",
       "zipCode" : "12345",
       "countryCode" : "SE"
    },
   "account" : null,
   "@id" : "/ledger/credit-account-onboardings/v1/501/offers/kontotyp-10000/applications/1561561-54641515-56456",
   "parentHREF" : "/ledger/credit-account-onboardings/v1/501/offers/kontotyp-10000",
   "operations" : [
        {
           "rel" : "sign-application",
           "href" : "/ledger/credit-account-onboardings/v1/501/offers/kontotyp-10000/applications/1561561-54641515-56456/sign-agreement",
           "action" : "post"
        }
    ]
}

Resource properties

PropertyData typeFormatDescription
@id stringMaxlength:  
nationalConsumerIdentifier.valuestringMaxlength:  
nationalConsumerIdentifier.countryCodestringMaxlength 
statusstringMaxlength:  
customerNostringMaxlength:  
emailAddressstringMaxlength:  
cellPhonestringMaxlength: 
ipAddressstringMaxlength: 
LegalAddress.namestringMaxlength 
LegalAddress.streetAddressstringMaxlength: 
LegalAddress.citystringMaxlength: 
LegalAddress.coAddressstringMaxlength: 
LegalAddress.zipCodestringMaxlength: 
LegalAddress.countryCodestringMaxlength: 
accountstringUriReference to created account

Sign-agreement (Operation)

Request

Request
GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/credits HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json

Response

Request
HTTP/1.1 201 Created
Content-Type: application/json

{
   "createdAccount" : "https://api.payex.com/ledger/credit-account/v1/123/accounts/123456",
}

Resource properties

PropertyData typeFormatDescription
createdAccountstringUri 

Problems

If an error occur or any validation failed, a "problem" response will be returned.
Below is a list of problems that can occur:

HttpStatus 401 Unauthorized

  • Token expired
  • Token invalid
  • SellerNumber does not match token
  • CompanyNumber does not match token

HttpStatus 400 Error

  • Validation: Argument required
  • Validation: Invalid value

HttpStatus 422 Unprocessable entity

  • Authorization declined

HttpStatus 409 Conflict

  • Invoice already authorized
  • Duplicate InvoiceNumber
  • Authorization is cancelled
  • Authorization already captured
  • Authorization has expired
  • Insufficient debited amount XXX

HttpStatus 501 NotImplemented

  • CompanyNumber XXX not configured
  • SellerNumber XXX not configured at PayEx
  • CompanyNumber XXX missing configuration

HttpStatus 404 NotFound

  • Authorization not found

Below is an example of a problem that will be returned if buyer.nationalConsumerIdentifier.value is not valid in the authorization post request.

Response
HTTP/1.1 400 Error
Content-Type: application/problem+json

{
   "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation",
   "Title": "A validation error occurred",
   "Status": 400,
   "Instance": null,
   "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
   "Problems": [
        {
           "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier"
        }
    ]
}
Created by David Persson on 2019/12/04 09:43