Payer Docs
Search
Payer docsAPI - PlatformAPI - SignUpPayer.eu
HomePayer DocsPayer B2BPayer B2B EventsPayer B2B SignUp
Payer B2B SignUp
v1.0
Payer B2B SignUp
Authentication
Onboarding
POSTCreates a new session.
GETGets information of a session.
POSTCallback

Payer B2B SignUp 1.0.0

Onboarding API

Server
example.com
Server Variables

Authentication

apiKey Bearer

This header should contain your Oauth2 Token obtained from the Payer API Platform.

Fields
KeyIn
AuthorizationHeader

Onboarding

Everything needed to onboard new & existing customers

Endpoints
POST
/api/v1/onboard
GET
/api/v1/onboard/sessions/{sessionId}
POST
/{merchantCallbackUrl}

Creates a new session.

Called to initiate a new onboarding session. The SDK url in the response can be used to load the Javascript SDK that can be used to initialize the frontend Widget using the provided clientToken. The sessionId in the response can be used to associate callbacks from Payer to this particular session.

Auth
Request Body application/json
CreateSessionRequestobject
callbackUrlstring

The URL to where you'd like to receive callbacks for this session

maxLength: 512

minLength: 0

countryCodestring

The country code of your shop/webpage

Enum: SE

currencyCodestring

The currency code you'd like to use for this session

Enum: SEK

languageCodestring

The language code for the session, determines which language will be used in the Payer widget. If an unsupported language was chosen it will default to English

Enum: en,sv

amountnumber

The amount, in cents, that the buyer has/wants to shop for. The amount is used during credit checking.

buyerobject

The buyer information to prefill the session with

firstNamestring
lastNamestring
emailstring
phoneNumberstring
externalReferencestring

Your reference for this session. It can be useful to have the same reference when placing the order.

maxLength: 48

POST /api/v1/onboard
xxxxxxxxxx
 
curl --request POST \
 --url 'https://example.com/api/v1/onboard' \
 --header 'Authorization: {Authorization}' \
 --data '{
  "callbackUrl": "{string}",
  "countryCode": "{string}",
  "currencyCode": "{string}",
  "languageCode": "{string}",
  "amount": "{number}",
  "buyer": {
    "firstName": "{string}",
    "lastName": "{string}",
    "email": "{string}",
    "phoneNumber": "{string}"
  },
  "externalReference": "{string}"
}'
Copy
Responses application/json
200

OK

CreateSessionResponseobject
clientTokenstring

Your clientToken for this session that will be used in when initiating the Frontend SDK. It's safe to expose to clients/frontends.

sdkUrlstring

The URL that can be used to load the Frontend SDK from the correct environment (depending on which environment the backend call was made towards)

sessionIdstring

An ID for this particular session. It should not be exposed to clients/frontends! This is meant to be kept in your backend system, and can later be used to correlate callbacks from Payer to specific customers/sessions.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

Response
xxxxxxxxxx
 
{
 "clientToken": "{string}",
 "sdkUrl": "{string}",
 "sessionId": "{string}"
}
Copy

Gets information of a session.

Called to get the information of an onboarding session. The information is the same as the one from the callback. The information will only be returned if the ordering customer has finished the widget flow.

Auth
Path Params
sessionIdstring
GET /api/v1/onboard/sessions/{sessionId}
xxxxxxxxxx
 
curl --get \
 --url 'https://example.com/api/v1/onboard/sessions/%7BsessionId%7D' \
 --header 'Authorization: {Authorization}'
Copy
Responses application/json
200

OK

CallbackRequestobject
creditDecisionobject

Contains the result of the credit decision

resultstring

Approval status of the credit decision. Can be APPROVED, REJECTED, CONTROL.

Enum: APPROVED,REJECTED,CONTROL

limitAmountnumber

The amount of credit that is allowed for this customer.

limitAmountCurrencyCodestring

Enum: SEK

verificationsarray[object]

The verifications (ID Check etc.) that have been performed already or that are pending input from customer

typestring

See general product documentation for more information about the different types.

Enum: APPROVER_VERIFICATION,APPROVER_SIGN,BANK_ID_VERIFICATION,EMAIL_VERIFICATION,CREDIT_CHECK

statusstring

See general product documentation for the meaning of the different statuses.

Enum: PENDING,FAILED,COMPLETED,MANUAL_CONTROL,ERROR

customerobject

The person that completed the onboarding flow

firstNamestring
lastNamestring
emailstring
phoneNumberstring
deliveryAddressobject
namestring
streetAddress1string
streetAddress2string
statestring
zipCodestring
citystring
invoiceAddressobject
namestring
streetAddress1string
streetAddress2string
statestring
zipCodestring
citystring
companyobject

The company that the person placed the order on behalf of

regNumberstring
countryCodestring
legalNamestring
doingBusinessAsNamestring
vatIdstring
sessionStatusstring

The current status of this session. See general product documentation for the meaning of the different statuses.

