Skip to content

A session ended

POST

Sent to your notification URL once per session ending: how it ended, what was taken, and every tranche with the PSP reference of each operation, the card network, and the card alias when the order asked to register the means of payment. Declare that URL on your account, or pass notificationUrl when creating the session.

Media typeapplication/json

The end of a session: how it ended, what was taken, and every tranche with its PSP operations.

object
event
required
string
Allowed value: session-ended
notificationId
required

Stable across retries: deduplicate on it.

string
orderId
required

Your own order reference, as you created the session with it.

string
extraData

Your own extraData, as you created the session with it — absent if you gave none.

string
status
required

How the session ended. PAID: the order is paid. ABORTED: your customer gave up. EXPIRED: the session reached its time limit. AWAITED_REFUSED: a lender refused the financing — nothing was charged.

string
Allowed values: PAID ABORTED EXPIRED AWAITED_REFUSED
total
required

The order total.

object
amount
required

Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.

integer
currency
required

ISO 4217 code, uppercase. One currency per session.

string
/^[A-Z]{3}$/
captured
required

What was actually taken — zero on an abandoned or expired session.

object
amount
required

Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.

integer
currency
required

ISO 4217 code, uppercase. One currency per session.

string
/^[A-Z]{3}$/
terms

The terms the session declared, when it declared some.

Array<object>
object
label
required

Your wording, shown as-is — never translated, like statementDescriptor.

string
>= 1 characters
url
required

Where the full document lives — required: your customer must be able to read what they accept.

string format: uri
termsAcceptedAt

When your customer accepted them — epoch milliseconds. Absent if the page never asked.

integer
attempts
required

Every tranche of the order, oldest first.

Array<object>
object
attemptId
required

Our identifier for this tranche.

string format: uuid
method
required

The payment method archetype.

string
Allowed values: card applepay wero paypal oney ancv
methodId
required

The method instance you declared when creating the session (card, card-amex…).

string
cardScheme

The card network this tranche ran on — on a co-badged card, the one the cardholder chose. Card tranches only; an absence means the PSP named none we could place, never that there was none.

string
Allowed values: cb visa mastercard amex maestro diners discover jcb china_union_pay
cardCode

The card as the PSP masked it: its first six and last four digits, the rest X. Card tranches only, and only when the PSP gave it — never a full number.

string
cardCountry

The country of the card’s issuer, ISO 3166 alpha-2 — when the PSP gave it.

string
ancvShopId

The ANCV shop this tranche was billed under — the one the session named, or your account’s default. ANCV tranches only.

string
bnplPlan

The financing plan your customer chose: how many installments, with or without fees. Financed tranches only.

object
installments
required

How many instalments the payer picked — 3 for a 3× plan.

integer
>= 2
withFees
required

Whether that plan carries fees. The pair (installments, withFees) names a plan uniquely.

boolean
provider
required

Which PSP served this tranche, and so which back-office its providerRefs live in.

string
status
required

Where this attempt stands. AUTHORIZING: dispatched, verdict still due (always out-of-band). AUTHORIZED: the money is held. DECLINED: refused, nothing taken. CANCELLED: the payer backed out at the PSP. CAPTURED: taken. VOIDED: the hold was released.

string
Allowed values: AUTHORIZING AUTHORIZED DECLINED CANCELLED CAPTURED VOIDED
requested
required

What the tranche asked for.

object
amount
required

Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.

integer
currency
required

ISO 4217 code, uppercase. One currency per session.

string
/^[A-Z]{3}$/
granted
required

What the PSP actually granted — below requested on a partial authorization.

object
amount
required

Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.

integer
currency
required

ISO 4217 code, uppercase. One currency per session.

string
/^[A-Z]{3}$/
cardAlias

The card registration this tranche produced, when the session asked to register the means.

string
operations
required

Every PSP operation of this tranche, oldest first. How many, and of which type, depends on the method and the PSP: a card is an authorization then a capture, a Wero payment a single payment.

Array<object>
object
type
required

What this operation asked the PSP: hold the money (authorization), take it in one go (payment), take a hold (capture), release it (void), send money back (refund), or debit the registered card later (debit).

string
Allowed values: authorization payment capture void refund debit
status
required

Where the operation stands. pending means the verdict is still due — it always arrives out-of-band.

string
Allowed values: pending succeeded failed cancelled
amount
required

What this operation moved.

object
amount
required

Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.

integer
currency
required

ISO 4217 code, uppercase. One currency per session.

string
/^[A-Z]{3}$/
providerRef

The PSP’s own reference for this operation — what to search for in its back-office.

string
statusCode

The PSP’s own code for its verdict, successes included.

string
statusMessage

The PSP’s own sentence for its verdict, as it said it.

string
Example
{
"event": "session-ended",
"notificationId": "019f18f1-cbf4-762f-bd94-776f523c9ffb:PAID",
"orderId": "EP-123456",
"status": "PAID",
"total": {
"amount": 100000,
"currency": "EUR"
},
"captured": {
"amount": 100000,
"currency": "EUR"
},
"attempts": [
{
"attemptId": "019f18f2-6ceb-729c-98b4-d60271a718e0",
"method": "card",
"methodId": "card",
"cardScheme": "visa",
"cardCode": "497010XXXXXX0007",
"cardCountry": "FR",
"provider": "dalenys",
"status": "CAPTURED",
"requested": {
"amount": 60000,
"currency": "EUR"
},
"granted": {
"amount": 60000,
"currency": "EUR"
},
"operations": [
{
"type": "authorization",
"status": "succeeded",
"amount": {
"amount": 60000,
"currency": "EUR"
},
"providerRef": "A180635471",
"statusCode": "0000",
"statusMessage": "Successful Operation"
},
{
"type": "capture",
"status": "succeeded",
"amount": {
"amount": 60000,
"currency": "EUR"
},
"providerRef": "A180635474",
"statusCode": "0000",
"statusMessage": "Successful Operation"
}
]
},
{
"attemptId": "019f18f3-418c-729c-98b4-e2d7be7c6163",
"method": "wero",
"methodId": "wero",
"provider": "payplug-retail",
"status": "CAPTURED",
"requested": {
"amount": 40000,
"currency": "EUR"
},
"granted": {
"amount": 40000,
"currency": "EUR"
},
"operations": [
{
"type": "payment",
"status": "succeeded",
"amount": {
"amount": 40000,
"currency": "EUR"
},
"providerRef": "pay_6GEUtvaN0NH68vioAWb9LF"
}
]
}
]
}

Received. Answer 200 with the body OK in text/plain: any other answer — another status, another content type, another body — is retried at t+1 second, t+1 minute, then t+5 minutes.

Media typetext/plain
string
Allowed value: OK