Deposit
Initiating a Deposit via Payment Method API
To initiate a deposit for a user, you need to send a POST request to the following endpoint. The request body must be in JSON format and include the following parameters:
Create Deposit
POST
/api/v4/paymentmethod/deposit
Headers
Content-Type
application/json
x-api-key
<x-api-key>
Body
username
string
The user's unique username. It should be dynamically generated or retrieved from your user database.
firstName
string
The user's first name. If the user has a middle name, include it in the firstName
field (e.g., Mehmet Ali).
lastName
string
The user's last name.
amount
decimal
The deposit amount in the smallest currency unit (e.g., cents, pence).
currency
string
The currency of the deposit amount (e.g., TRY, USD, EUR, GBP).
reference
string
A unique identifier for the transaction, typically a UUID or your unique transaction Id.
paymentMethod
integer
The identifier number for the selected payment method.
swiftCode
string
Required for paymentMethod
values such as BankTransfer or CryptoCurrency. Represents the SWIFT code of the destination account (if applicable).
returnUrl
string
Optional. Required only when a payment page is used. This is the URL the user will be redirected to after completing the deposit process.
Response
{
"id": 1299949,
"username": "Name.McGlynn",
"firstName": "Patience",
"lastName": "Lebsack",
"amount": 1000,
"currency": "TRY",
"reference": "cf718258-8bf5-4fb4-82a8-3b02d0304558",
"paymentMethod": 2,
"swiftCode": "FAST",
"timestamp": 1753696287935,
"uniqueKey": "275724c8ff2a43709e8b6e24a4328a60",
"paymentPageUrl": "https://testpayment.paylayerpro.com/transaction/275724c8ff2a43709e8b6e24a4328a60",
"account": {
"fullName": "John Doe",
"accountType": "FAST",
"address": "TR290011100000000111222233"
}
}
Make a deposit request.
The API key for authentication.
Enum - PaymentMethod
Deposit successful.
Bad request.
API key is missing or invalid.
Not Found.
POST /api/v4/paymentmethod/deposit HTTP/1.1
Host: testlink.paylayercore.com
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 160
{
"username": "text",
"firstName": "text",
"lastName": "text",
"amount": 1,
"currency": "text",
"reference": "text",
"paymentMethod": 1,
"swiftCode": "text",
"returnUrl": "text"
}
{
"id": 1,
"username": "text",
"firstName": "text",
"lastName": "text",
"amount": 1,
"currency": "text",
"reference": "text",
"paymentMethod": 1,
"swiftCode": "text",
"timestamp": 1,
"uniqueKey": "text",
"paymentPageUrl": "text",
"account": {
"fullName": "text",
"accountType": "text",
"address": "text"
}
}
Last updated