Entur Developer
Payments

Credits

Server

Create and update credits. Create and execute credit transactions.


Search credits

GET
https://api.entur.io/sales
/v1/credits

Returns matching credits with all its transactions. Query params are able to used expression like gt:1 for searching. Other expressions can contain eq, ne, gt, gte, lt, lte.

Search credits › query Parameters

creditId
​string[] · style: form · explode: true

ID of Credit entity

customerNumber
​string[] · style: form · explode: true

Internal numeric ID of customer which Credit is linked to

orderId
​string[] · style: form · explode: true

ID of Order entity that Credit is linked to

orderVersion
​string[] · style: form · explode: true

Version of Credit entity

organisationId
​string[] · style: form · explode: true

ID of organisation Credit entity is linked to

page
​integer · int32 · style: form · explode: true

Selects a specific page in the collection

Default: 1
perPage
​integer · int32 · style: form · explode: true

Selects the number of elements per page

Default: 30
reimbursementMethod
​string[] · style: form · explode: true

Which specific payment transfer type is used for the CreditTransactions linked to the Credit. E.g. VIPPS, VISA, MASTERCARD

reimbursementTypeGroup
​string[] · style: form · explode: true

Which of the several groups of ways to transfer payment the CreditTransactions linked to the Credit entity is. E.g. MOBILE, PAYMENTCARD, CASH

rrn
​string[] · style: form · explode: true

Retrieval Reference Number of CreditTransaction linked to Credit entity

settlementId
​string[] · style: pipeDelimited

ID of settlement the transaction is linked to.

status
​string[] · style: form · explode: true

Either CREATED or CREDITED depending on whether the actual credit action has been performed

totalCreditAmount
​string[] · style: form · explode: true

Total amount of credit, with one or more credit transactions

transactionId
​string[] · style: form · explode: true

Id of (one of) the PaymentTransaction(s) performed as part of the credit

Search credits › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Search credits › Responses

OK

Page displays a subset of a list of entities
​CreditResponse[] · readOnly · required

Items on a specific page

Example: [{"active":true,"creditId":1,"creditTransactions":[{"amount":"450.00","createdAt":"2025-01-12T16:08:03Z","creditedAt":"2025-01-12T16:13:13Z","currency":"NOK","newGiftCardId":"0068a450-066f-442d-8117-1543fe2b1e0e","paymentId":1,"paymentTransactionId":10,"reimbursementMethod":"VISA","reimbursementTypeGroup":"PAYMENTCARD","rrn":"000123456123","status":"CREATED","transactionData":{"extraData":"any extra data you want to add"},"updatedAt":"2025-01-12T16:13:13Z"}],"currency":"NOK","customerNumber":"123456789","orderId":"ABCD1234","orderVersion":1,"organisationId":1,"settlementId":1245,"totalCreditAmount":"450.00"}]
totalItems
​integer · int64 · readOnly · required

Total number of items

Example: 72
totalPages
​integer · int64 · readOnly · required

Total number of pages available to browse

Example: 9

Create credit transactions.

POST
https://api.entur.io/sales
/v1/credits

Creates credit transactions for all the payment transactions specified. The total credit amount must match the sum of the individual transactions, and each transaction cannot be higher than the paid amount.

Create credit transactions. › Headers

Entur-POS
​string · required · style: simple

Point-of-sale identifier.

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Entur-Distribution-Channel
​string · style: simple

Distribution channel identifier.

Create credit transactions. › Request Body

Information used to create a Credit.
​CreditTransactionRequest[] · required

List of individual transactions to credit.

orderId
​string · required

ID of the order this credit belongs to.

Example: HE8NDS7XY
orderVersion
​integer · int32 · required

Version of the order this credit belongs to.

