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
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"
}
]
}
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
Property | Data type | Format | Description |
---|---|---|---|
@id | string | Uri | |
accountProfile | string | Maxlength: 50 | |
title | string | Maxlength: 50 | |
currency | string | ISO 4217 | |
creditLimit | decimal | ||
interestFreePurchaseMonth | bool | ISO 8601 | |
monthlyAdminFee | decimal | ||
reminderFee | decimal | ||
termsAndConditions.standardEuropeeanAgreements | string | Uri | |
termsAndConditions.accountTerms | string | Uri |
Applications
List
Request
GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json
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
Host: -
Authorization: Bearer <Token>
Content-Type: application/json
Post
Request
GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json
{
"nationalConsumerIdentifier" : {
"value" : "19101010-1010",
"countryCode" : "SE"
},
"creditLimit": 5000.00,
"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"
},
"kyc": {
"parameters":[
{
"name": "employment",
"value": "self-employed"
},
{
"name": "employment-since",
"value": "2016-09"
},
{
"name": "monthlyIncome",
"value": "10000.00"
},
{
"name": "monthlyPurchaseAmount",
"value": "3000.00"
},
{
"name": "monthlyNumberOfDeposits",
"value": "1-2"
},
]
},
"kycAlternativ2": {
"parameters":[
{
"name": "employment",
"type": "string",
"stringValue": "self-employed"
},
{
"name": "employment-since",
"type": "date",
"dateValue": "2016-09"
},
{
"name": "monthlyIncome",
"type": "decimal",
"decimalValue": 10000.00
},
{
"name": "monthlyPurchaseAMount",
"type": "decimal",
"decimalValue": 3000.00
},
{
"name": "monthlyNumberOfDeposits",
"type": "string",
"stringValue": "1-2"
},
]
},
}
Host: -
Authorization: Bearer <Token>
Content-Type: application/json
{
"nationalConsumerIdentifier" : {
"value" : "19101010-1010",
"countryCode" : "SE"
},
"creditLimit": 5000.00,
"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"
},
"kyc": {
"parameters":[
{
"name": "employment",
"value": "self-employed"
},
{
"name": "employment-since",
"value": "2016-09"
},
{
"name": "monthlyIncome",
"value": "10000.00"
},
{
"name": "monthlyPurchaseAmount",
"value": "3000.00"
},
{
"name": "monthlyNumberOfDeposits",
"value": "1-2"
},
]
},
"kycAlternativ2": {
"parameters":[
{
"name": "employment",
"type": "string",
"stringValue": "self-employed"
},
{
"name": "employment-since",
"type": "date",
"dateValue": "2016-09"
},
{
"name": "monthlyIncome",
"type": "decimal",
"decimalValue": 10000.00
},
{
"name": "monthlyPurchaseAMount",
"type": "decimal",
"decimalValue": 3000.00
},
{
"name": "monthlyNumberOfDeposits",
"type": "string",
"stringValue": "1-2"
},
]
},
}
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"
},
"kyc": {
"parameters":[
{
"name": "employment",
"value": "self-employed"
},
{
"name": "employment-since",
"value": "2016-09"
},
{
"name": "monthlyIncome",
"value": "10000.00"
},
{
"name": "monthlyPurchaseAmount",
"value": "3000.00"
},
{
"name": "monthlyNumberOfDeposits",
"value": "1-2"
},
]
},
"kycAlternativ2": {
"parameters":[
{
"name": "employment",
"type": "string",
"stringValue": "self-employed"
},
{
"name": "employment-since",
"type": "date",
"dateValue": "2016-09"
},
{
"name": "monthlyIncome",
"type": "decimal",
"decimalValue": 10000.00
},
{
"name": "monthlyPurchaseAMount",
"type": "decimal",
"decimalValue": 3000.00
},
{
"name": "monthlyNumberOfDeposits",
"type": "string",
"stringValue": "1-2"
},
]
},
"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"
}
]
}
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"
},
"kyc": {
"parameters":[
{
"name": "employment",
"value": "self-employed"
},
{
"name": "employment-since",
"value": "2016-09"
},
{
"name": "monthlyIncome",
"value": "10000.00"
},
{
"name": "monthlyPurchaseAmount",
"value": "3000.00"
},
{
"name": "monthlyNumberOfDeposits",
"value": "1-2"
},
]
},
"kycAlternativ2": {
"parameters":[
{
"name": "employment",
"type": "string",
"stringValue": "self-employed"
},
{
"name": "employment-since",
"type": "date",
"dateValue": "2016-09"
},
{
"name": "monthlyIncome",
"type": "decimal",
"decimalValue": 10000.00
},
{
"name": "monthlyPurchaseAMount",
"type": "decimal",
"decimalValue": 3000.00
},
{
"name": "monthlyNumberOfDeposits",
"type": "string",
"stringValue": "1-2"
},
]
},
"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
Property | Data type | Format | Description |
---|---|---|---|
@id | string | Maxlength: | |
nationalConsumerIdentifier.value | string | YYYYMMDD-NNNC | A valid swedish "personnummer" |
nationalConsumerIdentifier.countryCode | string | ISO 3166-1 alpha-2 | |
status | string | Maxlength: 25 |
|
customerNo | string | Maxlength: 50 | |
emailAddress | string | Maxlength: 254 Regex pattern: [^@]+@[^\.]+\..+ | |
cellPhone | string | Maxlength: 15 | |
ipAddress | string | Maxlength: 43 Regex pattern: [a-z0-9.:/]* | |
LegalAddress.name | string | Maxlength: 72 | end-customer fullname |
LegalAddress.streetAddress | string | Maxlength: 35 | |
LegalAddress.city | string | Maxlength: 30 | |
LegalAddress.coAddress | string | Maxlength: 35 | |
LegalAddress.zipCode | string | Maxlength: 15 | |
LegalAddress.countryCode | string | ISO 3166-1 alpha-2 | |
account | string | Uri | Reference to created account |
Sign-agreement (Operation)
Request
Request
GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications/NNN/sign-agreement HTTP/1.1
Host: -
Authorization: Bearer <Token>
Content-Type: application/json
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",
}
Content-Type: application/json
{
"createdAccount" : "https://api.payex.com/ledger/credit-account/v1/123/accounts/123456",
}
Resource properties
Property | Data type | Format | Description |
---|---|---|---|
createdAccount | string | Uri |
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"
}
]
}
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"
}
]
}