Better Payment 0.11.1 API
    Preparing search index...

    Class Akbank

    Akbank Sanal POS (JSON API, "yeni nesil" sanal POS)

    • createPayment(): txnCode 1000 (non-3D sale)
    • initThreeDSPayment(): 3D_PAY model; returns an auto-submitting form to the Akbank securepay gateway. Akbank authenticates and charges, then POSTs the signed result to callbackUrl.
    • completeThreeDSPayment(): verifies the callback signature and result.
    • refund() 1002, cancel() 1003, getPayment() 1010 (order history)

    Hierarchy (View Summary)

    Index
    • Capture of a pre-authorization (txnCode 1005). amount may be lower than the authorized amount (partial capture).

      Parameters

      • request: CaptureRequest

      Returns Promise<PaymentResponse>

    • Verifies the okUrl/failUrl POST from Akbank.

      1. The HMAC signature must be valid and cover responseCode, orderId and the terminal ids.
      2. The signed values are concatenated without a separator, so a signature alone does not pin which value is the orderId. The outcome is therefore confirmed with an order history query (txnCode 1010): a callback whose result does not match Akbank's record for that order is rejected as INVALID_HASH.

      Payment succeeded only when the callback and the query both report an approved transaction for the order.

      Parameters

      Returns Promise<PaymentResponse>

    • Deletes a saved card

      Parameters

      • _request: DeleteCardRequest

      Returns Promise<DeleteCardResponse>

    • A customer's saved cards

      Parameters

      • _request: { customerToken: string }

      Returns Promise<ListCardsResponse>

    • Saves a card with the provider without charging it

      Parameters

      • _request: SaveCardRequest

      Returns Promise<SaveCardResponse>

    • Releases a pre-authorization: Akbank voids it like any other transaction (txnCode 1003)

      Parameters

      • request: VoidAuthorizationRequest

      Returns Promise<CancelResponse>