Skip to main content

Create Top-up

Deposit to a member's wallet can be done in 4 ways. You can deposit money into the wallet via a card payment (non-3ds or 3DS), via APM payment or via Fund(EFT/Money) Transfer transaction made by the member to your bank account.

1. Deposit to Wallet from Card

You can use this service to deposit money into a member's wallet from credit credit or debit card.

URL

The endpoint and http method information to deposit to member wallet are stated below.

POST/payment/v1/deposits

Request Parameters

The parameters expected to be sent in the requests to be made for deposit to member wallet are listed under the table and sub-headings below.

price
decimal
required

Amount to be top-up

currency
Currency
required

See: Currencies The currency of wallet

Values:
TRY
USD
EUR
GBP
CNY
ARS
BRL
AED
IQD
AZN
KZT
KWD
SAR
BHD
RUB
JPY
EGP
buyerMemberId
number
required

The ID value of the buyer membet who is related to payment. This ID value is not the id value that is stored in merchant own system. It is the value stored in Craftgate.

conversationId
string

"boomerang" value that can be sent with the request and received with the response. It can be used to associate different requests with each other. Usually, the order number is used that is stored in merchant own system.

posAlias
string

The alias value of the POS that the payment pass over

card
Card
required

Card information to be collected

clientIp
string

IP of the buyer who created payment request

Card information

If the cardUserKey field in the sent card information is filled in, the fields in the Stored Card Information section are valid. For other cases, see: Credit Card, Debit Card or Prepaid Card Information.

Response Parameters

The parameters returned as a result of deposit to wallet are also subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

id
number

ID value of payment

createdDate
date

The date that payment created

price
decimal

Amount that top-up to the wallet

currency
string

Payment currency

buyerMemberId
number

The ID value of the buyer member who is related to payment.

conversationId
string

Value of theconversationId parameter sent in the payment initiation request

paymentType
PaymentType
Values:
CARD_PAYMENT
DEPOSIT_PAYMENT
WALLET_PAYMENT
CARD_AND_WALLET_PAYMENT
BANK_TRANSFER
APM
paymentStatus
PaymentStatus
Values:
FAILURE
SUCCESS
INIT_THREEDS
CALLBACK_THREEDS
WAITING
authCode
string

authCode value retrieved from bank related to the payment

hostReference
string

hostReference value retrieved from bank related to the payment

transId
string

transId value retrieved from bank related to the payment

orderId
string

orderId value retrieved from bank related to the payment

cardUserKey
string

This value exist for the payment that has the storeCardAfterSuccessPayment field in the card information field as true in payment request. Indicates the hidden card key of the stored card after successful payment. It should be stored by the merchant by associating it with the customer.

cardToken
string

This value exist for the payment that has the storeCardAfterSuccessPayment field in the card information field as true in payment request. Indicates the hidden card token of the stored card after successful payment. It should be stored by the merchant by associating it with the customer.

walletTransaction
WalletTransaction

Wallet transaction record that is created while deposit process

fraudId
number

Fraud Check Id if fraud rule matches (See: Fraud Checks)

fraudAction
FraudAction

Fraud Check Action if fraud rule matches (See: Fraud Actions)

Values:
BLOCK
REVIEW

Withdraw Money from Wallet

To refund the money that is deposit to wallet, to the card, visit the Refund Wallet Transaction to Card page.

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Loading..

2. Deposit to Wallet by APM Payment

You can deposit money to the member's wallet via APM payment. You can find required parameters and payment flow according to Alternative payment methods type in Pay with APM

URL

The endpoint and http method information to deposit to member wallet depending on APM type are stated below.

POST/payment/v1/deposits/apm-init

Request Parameters

The parameters expected to be sent in the requests to be made for deposit to member wallet via APM. Transfer are listed under the table and sub-headings below.

apmType
string
required

See: Alternative Payment_Methods Alternative Payment Method type

merchantApmId
number

ID of Alternative Payment Method which is declared in APM Management Page of Merchant Panel. It is recommended to sent if multiple APM declared in same APM Type.

price
decimal
required

Total basket price. The sum of the item prices in the basket must be equal to total basket price.

currency
Currency
required
Values:
TRY
USD
EUR
GBP
CNY
ARS
BRL
AED
IQD
AZN
KZT
KWD
SAR
BHD
RUB
JPY
EGP
buyerMemberId
number
required

ID of the buyer that is returned from member creation.

conversationId
string

"boomerang" value that can be sent with the request and received with the response. It can be used to associate different requests with each other. Usually, the order number is used that is stored in merchant own system.

externalId
string

It is generally used as a payment order number or basket number on the merchant side. You can search with this value later by using reporting services.

paymentChannel
string

It is generally used to keep information specific to the payment channel on the merchant side. You can search with this value later by using reporting services.

apmOrderId
string

Order id parameter to be transmitted to the APM when receiving the payment. Since it is optional, it is recommended not to send it and the orderId value is generated by Craftgate.

apmUserIdentity
string

Unique user identity parameter to be transmitted to the APM when receiving the payment.

callbackUrl
string
required

The URL to be used to send the result returned from the APM to the merchant

additionalParams
map<string, map>

Additional parameters related to payment.

clientIp
string

IP of the buyer.

Response Parameters

The parameters returned as a result of deposit to wallet are also subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

paymentId
number

Payment Id

paymentStatus
PaymentStatus

Represent payment status

Values:
FAILURE
SUCCESS
INIT_THREEDS
CALLBACK_THREEDS
WAITING
additionalAction
AdditionalAction

Sometimes you should do another step for complete APM payment. There is no any step when additionalAction is NONE. For more information, see. APM Additional Actions

redirectUrl
string

Redirect URL of the APM

paymentError
PaymentError

The detail about errors if any error occurred while APM payment.

walletTransaction
WalletTransaction

(bkz. Wallet Transaction) Wallet transaction record that is created while deposit process

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Loading..

3. Deposit to Wallet by EFT/Money Transfer

You can deposit money to the member's wallet based on the EFT/Transfer transaction from the member to your bank accounts.

URL

The endpoint and http method information to deposit to member wallet depending on EFT/Money Transfer are stated below.

POST/payment/v1/deposits/fund-transfer

Request Parameters

The parameters expected to be sent in the requests to be made for deposit to member wallet depending on EFT/Money Transfer are listed under the table and sub-headings below.

price
decimal
required

Amount to be top-up

currency
Currency
required
Values:
TRY
USD
EUR
GBP
CNY
ARS
BRL
AED
IQD
AZN
KZT
KWD
SAR
BHD
RUB
JPY
EGP
buyerMemberId
number
required

Buyer member ID. This ID value is not the id value that is stored in merchant own system. It is the value stored in Craftgate.

conversationId
string

"boomerang" value that can be sent with the request and received with the response. It can be used to associate different requests with each other. Usually, the order number is used that is stored in merchant own system.

clientIp
string

IP of the buyer who created payment request

Response Parameters

The parameters returned as a result of deposit to wallet are also subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

currency
Currency

Payment currency

Values:
TRY
USD
EUR
GBP
CNY
ARS
BRL
AED
IQD
AZN
KZT
KWD
SAR
BHD
RUB
JPY
EGP
buyerMemberId
number

The ID value of the buyer member who is related to payment.

conversationId
string

Value of theconversationId parameter sent in the payment initiation request

walletTransaction
WalletTransaction

(bkz. Wallet Transaction) Wallet transaction record that is created while deposit process

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Loading..