Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Transaction TypesMeaningSuccess return codes
DBDebit of the card without prior authorization request000.000.000
CPCapture of the Amount previously authorized000.000.000

Create the checkout


Code Block
firstline1
titleCreate the checkout: https://test.oppwa.com/v1/checkouts/
linenumberstrue
// GET Request to the following endpoint:
// https://test.oppwa.com/v1/checkouts/
//-h 
amount=10.00

currency=MXN
paymentType=PAAuthorization: Bearer askldhaslrnkaSDDTRIadewunaSDKJLsaTUqwejQWU2-2==
//your API Credentialsauthentication.userId=8a8294174ae82ada014aedf7fb151d5f
authentication.password=AKdx7nmH
authentication.Credentials
entityId=8a8294174ae82ada014aedfd75aa1d79
//end of API Credentials
amount=10.00
currency=MXN
paymentType=DB
customer.ip=1.1.1.1
customer.email=test@test.com
merchantTransactionID=1234 //this value will show up on settlement reports and serves as your reference for this transaction

...

Code Block
languagejs
firstline1
titlePayment Form
linenumberstrue
<script>
// setlanguage to Spanish
var wpwlOptions ={locale:"es"
}
</script>
<script
src="https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=75E53EDE2467B24C179501962555376C.sbg-vm-tx02"></script>
//Define the card brands you want to allow and also set the shopper result URL in which the shopper is being redirected to once the payment is concluded
<form action=" {shopperResultUrl}" class="paymentWidgets">VISA MASTER AMEX</form>

Capture the Amount

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.

1
Code Block
firstline
titlecapture request: POST to https://test.oppwa.com/v1/payments/
linenumberstrue
//POST Request to https://test.oppwa.com/v1/payments/payment.id
//payment.id is the uniqueID that is returned upon a successful PA

authentication.userId=8a8294184e736012014e78a17a6a15b0
authentication.entityId=8a8294184e736012014e78a17a5615ac
authentication.password=f2FEKZqtBz
amount=10.00
currency=MXN
paymentType=CP


Get the payment status

Once the payment has been processed, the customer is redirected to your shopperResultUrl along with a GET parameter resourcePath.

...

Code Block
firstline1
titlePayment status
linenumberstrue
//GET Request to the following URL:
//https://test.oppwa.com/v1/checkouts/{checkoutId}/payment
//The id is what you receive in the previous response once a payment was initiated.
//-h Authorization: 
authentication.userId=8a8294184e736012014e78a17a6a15b0
authentication.entityId=8a8294184e736012014e78a17a5615ac
authentication.password=f2FEKZqtBzBearer askldhaslrnkaSDDTRIadewunaSDKJLsaTUqwejQWU2-2==
//your API Credentials
entityId=8a8294174ae82ada014aedfd75aa1d79
//end of API Credentials


We recommend that you verify the following fields from the Payment Status response, by comparing the returned values with expected:

...