Create Top-up

Deposit to a member's wallet can be done in 2 ways. One of them is to deposit money into the wallet from a card. Secondly, you can deposit money based on the 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.

HTTP Method URL
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.

Parameter Name Type Mandatory Description
price decimal Yes Amount to be top-up
buyerMemberId number Yes 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 No "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 No The alias value of the POS that the payment pass over
card Card No Card information to be collected (See. Card Information)
clientIp string No 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:

Parameter Name Type Description
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 See: Payment Types
paymentStatus PaymentStatus See: Payment Statuses
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.

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.

2. 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.

HTTP Method URL
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.

Parameter Name Type Description
price decimal Yes Amount to be top-up
buyerMemberId number Yes 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 No "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 No IP of the buyer who created payment request

Response Parameters

If the successful top-up is done, the response is returned with the HTTP 204 code. An HTTP code other than this code indicates that the operation was unsuccessful.

Sample Codes

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