Direct API - How to create and pay sale

To initiate and pay a sale, please adhere to the following steps:

1. Create sale

Send a generate-sale request, and get a synchronous response with payme_sale_id (our unique sale ID).

Please notes that no payment is actually made at this point.

2. Pay sale

Send a pay-sale request with the credit card details, and the payme_sale_id from step #1 above. At this point, a few actions occur: the sale is processed, the buyer is charged, and you receive an asynchronous response with the sale data.

3. Receive callback

PayMe will send a callback notification (async request) to the provided URLs, as a backup, and security mechanism.

Tokenization

The token of the buyer, if requested, is received as part of the callback in step #3.

However, if you only want to get a token and not to perform a sale (for future use), you can use the capture-buyer-token call:

To pay with a token, just add the token you saved previously to your next generate-sale request in the buyer_key attribute. The sale will be paid immediately (without the need to use the pay-sale call).