Example: 1
totalCreditAmount
​string · maxLength: 19 · pattern: ^[1-9][0-9]{0,17}\.[… · required

Amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
currency
​string · pattern: [A-Z]{3}

The currency used for this credit. Default value is 'NOK'

Example: NOK
Default: NOK
customerNumber
​string

Customer who owns this credit. This value is only considered for privileged client (internal and partner tenants.

Example: 123456789
settlementId
​integer · int64

Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.

Example: 1873

Create credit transactions. › Responses

Ok

Information about credits performed on an order.
creditId
​integer · int64 · required

Identification of this credit resource.

Example: 1
​CreditTransactionResponse[] · required

List of individual transactions to credit.

Example: [{"amount":"450.00","createdAt":"2025-01-12T16:08:03Z","creditedAt":"2025-01-12T16:13:13Z","currency":"NOK","newGiftCardId":"0068a450-066f-442d-8117-1543fe2b1e0e","paymentId":1,"paymentTransactionId":10,"reimbursementMethod":"VISA","reimbursementTypeGroup":"PAYMENTCARD","rrn":"000123456123","status":"CREATED","transactionData":{"extraData":"any extra data you want to add"},"updatedAt":"2025-01-12T16:13:13Z"}]
orderId
​string · required

ID of the order this payment belongs to.

Example: HE8NDS7XY
orderVersion
​integer · int32 · required

Version of the order this credit belongs to.

Example: 1
totalCreditAmount
​string · required

Total amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
active
​boolean

If active is false, credit is considered uneditable. The only way to change this property is through an internal Admin endpoint or the mergePatch endpoint. Editable: true

Example: false
currency
​string

The currency used for this credit.

Example: NOK
customerNumber
​string

ID of the customer who owns this credit.

Example: 123456789
organisationId
​integer · int64

ID of the organisation who created this credit.

Example: 1
settlementId
​integer · int64

Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.


Find a credit.

GET
https://api.entur.io/sales
/v1/credits/{creditId}

Returns the credit with all its credit transactions. The credit transactions have each backreferences to their corresponding payment transaction.

Find a credit. › path Parameters

creditId
​integer · int64 · required · style: simple

creditId

Find a credit. › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Find a credit. › Responses

Ok

Information about credits performed on an order.
creditId
​integer · int64 · required

Identification of this credit resource.

Example: 1
​CreditTransactionResponse[] · required

List of individual transactions to credit.

Example: [{"amount":"450.00","createdAt":"2025-01-12T16:08:03Z","creditedAt":"2025-01-12T16:13:13Z","currency":"NOK","newGiftCardId":"0068a450-066f-442d-8117-1543fe2b1e0e","paymentId":1,"paymentTransactionId":10,"reimbursementMethod":"VISA","reimbursementTypeGroup":"PAYMENTCARD","rrn":"000123456123","status":"CREATED","transactionData":{"extraData":"any extra data you want to add"},"updatedAt":"2025-01-12T16:13:13Z"}]
orderId
​string · required

ID of the order this payment belongs to.

Example: HE8NDS7XY
orderVersion
​integer · int32 · required

Version of the order this credit belongs to.

Example: 1
totalCreditAmount
​string · required

Total amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
active
​boolean

If active is false, credit is considered uneditable. The only way to change this property is through an internal Admin endpoint or the mergePatch endpoint. Editable: true

Example: false
currency
​string

The currency used for this credit.

Example: NOK
customerNumber
​string

ID of the customer who owns this credit.

Example: 123456789
organisationId
​integer · int64

ID of the organisation who created this credit.

Example: 1
settlementId
​integer · int64

Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.


Update the credit

PATCH
https://api.entur.io/sales
/v1/credits/{creditId}

The credit will be patched with specified fields. NULL values specifically set is considered as removing the field. In other words, only included fields will be modified. For more information about the PATCH endpoint and the merge-patch content-type, please refer to RFC7396.

Update the credit › path Parameters

creditId
​integer · int64 · required · style: simple

creditId

Update the credit › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Update the credit › Request Body

Request body used to update a credit. The properties described here are the only properties that can be updated on a credit.
totalCreditAmount
​string · required

Amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
​CreditTransactionRequest[]

List of individual transactions to credit.

Example: [{"amount":"450.00","currency":"NOK","paymentTransactionId":1,"reimbursementTypeGroup":"PAYMENTCARD"}]
active
​boolean

Active is used during activation of credit

Example: true

Update the credit › Responses

OK

Information about credits performed on an order.
creditId
​integer · int64 · required

Identification of this credit resource.

Example: 1
​CreditTransactionResponse[] · required

List of individual transactions to credit.

Example: [{"amount":"450.00","createdAt":"2025-01-12T16:08:03Z","creditedAt":"2025-01-12T16:13:13Z","currency":"NOK","newGiftCardId":"0068a450-066f-442d-8117-1543fe2b1e0e","paymentId":1,"paymentTransactionId":10,"reimbursementMethod":"VISA","reimbursementTypeGroup":"PAYMENTCARD","rrn":"000123456123","status":"CREATED","transactionData":{"extraData":"any extra data you want to add"},"updatedAt":"2025-01-12T16:13:13Z"}]
orderId
​string · required

ID of the order this payment belongs to.

Example: HE8NDS7XY
orderVersion
​integer · int32 · required

Version of the order this credit belongs to.

Example: 1
totalCreditAmount
​string · required

Total amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
active
​boolean

If active is false, credit is considered uneditable. The only way to change this property is through an internal Admin endpoint or the mergePatch endpoint. Editable: true

Example: false
currency
​string

The currency used for this credit.

Example: NOK
customerNumber
​string

ID of the customer who owns this credit.

Example: 123456789
organisationId
​integer · int64

ID of the organisation who created this credit.

Example: 1
settlementId
​integer · int64

Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.


Execute credit.

POST
https://api.entur.io/sales
/v1/credits/{creditId}/execute

Executes a credit operation on all the payment transactions referenced in this credit. The operation will execute sequentially for all payment transactions. If one of the operations fails, this call responds with the specific error response for that payment transaction. Any previous successful credit operation cannot be undone, and for this reason it is highly recommended to check the status of each credit transaction after en error response is returned. More detail on the individual payment transaction can be found in the transaction summary by calling GET on the specific payment transaction. This call is idempotent, which means it is safe to repeatedly retry without any creditTransactions being executed more than once.

Execute credit. › path Parameters

creditId
​integer · int64 · required · style: simple

creditId

Execute credit. › Headers

Entur-POS
​string · required · style: simple

Point-of-sale identifier.

Entur-Distribution-Channel
​string · style: simple

Distribution channel identifier.

Entur-Initiated-By
​string · style: simple

Organisation identifier of the party that initiated the credit. Used to determine downstream side effects such as webhook delivery. A client may only supply an organisation it has credit access to (its own, or one it holds credit, on-behalf-of, or global access for); an unauthorised claim is rejected. Defaults to the calling client's organisation when omitted.

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Execute credit. › Responses

Ok

Information about credits performed on an order.
creditId
​integer · int64 · required

Identification of this credit resource.

Example: 1
​CreditTransactionResponse[] · required

List of individual transactions to credit.

Example: [{"amount":"450.00","createdAt":"2025-01-12T16:08:03Z","creditedAt":"2025-01-12T16:13:13Z","currency":"NOK","newGiftCardId":"0068a450-066f-442d-8117-1543fe2b1e0e","paymentId":1,"paymentTransactionId":10,"reimbursementMethod":"VISA","reimbursementTypeGroup":"PAYMENTCARD","rrn":"000123456123","status":"CREATED","transactionData":{"extraData":"any extra data you want to add"},"updatedAt":"2025-01-12T16:13:13Z"}]
orderId
​string · required

ID of the order this payment belongs to.

Example: HE8NDS7XY
orderVersion
​integer · int32 · required

Version of the order this credit belongs to.

Example: 1
totalCreditAmount
​string · required

Total amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.

Example: 450.00
active
​boolean

If active is false, credit is considered uneditable. The only way to change this property is through an internal Admin endpoint or the mergePatch endpoint. Editable: true

Example: false
currency
​string

The currency used for this credit.

Example: NOK
customerNumber
​string

ID of the customer who owns this credit.

Example: 123456789
organisationId
​integer · int64

ID of the organisation who created this credit.

Example: 1
settlementId
​integer · int64

Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.


Did you find what you were looking for?