> ## Documentation Index
> Fetch the complete documentation index at: https://docs.singapay.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Create v1 (Legacy)

> Creates a native e-wallet checkout for the specified account. Payment amount must be within merchant configuration limits for the selected e-wallet vendor.



## OpenAPI

````yaml https://payment-b2b.singapay.id/api/docs/merchant-api.json post /api/v1.0/ewallet-native/{account_id}/create-checkout
openapi: 3.1.0
info:
  title: Singa Merchant API
  description: >-
    OpenAPI specification for the merchant/partner HTTP API. All routes below
    are additionally protected by `ip.whitelisted.merchant` — the caller IP must
    be registered for the credential or merchant. Obtain a JWT using `POST
    /api/v1.0/access-token/b2b` (Basic auth) or `POST
    /api/v1.1/access-token/b2b` (X-Signature) before calling secured endpoints.
  version: 1.0.0
servers:
  - url: https://sandbox-payment-b2b.singapay.id
    description: >-
      API host. Paths include `/api` prefix (see `RouteServiceProvider`).
      Replace scheme/host with your environment.
security: []
tags:
  - name: Security
    description: >-
      Merchant authentication (`OauthMerchantTokenController`). **v1.1** B2B
      token uses `X-CLIENT-ID`, `X-PARTNER-ID`, and `X-Signature` (no Basic
      auth). Secured routes also require the issued Bearer JWT plus
      `X-PARTNER-ID`.
  - name: Accounts
    description: >-
      Account management (`routes/merchantApiRoute.php`, `v1.0`). Path parameter
      `{id}` is always the account ULID.
  - name: Balance Inquiry
    description: >-
      Merchant and per-account balance inquiry (`BalanceController`, `v1.0`).
      Path `account_id` is the account ULID.
  - name: Statements
    description: >-
      Per-account statement list and detail
      (`AccountController::accountStatements`, `accountStatementDetail`, prefix
      `v1.0/statements`). Flugger responses; detail path param `{statement_id}`
      maps to `statements.transaction_id`.
  - name: Payment Link
    description: >-
      Payment link CRUD and payment-method catalog (`PaymentLinkApiController`,
      prefix `v1.0/payment-link-manage`). `account_id` is ULID;
      `payment_link_id` is numeric `payment_links.id`.
  - name: Payment Link History
    description: >-
      Payment link transaction/history listing and detail
      (`PaymentLinkApiController`, prefix `v1.0/payment-link-histories`).
      `history_id` is numeric `payment_link_histories.id`.
  - name: Virtual Account
    description: >-
      Native VA CRUD (`VirtualAccountController`, prefix
      `v1.0/virtual-accounts`). `account_id` and `virtual_account_id` are ULIDs.
  - name: VA Transaction
    description: >-
      VA money-in transaction listing and detail (`VirtualAccountController`,
      prefix `v1.0/va-transactions`).
  - name: QRIS (Money In)
    description: >-
      MPM dynamic QRIS list, show, and generate (`QrisMpmDynamicApiController`,
      prefix `v1.0/qris-dynamic`).
  - name: QRIS (Money Out)
    description: >-
      Issuer MPM decode/inquiry, payment credit (money out), and transaction
      status (`QrisIssuerMpmController`, `QrisApiV2Controller::checkStatus`,
      prefix `v2.0/qris`). Related list/detail: `GET
      /api/v2.0/qris/transaction/...`.
  - name: E-Wallet (Money In)
    description: >-
      E-Wallet Native checkout and transactions (`EwalletNativeApiController`,
      `EwalletNativeTransactionApiController`, `EwalletNativeV2ApiController`).
      Paths include `v1.0/ewallet-native`, `v1.0/ewallet-native-transactions`,
      and `v2.0/ewallet-native`.
  - name: E-Wallet (Money Out)
    description: >-
      E-wallet disbursement / top-up to beneficiary wallets
      (`EWalletTopUpController`, prefix `v2.0/ewallet`). Responses use the
      custom **`MerchantV2ApiEnvelope`** with **`MerchantV2ResponseCode`**
      (SP000–SP020).
  - name: Card (Money In)
    description: >-
      One-time card payment, cancel, and inquiry
      (`CardPaymentMerchantApiController`, prefix `v2.0/card`).
  - name: Subscription (Recurring)
    description: >-
      Credit-card recurring subscription plans (`SubscriptionPlanApiController`,
      prefix `v2.0/recurring`). Plan `{id}` is UUID (`sub_plans.id`).
  - name: Direct Debit
    description: >-
      Direct Debit — bind a customer bank account once via hosted webview, then
      charge it host-to-host (`DirectDebitMerchantController`, prefix
      `v2.0/direct-debit`). Binding `{binding_id}` and transaction
      `{transaction_id}` are UUIDs. Responses use the
      **`MerchantV2ApiEnvelope`** with both standard SP000–SP020 codes and
      Direct-Debit-specific codes (`SP_DD_*`). The `/charge` endpoint is
      additionally protected by **`X-Signature`** + **`X-Timestamp`**
      (`verify.signature-internal`); see operation parameters for the signing
      scheme.
  - name: Account Transfer
    description: >-
      Move funds between sub-accounts within the same merchant
      (`AnotherAccountApiController`, prefix `v1.0/account-transfer`). The
      transfer endpoint requires request signature headers
      (`verify.signature-internal`). Both accounts must belong to the
      authenticated merchant and be accessible to the credential.
  - name: Disbursement (Money Out)
    description: >-
      Bank disbursement (`DisbursementController` **v1.0**,
      `DisbursementV2Controller` **v2.0**). **v1.0**
      list/show/fee/beneficiary/transfer use Flugg envelopes; v1 inquiry-status
      uses the **custom v2 envelope** (`MerchantV2ApiEnvelope`, codes
      **SP000–SP020**). **v2.0** check-beneficiary, transfer, and inquiry-status
      use the same custom envelope — see component schema
      **`MerchantV2ResponseCode`** for the full response code table.
  - name: Cardless Withdrawal
    description: >-
      Cardless withdrawal API for initiating ATM cash withdrawals without a
      physical card. Supports creating withdrawals with OTP generation, listing
      transaction history, viewing transaction details, canceling pending
      withdrawals, and deleting canceled records. All endpoints use the
      `v1.0/cardless-withdrawals` route prefix and the standard success/error
      response envelope. Path parameter `{id}` refers to the `transaction_id`
      (platform-assigned business identifier).
