Authorize now, capture later

Also known as pre-authorization. PayMe places a hold on the buyer's card; you charge it later with capture-sale, once, for the full amount or less.

Capture within 7 days (168 hours) of the authorization; after that, capture-sale fails with error 516. The card issuer decides how long the hold stays on the card.

Flow

  1. Create the sale with generate-sale and sale_type: "authorize". Show the buyer the sale_url.
  2. When the buyer pays, the sale's status becomes authorized and PayMe sends a sale-authorized callback to your sale_callback_url.
  3. Call capture-sale with payme_sale_id and, to charge less, sale_price. The sale becomes completed and PayMe sends a sale-complete callback.

Create the sale

Field Value
sale_type authorize
sale_price The amount to hold, in minor units (10000 = 100.00).

All other generate-sale fields work as for a regular sale.

Capture it

Field Required Description
seller_payme_id yes, unless you send seller_id with payme_client_key The seller's MPL, as on refund-sale.
payme_sale_id yes The authorized sale.
sale_price no Amount to capture, in minor units. Default: the full authorized amount. At least the account's minimum sale value (500 by default).
installments no Number of installments, 1–36. Default: the sale's installments.

To capture in several parts, use multi-capture.

Releasing a hold

To cancel, void the hold with refund-sale while the sale is authorized. PayMe never voids an authorization on its own. If you don't release it, the card issuer releases the hold on its own schedule (days, up to about 30).

A partly voided sale can't be captured. To charge less than you authorized, capture with a lower sale_price instead.

Errors

A captured sale that shows a balance of 0 right after the capture is normal: the funds reach the wallet during settlement.