# Create payment (pay_in or pay_out) **POST /v1/payments/new** Use this endpoint to create either a Pay-In or Pay-Out transaction. Set `payment_type` to `pay_in` for deposits, or `pay_out` for transfers out.To enable host-to-host (H2H) mode, include the parameter `host2host: true` in your request body. In H2H mode, card data and payment result are handled server-to-server, response will contain `url: null` and detailed `info`. **CRYPTO mode** When `mode: "CRYPTO"` is used, the client submits a fiat amount (e.g., RUB). The server converts it to USDT at current rates. In responses, all monetary fields (e.g., `amount`, `total`, `net_processed`, `fee`, `commission`, `gross_amount`, `shared_commission`, `paid_amount`) are returned in USDT. **Exceptions:** `requested_amount`, `client_amount`, and `requested_currency` are kept in the original fiat currency provided by the client. ## Servers - Staging server: https://test-api.fast-jet.org (Staging server) - Production server: https://api.fast-jet.org (Production server) ## Authentication methods - Bearer ## Parameters ### Body: application/json (object) Payload to create a new payment (pay-in or pay-out) - **host2host** (boolean) Set to true to enable host-to-host (H2H) integration. In H2H mode, the API processes card data server-to-server and returns response with url: null and card details in info. - **payment_type** (string) This is the type of payment, deposit or withdrawal - **cur** (string) Currency of payment - **subtype** (string) 'bank_card' - for regular transfer to card, 'sbp' - for Fast Payment System (FPS), also known as the Faster Payments System (sbp) - **amount** (string) Requested money to charge, decimal number - **mode** (string) - **bank_name** (string) You can pass the name of the bank or you can just pass 'other'. - **merchant_id** (string) It's a unique id on your side. - **user_id** (string) Unique client ID bound to each account. - **user_name** (string) Client full name. - **callback** (string(uri)) URL where FastJet should send updates. - **redirect_url** (string(uri)) URL where user will be returned after payment. - **pay_in_details** (object) ## Responses ### 201 Payment created successfully. #### Body: application/json (object) - **uid** (string(uuid)) Unique payment identifier - **url** (string(uri)) URL to complete or view the payment - **merchant_id** (string) Identifier of the merchant who initiated the payment - **state** (string) Internal state of the payment. • idle — Created. Transaction object exists but not yet started. • routed — The payment has been routed but not yet processed. • completed — The payment has been successfully completed. Final status. • not_fully — The payment is partially paid. Final status. • fail — The payment failed. Final status. • cancel — The payment was reversed or is being reversed. • chargeback — The payment was disputed and charged back. • correction — The payment amount was adjusted up or down. - **payment_type** (string) Payment type (e.g., pay_in, pay_out) - **subtype** (string) Payment method used (e.g., bank_card, sbp) - **requested_amount** (string) Original fiat amount provided by the client. - **requested_currency** (string) Original fiat currency provided by the client (ISO 4217). - **client_amount** (string) Amount shown or entered by the client in the original currency. In CRYPTO mode remains in fiat. - **amount** (string) Converted amount processed. In CRYPTO mode — expressed in USDT. - **currency** (string) Currency of processed amounts. - **total** (string) Total amount including fees and commissions - **net_processed** (string) Net amount processed after fees - **fee** (string) Service fee amount - **commission** (string) Commission charged by payment processor - **gross_amount** (string) Gross amount before deductions - **shared_commission** (string) Portion of commission shared between partners - **paid_amount** (string) Amount paid out to the recipient (renamed from payed_amount). - **fail_by** (string) Entity responsible for failure, in created transaction - null - **fail_code** (string) Error code if payment failed - **receipts** (array[string(uri)]) List of URLs to payment receipts - **created_date** (string(date-time)) Timestamp when payment was created - **paid_at** (string(date-time)) Timestamp when payment was completed - **redirect_url** (string(uri)) URL for client redirection after payment - **form** (string) Form type used for payment (e.g., acquiring.card) - **info** (object) Additional information or comments ### 401 Authorization required. ### 409 If a payment with the same idempotency key exists and was created more than 1 second ago. ### 455 Cannot process your payment. [Powered by Bump.sh](https://bump.sh)