Skip to content

Create payment

POST api/v2/paygate/payment/wallet/
Create a payment by wallet

Request Header

Field Type Required Description
X-Idempotency-Key string No Optional idempotency key for payment creation. Requests with the same API key, idempotency key, action and JSON body replay the original status and response for 24 hours.

Request Body schema

application/json

Field Type Required Description Example
endpoint string Yes Api key "1dc4441f-38d5-42b5-a705-81958f928462"
amount integer Yes Amount in minor units 1000
currency integer Yes Number code 949
buyer object Yes Buyer at the endpoint in JSON format {"remote_id": "string", "ip": "string"}
description string No Description "string"
client_id string No Transaction id at the endpoint.
Max 255 chars
"string"
success_url string or null No Redirect URL after success result "http://example.com"
fail_url string or null No Redirect URL after fail result "http://example.com"
notify_url string or null No Notification URL of changed status "http://example.com"
name string Yes The customer's name "John Smith"
payment_method string Yes Payment method type.
May be: papara, mft, fastpay, vip, parolapara, direct, mypayz, kredikarti, cepbank, havale
"vip"
document_number string Yes The customer's official identification number assigned by a government authority "111111111"
email string Yes The customer's email. "user@example.com"
phone string Yes The customer's phone. "05111231212"
bank_code string No The customer's bank code. "000000"
username string Yes The customer's username "testusername"
birth_date string Yes The customer's birth date. "1990-08-09"
parolapara_no string No The customer's parolapara_no. Required for parolapara. "123456789"

Request sample

{
    "endpoint": "1dc4441f-38d5-42b5-a705-81958f928462",
    "amount": 1000,
    "currency": 949,
    "buyer": {
        "remote_id": "string",
        "ip": "string"
    },
    "description": "string",
    "client_id": "string",
    "success_url": "http://example.com",
    "fail_url": "http://example.com",
    "notify_url": "http://example.com",
    "name": "John Smith",
    "payment_method": "vip",
    "document_number": "111111111",
    "email": "user@example.com",
    "phone": "05111231212",
    "bank_code": "000000",
    "username": "testusername",
    "birth_date": "1990-08-09",
}

Response sample


STATUS 201

{
    "redirect_url": "http://example.com",
    "info": {
        "tx": "f17d7f5c-6b4a-47fd-95eb-08086e250473",
        "payment": {},
        "status": "create",
        "currency": {
          "id": 0,
          "title": "TRY",
          "char_code": "TRY",
          "num_code": 949
        },
        "amount": 1000,
        "created_at": "2000-01-01T00:00:00Z",
        "errors": {},
        "parts_tx": [],
        "additional_data": {},
        "endpoint_logo": "string"
    },
    "qr_code": {
        "qrcode": "string",
        "beneficiary": "string",
        "format": "string",
        "copypaste": "string"
    },
    "p2p_wallet_data": {
        "target_account_number": "string",
        "bank_name": "string",
        "holder": "string",
        "valid_till": "2000-01-01T00:00:00Z",
        "tll": "00:00:00Z"
    },
    "p2p_card_data": {
        "target_card_number": "string",
        "bank_name": "string",
        "holder": "string",
        "valid_till": "2000-01-01T00:15:00Z",
        "tll": "00:15:00Z"
    },
    "pay_data": "string"
}