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
- Create the sale with
generate-saleandsale_type: "authorize". Show the buyer thesale_url. - When the buyer pays, the sale's status becomes
authorizedand PayMe sends asale-authorizedcallback to yoursale_callback_url. - Call
capture-salewithpayme_sale_idand, to charge less,sale_price. The sale becomescompletedand PayMe sends asale-completecallback.
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
516: the 7 days have passed. The error doesn't release the hold; void it withrefund-sale.305: the sale isn'tauthorized(for example, already captured, voided or partly voided).status_additional_infoholds its status.352:sale_priceis0, below the account minimum (500 by default) or above the authorized amount.518: the sale's authorization is no longer open, for example because the authorization failed.- A declined capture returns HTTP 200 with
status_code: 1and leaves the salefailed. You can retry while the authorization is still valid. 20001: the acquirer refused a void or refund. Contact PayMe with thepayme_sale_idand the time of the call.
A captured sale that shows a balance of 0 right after the capture is normal: the funds reach the wallet during settlement.