Enum: ERROR,FAILED,STARTED,MANUAL_CONTROL,PENDING,COMPLETED

sessionIdstring

The session ID that this callback refers to. This can be correlated to the session ID that was returned when creating the session initially.

externalReferencestring

The reference you provided when creating new session.

maxLength: 48

Expand 
400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

Response
xxxxxxxxxx
 
{
 "creditDecision": {
  "result": "{string}",
  "limitAmount": "{number}",
  "limitAmountCurrencyCode": "{string}"
 },
 "verifications": [
  {
   "type": "{string}",
   "status": "{string}"
  }
 ],
 "customer": {
  "firstName": "{string}",
  "lastName": "{string}",
  "email": "{string}",
  "phoneNumber": "{string}"
 },
 "deliveryAddress": {
  "name": "{string}",
  "streetAddress1": "{string}",
  "streetAddress2": "{string}",
  "state": "{string}",
  "zipCode": "{string}",
  "city": "{string}"
 },
 "invoiceAddress": {
  "name": "{string}",
  "streetAddress1": "{string}",
  "streetAddress2": "{string}",
  "state": "{string}",
  "zipCode": "{string}",
  "city": "{string}"
 },
 "company": {
  "regNumber": "{string}",
  "countryCode": "{string}",
  "legalName": "{string}",
  "doingBusinessAsName": "{string}",
  "vatId": "{string}"
 },
 "sessionStatus": "{string}",
 "sessionId": "{string}",
 "externalReference": "{string}"
}
Copy

Callback

Called by Payer when the status of the onboarding session has been updated. This usually means that the customer has completed the flow, and all data is available. Or that an Pending action has been completed, for example that an approver has signed the session.

The URL called is the URL supplied when creating the session.

Auth
Path Params
merchantCallbackUrlstring
Request Body application/json
CallbackRequestobject
creditDecisionobject

Contains the result of the credit decision

resultstring

Approval status of the credit decision. Can be APPROVED, REJECTED, CONTROL.

Enum: APPROVED,REJECTED,CONTROL

limitAmountnumber

The amount of credit that is allowed for this customer.

limitAmountCurrencyCodestring

Enum: SEK

verificationsarray[object]

The verifications (ID Check etc.) that have been performed already or that are pending input from customer

typestring

See general product documentation for more information about the different types.

Enum: APPROVER_VERIFICATION,APPROVER_SIGN,BANK_ID_VERIFICATION,EMAIL_VERIFICATION,CREDIT_CHECK

statusstring

See general product documentation for the meaning of the different statuses.

Enum: PENDING,FAILED,COMPLETED,MANUAL_CONTROL,ERROR

customerobject

The person that completed the onboarding flow

firstNamestring
lastNamestring
emailstring
phoneNumberstring
deliveryAddressobject
namestring
streetAddress1string
streetAddress2string
statestring
zipCodestring
citystring
invoiceAddressobject
namestring
streetAddress1string
streetAddress2string
statestring
zipCodestring
citystring
companyobject

The company that the person placed the order on behalf of

regNumberstring
countryCodestring
legalNamestring
doingBusinessAsNamestring
vatIdstring
sessionStatusstring

The current status of this session. See general product documentation for the meaning of the different statuses.

Enum: ERROR,FAILED,STARTED,MANUAL_CONTROL,PENDING,COMPLETED

sessionIdstring

The session ID that this callback refers to. This can be correlated to the session ID that was returned when creating the session initially.

externalReferencestring

The reference you provided when creating new session.

maxLength: 48

Expand 
POST /{merchantCallbackUrl}
xxxxxxxxxx
 
curl --request POST \
 --url 'https://example.com/%7BmerchantCallbackUrl%7D' \
 --data '{
  "creditDecision": {
    "result": "{string}",
    "limitAmount": "{number}",
    "limitAmountCurrencyCode": "{string}"
  },
  "verifications": [
    {
      "type": "{string}",
      "status": "{string}"
    }
  ],
  "customer": {
    "firstName": "{string}",
    "lastName": "{string}",
    "email": "{string}",
    "phoneNumber": "{string}"
  },
  "deliveryAddress": {
    "name": "{string}",
    "streetAddress1": "{string}",
    "streetAddress2": "{string}",
    "state": "{string}",
    "zipCode": "{string}",
    "city": "{string}"
  },
  "invoiceAddress": {
    "name": "{string}",
    "streetAddress1": "{string}",
    "streetAddress2": "{string}",
    "state": "{string}",
    "zipCode": "{string}",
    "city": "{string}"
  },
  "company": {
    "regNumber": "{string}",
    "countryCode": "{string}",
    "legalName": "{string}",
    "doingBusinessAsName": "{string}",
    "vatId": "{string}"
  },
  "sessionStatus": "{string}",
  "sessionId": "{string}",
  "externalReference": "{string}"
}'
Copy
Responses application/json
200

OK

objectobject
Response
xxxxxxxxxx
 
{}
Copy
Powered By