Preauthorization (PA)
A PA is created by sending a POST request over HTTPS to the /v1/payments or v1/checkouts resource. The request should include all required information such as your authentication credentials, the type of transaction, the amount, and the payment information such as card details. A capture may be sent against a successful PA to request that the funds are sent for clearing. See backoffice operations for more details.

Example of preauthorisation server to server request (Note "paymentType" must always be a "PA") 

curl https://eu-test.oppwa.com/v1/payments \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=92.00" \
-d "currency=ZAR" \
-d "paymentBrand=VISA" \
-d "paymentType=PA" \
-d "card.number=41111111111111111" \
-d "card.holder=Jane Jones" \
-d "card.expiryMonth=05" \
-d "card.expiryYear=2034" \
-d "card.cvv=123" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8cXl5ZkhDTjgzZQ=="




Example of preauthorisation Copy and Pay request (Note "paymentType" must always be a "PA") More on Copy and Pay request:

curl https://eu-test.oppwa.com/v1/checkouts \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=92.00" \
-d "currency=ZAR" \
-d "paymentType=PA" \
 -H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8cXl5ZkhDTjgzZQ=="





Capture (CP)
A capture is used to request clearing for previously authorized funds. A capture request is performed against a previous preauthorization (PA) payment by referencing its payment.id and sending a POST request over HTTPS to the /payments/{id} endpoint. Captures can be for full or partial amounts and multiple capture requests against the same PA are allowed


Example of a Capture request
curl https://eu-test.oppwa.com/v1/payments/{id} \
-d "entityId=8a8294174e735d0c014e78cf26461790" \
-d "amount=10.00" \
-d "currency=ZAR" \
-d "paymentType=CP" \
-H "Authorization: Bearer OGE4Mjk0MTc0ZTczNWQwYzAxNGU3OGNmMjY2YjE3OTR8cXl5ZkhDTjgzZQ=="