Accept Bit payments

Prerequisites

Bit is an Israeli payment app. The buyer approves the payment in the Bit app on their phone, then PayMe completes the charge and sends you the result. Bit runs on PayMe's payment page: create a sale with sale_payment_method: bit to offer Bit alone, or with multi to offer it next to cards and wallets.

Limits:

Enable Bit

{
  "payme_client_key": "payme_partner_key",
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "vas_payme_id": "VASLDEMO-BIT-VASLDEMO-1234567"
}

The response is either the seller's active service (status_code: 0, vas_is_active: true), or status_code: 2 with the message Zendesk ticket created when PayMe's team completes the setup. The whole flow, including how to check the result, is on Enable payment methods and services for your sellers.

Without the service, generate-sale with bit fails with error 720, and multi pages don't show Bit.

Create a Bit sale

Call generate-sale from your server with sale_payment_method: bit.

POST https://sandbox.payme.io/api/generate-sale (production: https://live.payme.io/api/generate-sale)

{
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "sale_payment_method": "bit",
  "sale_price": 1000,
  "currency": "ILS",
  "product_name": "Order 1234",
  "transaction_id": "order-1001",
  "sale_callback_url": "https://your-server.example.com/payme/callback",
  "sale_return_url": "https://your-site.example.com/payment/success",
  "sale_mobile": "+972500000040",
  "language": "en"
}
{
  "status_code": 0,
  "session": "AtsJ0as5",
  "sale_url": "https://sandbox.payme.io/sale/generate/SALE1700-000000AA-EXAMPLE1-SALE0001",
  "payme_sale_id": "SALE1700-000000AA-EXAMPLE1-SALE0001",
  "payme_sale_code": 12345678,
  "price": 1000,
  "transaction_id": "order-1001",
  "currency": "ILS",
  "sale_payment_method": "bit"
}

Show sale_url to the buyer in an iframe or a redirect, and store payme_sale_id. Partners also send payme_client_key; see Authentication.

Options:

The request the buyer sees in the Bit app carries the seller's business name, not product_name.

What the buyer does

  1. The buyer opens sale_url.
  2. On a computer, the page shows a QR code: the buyer scans it with their phone. On a phone, the page shows a button that opens the Bit app.
  3. The buyer approves the payment in Bit. On a phone, Bit then brings the buyer back to the payment page.
  4. PayMe completes the charge with Bit, shows the result, sends sale-complete, and redirects the buyer to sale_return_url, if you sent it.

Each new Bit request on a sale cancels the open one before it, so a buyer who reloads the page can't pay twice.

If the buyer closes the page after approving, PayMe keeps checking the request in the background. The sale still completes and the callback still arrives, possibly several minutes later. Don't treat a closed page as a failed payment: wait for the callback, or check the sale with get-sales.

Outcomes and callbacks

notify_type When
sale-complete The buyer approved and PayMe completed the charge. sale_payment_method is bit (also on a multi sale), and installments is 1.
sale-failure A Bit request ended without a payment. The reason is in status_error_code.
refund The sale was refunded

A Bit request ends with one of these codes:

status_error_code Meaning PayMe's message What to do
23001 The buyer rejected the request in Bit "The request was rejected by the customer" Let the buyer try again or choose another method.
23002 The request was canceled before the buyer paid it "The request was canceled by the business" Let the buyer start a new request.
23003 The request expired before the buyer approved it "The request has expired" Let the buyer start a new request, and approve it in Bit straight away.

Other codes are listed on Errors.

A failed request doesn't close the sale: its status is failed, and the same sale_url stays payable, unless sale_expiry_seconds has passed. The buyer can start a new Bit request from the page, and a later success sends sale-complete. Callback fields, signature and delivery rules are on Callbacks.

Refunds

Refund a Bit sale with refund-sale, in full or in part. The money goes back to the buyer through Bit.

{
  "seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
  "payme_sale_id": "SALE1700-000000AA-EXAMPLE1-SALE0001",
  "sale_refund_amount": 500,
  "language": "en"
}

If you refund a Bit sale in several parts, leave at least 5 minutes between two refunds of the same sale.

Test Bit

Ask PayMe how to test Bit in the sandbox before you go live. You can test the rest of your integration (callbacks, get-sales, refunds) with the cards on Test Cards and Payment Methods.