paths:
  /api/v1.0/ewallet-native/{account_id}/create-checkout:
    post:
      tags:
        - E-Wallet (Money In)
      summary: Create v1 (Legacy)
      description: >-
        Creates a native e-wallet checkout for the specified account. Payment
        amount must be within merchant configuration limits for the selected
        e-wallet vendor.
      operationId: ewalletNativeCreateCheckout
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            description: Account identifier in ULID format.
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEwalletNativeCheckoutRequest'
      responses:
        '200':
          description: Checkout created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderSuccessEwalletTransaction'
        '400':
          description: Business validation (vendor phone, expiry buffer, etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope401'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope404'
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope405'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponderErrorEnvelope422'
      security:
        - BearerAuth: []
          PartnerId: []
components:
  schemas:
    CreateEwalletNativeCheckoutRequest:
      required:
        - amount
        - ewallet_vendor
      properties:
        amount:
          description: >-
            Payment amount. Minimum and maximum limits depend on merchant
            configuration and selected e-wallet vendor.
          type: number
          example: 100000
        ewallet_vendor:
          description: >-
            E-wallet vendor code. Must be an active vendor in the e-wallet
            payment group.
          type: string
          example: EWALLET_DANA
        expired_at:
          description: >-
            Optional expiration datetime. When provided, must be later than the
            current time.
          type:
            - string
            - 'null'
          format: date-time
          example: '2026-04-02T23:59:59+07:00'
        customer_name:
          description: Customer name for the checkout.
          type:
            - string
            - 'null'
          maxLength: 255
          example: John Doe
        customer_email:
          description: Customer email for the checkout.
          type:
            - string
            - 'null'
          format: email
          maxLength: 255
          example: john.doe@example.com
        customer_phone:
          description: >-
            Customer phone number. Required for some vendors (for example OVO
            push-to-pay).
          type: string
          maxLength: 20
          example: '081234567890'
        merchant_redirect_url:
          description: Optional URL to redirect the customer after payment flow completion.
          type:
            - string
            - 'null'
          format: uri
          maxLength: 2048
          example: https://merchant.example.com/payment/return
        merchant_reff_no:
          description: Optional merchant reference number for this transaction.
          type:
            - string
            - 'null'
          maxLength: 255
          example: INV-2026-001
      type: object
    ResponderSuccessEwalletTransaction:
      required:
        - status
        - success
        - data
      properties:
        status:
          description: HTTP status code.
          type: integer
          example: 200
        success:
          description: Indicates whether the request was successful.
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/EwalletTransactionResource'
          description: E-wallet transaction resource payload.
      type: object
      example:
        status: 200
        success: true
        data:
          id: 2001
          account_id: 42
          reff_no: EW20260402001
          merchant_reff_no: INV-2026-001
          status: open
          status_computed: open
          is_expired: false
          ewallet_vendor: EWALLET_DANA
          amount: 100000
          total_amount: 100000
          merchant_fee: 1500
          net_amount: 98500
          checkout_url: https://checkout.example.com/pay/abc123
          checkout_url_app: dana://checkout/abc123
          vendor_reference_no: DANA-REF-987654
          merchant_redirect_url: https://merchant.example.com/payment/return
          additional_info: null
          customer_name: John Doe
          customer_email: john.doe@example.com
          customer_phone: '081234567890'
          has_recon: false
          recon_at: null
          has_settle: false
          settle_at: null
          has_settle_request: false
          settle_request_at: null
          payment_channel: null
          payment_vendor_code: null
          settlement_method: null
          processed_timestamp: null
          expired_at: '2026-04-02T23:59:59+07:00'
          created_at: '2026-04-02T10:30:00+07:00'
          updated_at: '2026-04-02T10:30:00+07:00'
          deleted_at: null
          events_count: 1
    ResponderErrorEnvelope400:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 400
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody400'
      type: object
    ResponderErrorEnvelope401:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 401
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody401'
      type: object
    ResponderErrorEnvelope404:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 404
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody404'
      type: object
    ResponderErrorEnvelope405:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 405
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody405'
      type: object
    ResponderErrorEnvelope422:
      required:
        - status
        - success
        - error
      properties:
        status:
          type: integer
          example: 422
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/ResponderErrorBody422'
        data:
          type: object
          example:
            errors:
              field:
                - error message
          additionalProperties: true
      type: object
    EwalletTransactionResource:
      description: >-
        E-wallet transaction resource returned by the API for native checkout
        payments.
      properties:
        id:
          description: >-
            E-wallet transaction identifier. Use this value as
            `{transaction_id}` or `{id}` in path parameters.
          type: integer
          example: 2001
        account_id:
          description: Internal account identifier associated with the transaction.
          type: integer
          example: 42
        reff_no:
          description: System-generated reference number for the transaction.
          type: string
          example: EW20260402001
        merchant_reff_no:
          description: Merchant reference number associated with the transaction.
          type:
            - string
            - 'null'
          example: INV-2026-001
        status:
          description: Configured transaction status.
          type: string
          example: open
        status_computed:
          description: System-computed status based on transaction state and expiration.
          type: string
          example: open
        is_expired:
          description: Whether the transaction is currently expired.
          type: boolean
          example: false
        ewallet_vendor:
          description: E-wallet vendor code for this transaction.
          type: string
          example: EWALLET_DANA
        amount:
          description: Payment amount before fees.
          type: number
          example: 100000
        total_amount:
          description: Total amount charged for the payment.
          type: number
          example: 100000
        merchant_fee:
          description: Merchant fee amount applied to the transaction.
          type:
            - number
            - 'null'
          example: 1500
        net_amount:
          description: Net amount after merchant fee.
          type:
            - number
            - 'null'
          example: 98500
        checkout_url:
          description: Hosted checkout URL for the customer.
          type:
            - string
            - 'null'
          example: https://checkout.example.com/pay/abc123
        checkout_url_app:
          description: Deep link or app checkout URL when provided by the vendor.
          type:
            - string
            - 'null'
          example: dana://checkout/abc123
        vendor_reference_no:
          description: Reference number returned by the e-wallet vendor.
          type:
            - string
            - 'null'
          example: DANA-REF-987654
        merchant_redirect_url:
          description: Merchant redirect URL after payment flow completion.
          type:
            - string
            - 'null'
          example: https://merchant.example.com/payment/return
        additional_info:
          description: Additional vendor-specific information for the transaction.
          type:
            - object
            - 'null'
          example: null
          additionalProperties: true
        customer_name:
          description: Customer name provided for the checkout.
          type:
            - string
            - 'null'
          example: John Doe
        customer_email:
          description: Customer email provided for the checkout.
          type:
            - string
            - 'null'
          example: john.doe@example.com
        customer_phone:
          description: Customer phone number. Required for some vendors (for example OVO).
          type:
            - string
            - 'null'
          example: '081234567890'
        has_recon:
          description: Whether the transaction has been reconciled.
          type: boolean
          example: false
        recon_at:
          description: Reconciliation datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: null
        has_settle:
          description: Whether the transaction has been settled.
          type: boolean
          example: false
        settle_at:
          description: Settlement datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: null
        has_settle_request:
          description: Whether a settlement request has been submitted.
          type: boolean
          example: false
        settle_request_at:
          description: Settlement request datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: null
        payment_channel:
          description: Payment channel reported by the vendor after payment.
          type:
            - string
            - 'null'
          example: null
        payment_vendor_code:
          description: Payment vendor code recorded after payment.
          type:
            - string
            - 'null'
          example: null
        settlement_method:
          description: Settlement method configured for the transaction.
          type:
            - string
            - 'null'
          example: null
        processed_timestamp:
          description: Payment processed datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: null
        expired_at:
          description: Expiration datetime in ISO 8601 format.
          type:
            - string
            - 'null'
          example: '2026-04-02T23:59:59+07:00'
        created_at:
          description: Resource creation datetime in ISO 8601 format.
          type: string
          example: '2026-04-02T10:30:00+07:00'
        updated_at:
          description: Last update datetime in ISO 8601 format.
          type: string
          example: '2026-04-02T10:30:00+07:00'
        deleted_at:
          description: Soft-deletion datetime in ISO 8601 format when applicable.
          type:
            - string
            - 'null'
          example: null
        events_count:
          description: Number of related transaction events recorded.
          type: integer
          example: 1
      type: object
    ResponderErrorBody400:
      properties:
        code:
          type: integer
          example: 400
        message:
          type: string
          example: Bad Request.
      type: object
    ResponderErrorBody401:
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: Unauthorized merchant, please sign in
      type: object
    ResponderErrorBody404:
      properties:
        code:
          type: integer
          example: 404
        message:
          type: string
          example: Account not found.
      type: object
    ResponderErrorBody405:
      properties:
        code:
          type: integer
          example: 4059901
        message:
          type: string
          example: >-
            The PATCH method is not supported for this route. Supported methods:
            GET, HEAD, POST.
      type: object
    ResponderErrorBody422:
      properties:
        code:
          type: integer
          example: 422
        message:
          type: string
          example: Validation error.
        errors:
          type: object
          example:
            field:
              - error message
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      description: >-
        JWT issued by `POST /api/v1.1/access-token/b2b`. Send `Authorization:
        Bearer <token>`.
      bearerFormat: JWT
      scheme: bearer
    PartnerId:
      type: apiKey
      description: Merchant API key (`Credential.api_key`). Required on every request.
      name: X-PARTNER-ID
      in: header

````