openapi: 3.2.0
info:
version: v2
title: Lemonway DirectKit API 2.0 Money Outs API
servers:
- url: https://ws.lemonway.fr/mb/env-name/prod/directkitrest/
tags:
- name: MoneyOuts
paths:
/v2/moneyouts:
post:
tags:
- MoneyOuts
summary: External Fund Transfer from a Payment Account to a Bank Account
description: 'How does it work?
Select an IBAN if multiple IBAN exist for the wallet. Select an amount, not greater than the balance of the wallet. Call the moneout method, and the system performs the fund transfer to the IBAN if everything is clear, or returns an error message.
The payment account is debited immediately and the money is then received by the owner, in their bank account between 1 to 3 days after, depending on the interbanking system and on the banks (SEPA is faster).
You can ask us to configure your platform so that your comment is included in the bank transfer message so your customer will see it on the bank statement.
The full message will be in the following format "XXXX-YYYY ZZZZ", where :
XXXX is the name of your environment
YYYY is the ID of the Money-Out operation as you see it in the Dashboard
ZZZZ is your comment.
The full message cannot be longer than 35 characters (if longer, it will be cut), and only alphanumeric characters will be allowed(other characters will be replaced by spaces before it''s sent to the bank).'
operationId: MoneyOuts_MoneyOutPostAsync
parameters:
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MoneyOutInput'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MoneyOutOutput'
examples:
response:
value:
transaction:
senderAccountId: pizza56
debitAmount: 1500
IbanId: 0
maskedLabel: FR5830002012300000116235A61
originId: 0
id: 255
method: 0
date: 1784563474
commissionAmount: 100
comment: Order number 2457765AX2
status: 0
executionDate: 0
reference: Dze8778
'401':
description: Unauthorized
'500':
description: InternalServerError
get:
tags:
- MoneyOuts
summary: Search for a Money-Out
description: Use this call to get and check all Money-Out information.
operationId: MoneyOuts_MoneyOutGet
parameters:
- name: transactionid
in: query
description: Money-Out ID
required: false
schema:
type: integer
format: int64
- name: transactionComment
in: query
description: Money-Out Comment
required: false
schema:
type: string
minLength: 0
maxLength: 140
- name: reference
in: query
description: Unique ID Generated by your Server
required: false
schema:
type: string
minLength: 0
maxLength: 50
- name: page
in: query
description: Index start from 1, let null to get all
required: false
schema:
type: integer
format: int32
- name: limit
in: query
description: Default 20, let it null if no pagination
required: false
schema:
type: integer
format: int32
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetMoneyOutTransDetailsOutput'
examples:
response:
value:
transactions:
value:
- senderAccountId: '33612345678'
debitAmount: 1500
IbanId: 0
originId: 0
id: 255
method: 0
date: 1784563474
commissionAmount: 300
comment: Order number 255
status: 3
executionDate: 0
reference: null
'401':
description: Unauthorized
'500':
description: InternalServerError
/v2/moneyouts/iban:
post:
tags:
- MoneyOuts
summary: Add an IBAN to a Payment Account for Money-Outs
description: 'To send Money-Out from the Lemonway payment account to the bank account of your Clients, you need to register their bank account details. This method lets our system to link an IBAN to a payment account.
- Bank account details are only needed for Money-Outs, not for Money-Ins or P2P.
- When you link a new bank account (IBAN format or other ones), the previous details are still active.
- Use IbanUnregisterPut call to deactivate a bank account from a payment account.
- If you wish to use only one bank account per payment account, please contact support.
- An integrated algorithm will validate your IBAN.'
operationId: MoneyOuts_IbanPost
parameters:
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterIBANInput'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterIBANOutput'
examples:
response:
value:
ibanId: 253
status: 5
'401':
description: Unauthorized
'500':
description: InternalServerError
/v2/moneyouts/iban/extended:
post:
tags:
- MoneyOuts
summary: Add Bank Account to a Payment Account for Money-Outs
description: 'You are required to register your client''s bank account details in order to send Money-Out from a Lemonway payment account.
With this method, our system links other bank formats to a payment account.
**Important:** If your client bank account details are in IBAN format this call.
- Client bank account details are **only** required for money-outs.
- When you link a new bank account (IBAN format or other ones), the previous ones are still active.
- Please use IbanUnregisterPut method to deactivate a bank account from a payment account.
- If you wish to use only one bank account per payment account, please contact support.
Depending on bank country code selected or when a USD environment is concerned, 3 fields may be required:
- bankBranchRoutingCode
- bankName
- bankBranchAddress'
operationId: MoneyOuts_IbanExtendedPost
parameters:
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterIBANExtendedInput'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterIBANExtendedOutput'
examples:
response:
value:
ibanId: 253
status: 5
'401':
description: Unauthorized
'500':
description: InternalServerError
/v2/moneyouts/iban/{IbanId}/unregister:
put:
tags:
- MoneyOuts
summary: Disable Bank Information (IBAN) from a Payment Account
description: The UnregisterIBAN method enables you to disable an IBAN from a Payment Account. As a reminder a bank account number (IBAN) is needed to process Money-Out. An IBAN is not needed to perform Money-In on a Payment Account or Peer to Peer transfers between Payments Accounts.
operationId: MoneyOuts_IbanUnregisterPut
parameters:
- name: IbanId
in: path
required: true
schema:
type: integer
format: int64
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnregisterIBANInput'
text/json:
schema:
$ref: '#/components/schemas/UnregisterIBANInput'
application/xml:
schema:
$ref: '#/components/schemas/UnregisterIBANInput'
text/xml:
schema:
$ref: '#/components/schemas/UnregisterIBANInput'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UnregisterIBANInput'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UnregisterIBANOutput'
examples:
response:
value:
id: 253
'401':
description: Unauthorized
'500':
description: InternalServerError
/v2/moneyouts/{accountid}/iban:
get:
tags:
- MoneyOuts
summary: Get the IBAN Associated with a Payment Account
operationId: MoneyOuts_IbanGet
parameters:
- name: accountid
in: path
description: Account ID
required: true
schema:
type: string
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccountIbansOutput'
examples:
response:
value:
ibans:
- id: 98
status: 5
iban: 30002014400000156627A61
swift: CRLYFRPP
holder: Jean Dupont
'401':
description: Unauthorized
'500':
description: InternalServerError
/v2/moneyouts/{transactionid}/cancel:
put:
tags:
- MoneyOuts
summary: Money-Out Cancellation
description: The cancel call lets you cancel a Money-Out/SDD.
operationId: MoneyOuts_CancelPut
parameters:
- name: transactionid
in: path
required: true
schema:
type: integer
format: int64
- name: Authorization
in: header
description: Authorization bearer (OAuth 2)
required: true
schema:
type: string
- name: PSU-Accept-Language
in: header
description: Response language accepted by final client (PSU). English by default
required: false
schema:
type: string
- name: PSU-IP-Address
in: header
description: IP address of the final client (PSU).
required: true
schema:
type: string
- name: PSU-User-Agent
in: header
description: User-agent of the final client (PSU).
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CancelMoneyOutInput'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CancelMoneyOutOutput'
examples:
response:
value:
transaction:
senderAccountId: pizza56
debitAmount: 1500
IbanId: 0
originId: 0
id: 255
method: 0
date: 1784563474
commissionAmount: 300
comment: Order number 255
status: 0
executionDate: 0
reference: null
'401':
description: Unauthorized
'500':
description: InternalServerError
components:
schemas:
AccountIbansOutput:
type: object
properties:
ibans:
description: List of documents that changed since the entry date.
type: array
items:
$ref: '#/components/schemas/Iban'
error:
$ref: '#/components/schemas/Error'
GetMoneyOutTransDetailsOutput:
type: object
properties:
transactions:
$ref: '#/components/schemas/Transactions_TransactionOut'
_links:
$ref: '#/components/schemas/Links'
error:
$ref: '#/components/schemas/Error'
Error:
type: object
properties:
code:
format: int32
type: integer
message:
type: string
psp:
$ref: '#/components/schemas/PSP'
BnplInfo:
type: object
properties:
paymentPlanId:
format: int64
description: Payment Plan ID
type: integer
type:
description: Payment plan type.
type: string
secondInstallmentPaymentDate:
description: 'Second installment payment date.
Format: yyyy-MM-dd'
type: string
deferredPaymentDate:
description: 'Deferred payment date.
Format: yyyy-MM-dd'
type: string
RegisterIBANOutput:
type: object
properties:
ibanId:
format: int64
description: IBAN ID
type: integer
status:
format: int32
description: IBAN Status
1 = None.
2 = Internal.
3 = Not used.
4 = Waiting to be verified by Lemon Way.
5 = Activated.
6 = Rejected by the bank.
7 = Rejected, no owner.
8 = Deactivated.
9 = Rejected.
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
type: integer
error:
$ref: '#/components/schemas/Error'
CancelMoneyOutOutput:
type: object
properties:
transaction:
$ref: '#/components/schemas/TransactionOut'
error:
$ref: '#/components/schemas/Error'
Link:
type: object
properties:
href:
type: string
templated:
type: boolean
readOnly: true
method:
type: string
type:
type: string
deprecation:
type: string
name:
type: string
profile:
type: string
title:
type: string
hreflang:
type: string
Iban:
type: object
properties:
id:
format: int64
description: IBAN ID
type: integer
status:
format: int32
description: Only status 5 allows the use of the IBAN for a Money-Out.
1 = None.
2 = Internal.
3 = Not used.
4 = Waiting to be verified by Lemon Way.
5 = Activated.
6 = Rejected by the bank.
7 = Rejected, no owner.
8 = Deactivated.
9 = Rejected.
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
type: integer
iban:
description: IBAN saved
type: string
swift:
description: SWIFT BIC code associated with the IBAN
type: string
holder:
description: IBAN Holder
type: string
type:
format: int32
description: 'Indicates if a merchant IBAN or a virtual client IBAN
1: Merchant IBAN
2: IBAN virtual client'
type: integer
BankBranchAddress:
required:
- Street
- ZipCode
- City
type: object
properties:
Street:
description: Number and Street
maxLength: 128
minLength: 0
type: string
ZipCode:
description: Postal or Zip Code
maxLength: 16
minLength: 0
type: string
City:
description: City
maxLength: 128
minLength: 0
type: string
UnregisterIBANOutput:
type: object
properties:
id:
format: int64
type: integer
error:
$ref: '#/components/schemas/Error'
TransactionOut:
type: object
properties:
senderAccountId:
description: Debited Account
type: string
debitAmount:
format: int32
description: 'Debited Amount
Amounts are represented in cents (Euros)'
type: integer
IbanId:
format: int64
description: IBAN ID
type: integer
maskedLabel:
type: string
bankStatus:
type: string
PSP:
$ref: '#/components/schemas/PSP'
originId:
format: int64
description: Money-In - ID responsible for the chargeback
type: integer
buyNowPayLaterInfo:
$ref: '#/components/schemas/BnplInfo'
id:
format: int64
description: Transaction ID
type: integer
method:
format: int32
description: "Payment Method \n0 Card \n1 Bank transfer (MoneyIn) \n3 Bank transfer (MoneyOut) \n4 P2P \n13 iDEAL \n14 SEPA DirectDebit \n15 Cheque \n19 Multibanco \n21 MBWAY \n30 BNPL \n35 PayPal\n\n ---\n **Important:** The following services have been discontinued. \n \n16 Neosurf \n17 Sofort \n18 PFS Physical Card \n20 Payshop \n22 Polish Instant Transfer \n23 Pagare \n24 MobilePay\n25 Paytrail\n26 WeChat \n27 P24 \n28 MoneyIn by TPE \n29 Trustly"
type: integer
methodDetails:
format: int32
description: 'Payment Method Details
0 Standard
1 Pay By Bank
0 = STANDARD.
1 = PAY_BY_BANK.
'
enum:
- 0
- 1
type: integer
date:
format: int32
description: Transaction initialization date, UTC Unix timestamp
type: integer
commissionAmount:
format: int32
description: 'Your fee
Amounts are given as integer numbers in cents'
type: integer
comment:
description: Comment
type: string
status:
format: int32
description: "**For the following endpoints uses the below status code** \n \n/v2/accounts/{accountId}/transactions\n/v2/moneyins\n/v2/moneyins/card/direct\n/v2/moneyins/card/{cardid}/rebill\n/v2/moneyins/card/{cardid}/subscription\n/v2/moneyins/{transactionid}/validate\n/v2/moneyins/sdd/init\n/v2/moneyins/sdd\n/v2/moneyins/{transactionid}/cancel\n/v2/refund/{transactionid}\n/v2/refundcreate/{transactionId}\n \n0: Success \n3: Lemonway Error \n4: Pending \n6: PSP error \n7: Cancelled \n16: Validation pending \n\n**For the following endpoints uses the below status code** \n\n/v2/disputes\n/v2/moneyins/bankwire\n/v2/moneyins/card/direct/3dinit\n/v2/moneyouts\n/v2/p2p\n/v2/p2p/{transactionid?}\n \n0: Waiting for finalization \n3: Success \n4: Lemonway Error"
type: integer
executionDate:
format: int32
description: Transaction execution date
type: integer
lemonWayCommission:
$ref: '#/components/schemas/LemonWayCommission'
reference:
description: Unique ID generated by your server
type: string
LemonWayCommission:
type: object
properties:
idp2p:
type: string
amount:
format: int32
description: 'Amounts are represented as integer in cents (Euro)
Represented as an integer in cents (Euro)'
type: integer
RegisterIBANInput:
required:
- accountId
- holder
- iban
type: object
properties:
accountId:
description: Payment Account ID
maxLength: 256
minLength: 0
type: string
holder:
description: 'Registered Bank Account Owner: First and Last name, or Company Name'
maxLength: 256
minLength: 0
type: string
bic:
description: 'BIC/SWIFT Codes are arranged like this : AAAABBCCDDD
AAAA : 4 char for bank code
BB : 2 char for country code
CC : 2 char for location code
DDD : 3 char for branch code'
maxLength: 11
minLength: 8
type: string
iban:
description: IBAN
maxLength: 34
minLength: 15
type: string
domiciliation1:
description: Bank Address Line 1
maxLength: 256
minLength: 1
type: string
domiciliation2:
description: Bank Address Line 2
maxLength: 256
minLength: 1
type: string
comment:
description: Reason for new IBAN if another IBAN is already linked to the Payment Account
maxLength: 512
minLength: 1
type: string
example:
accountId: '33612345678'
holder: Jean Dupont
bic: ABCDEFGHIJK
iban: FR1420041010050500013M02606
domiciliation1: SOMEBANK MONTREUIL
domiciliation2: 56 rue de Lays
comment: Previous bank account closed
UnregisterIBANInput:
required:
- wallet
type: object
properties:
wallet:
description: Payment Account ID
maxLength: 256
minLength: 0
type: string
example:
wallet: '33612345678'
RegisterIBANExtendedOutput:
type: object
properties:
ibanId:
format: int64
description: IBAN ID
type: integer
status:
format: int32
description: IBAN Status
1 = None.
2 = Internal.
3 = Not used.
4 = Waiting to be verified by Lemon Way.
5 = Activated.
6 = Rejected by the bank.
7 = Rejected, no owner.
8 = Deactivated.
9 = Rejected.
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
type: integer
error:
$ref: '#/components/schemas/Error'
CancelMoneyOutInput:
type: object
properties:
accountId:
description: Payment Account ID
maxLength: 256
minLength: 1
type: string
example:
accountId: Pizza75
RegisterIBANExtendedInput:
required:
- wallet
- holderName
- accountNumber
- bankCountry
type: object
properties:
wallet:
description: Payment Account ID
maxLength: 256
minLength: 0
type: string
accountType:
format: int32
description: Account Type, by default Other
0 = Other.
1 = IBAN.
2 = BBAN/RIB.
enum:
- 0
- 1
- 2
type: integer
holderName:
description: 'The registered bank account owner: First and Last name, or Company Name'
maxLength: 256
minLength: 0
type: string
accountNumber:
description: Account Number. The format depends on the account type.
maxLength: 34
minLength: 0
type: string
holderCountry:
description: Country of the beneficiary. Two-letter country code (ISO alpha-2) for example, France=FR
maxLength: 2
minLength: 2
type: string
bicCode:
description: 'BIC/SWIFT codes are arranged like this: AAAABBCCDDD
AAAA: 4 character for bank code
BB: 2 char for country code
CC: 2 char for location code
DDD: 3 char for branch code'
maxLength: 11
minLength: 8
type: string
bankName:
description: 'Bank Name. This field is mandatory in the following circumstances: