Better Payment 0.11.1 API
    Preparing search index...

    Class Sipay

    Sipay (paySmart2D / paySmart3D)

    • createPayment(): paySmart2D (non-3D, if enabled for the merchant)
    • initThreeDSPayment(): paySmart3D; returns the 3D Secure page (HTML)
    • completeThreeDSPayment(): verifies the hash key Sipay posts to return_url / cancel_url
    • refund() / cancel(): refund (same-day refunds are voids at Sipay)
    • getPayment(): checkstatus
    • authorize(), initThreeDSAuthorize(), capture(), voidAuthorization(): PreAuth + confirmPayment
    • binCheck() / installmentInfo(): getpos

    paymentId is the invoice id (conversationId, or a generated one). Requests carry a Bearer token, requested with appId / appSecret and reused until it expires.

    Hierarchy (View Summary)

    Index
    • Card type, scheme, program and bank of a BIN (getpos).

      Parameters

      • binNumber: string

      Returns Promise<BinCheckResponse>

    • Cancels a payment: refunds what is left of it (a void on the same day), or releases it when it is an open pre-authorization. paymentId is the invoice id.

      Parameters

      Returns Promise<CancelResponse>

    • Charges (all or part of) a pre-authorized amount (confirmPayment, status 1). paymentId is the invoice id.

      Parameters

      • request: CaptureRequest

      Returns Promise<PaymentResponse>

    • Completes a 3D Secure payment from the fields Sipay POSTs to return_url or cancel_url.

      Only the hash key is trusted: it is decrypted with the app secret and its content (status, total, invoice id, order id, currency) decides the result. A callback without a valid hash key, or whose invoice id or order id differs from the hash key, is rejected as INVALID_HASH and carries no ids. rawResponse.verified holds the verified values: compare total with the amount of your order.

      Parameters

      Returns Promise<PaymentResponse>

    • Deletes a saved card

      Parameters

      • _request: DeleteCardRequest

      Returns Promise<DeleteCardResponse>

    • Payment status (checkstatus). paymentId is the invoice id.

      Parameters

      • paymentId: string

      Returns Promise<PaymentResponse>

    • 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 (confirmPayment, status 2). paymentId is the invoice id.

      Parameters

      • request: VoidAuthorizationRequest

      Returns Promise<CancelResponse>