Accept Bit payments
Prerequisites
- The seller's seller_payme_id (MPL)
- The Bit service active on the seller's account
- A public HTTPS URL for sale_callback_url
Related
- Create a sale (hosted payment page)
- Let the buyer choose how to pay
- Enable payment methods and services for your sellers
- Callbacks
- Errors
- Refund a sale
- List sales
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:
- ILS only. Create Bit sales with
currency: ILS. - One payment. A
bitsale with more than one installment fails with error351. On amultipage where the buyer chooses the number of installments, a buyer who pays with Bit pays in one payment. - No saved payment method.
capture_buyerwithbitreturns error4, and amultipage withcapture_buyerdoesn't offer Bit. - Payment page only. The browser SDK has no Bit method.
Enable Bit
- A seller installs Bit from the dashboard app store (חנות אפליקציות). It is active as soon as it is installed.
- A partner turns Bit on for its seller with
vas-enable, sending your partner key, the seller's MPL and your partner account's Bit service ID asvas_payme_id:
{
"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:
layout: qr-smsadds a "Payment link via SMS" option: the buyer enters an Israeli mobile number and gets the payment link by SMS.sale_mobilepre-fills the number.- To offer Bit next to cards and wallets, send
sale_payment_method: multi. See Let the buyer choose how to pay.
The request the buyer sees in the Bit app carries the seller's business name, not product_name.
What the buyer does
- The buyer opens
sale_url. - 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.
- The buyer approves the payment in Bit. On a phone, Bit then brings the buyer back to the payment page.
- PayMe completes the charge with Bit, shows the result, sends
sale-complete, and redirects the buyer tosale_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.