# Paysafecard

### **Supported Brands**

| Brand Name  |
| ----------- |
| PAYSAFECARD |

| Transaction Types | Meaning                                               | Success return codes |
| ----------------- | ----------------------------------------------------- | -------------------- |
| DB                | Debit of the card without prior authorization request | 000.000.000          |

### **Create the checkout** <a href="#paysafecard-createthecheckout" id="paysafecard-createthecheckout"></a>

\
**Create the checkout:** [**https://test.oppwa.com/v1/checkouts/**](https://test.oppwa.com/v1/checkouts/)

| <p><code>// GET Request to the following endpoint:</code></p><p><code>//</code><a href="https://test.oppwa.com/v1/checkouts/"><code><https://test.oppwa.com/v1/checkouts/></code></a> </p><p></p><p><code>amount=1.00       //currency has to be EUR on Test environment and BRL on Production</code></p><p><code>currency=EUR</code></p><p><code>paymentType=PA//your API Credentials</code></p><p><code>authentication.userId=8a8294174ae82ada014aedf7fb151d5f</code></p><p><code>authentication.password=AKdx7nmH</code></p><p><code>authentication.entityId=8a8294174ae82ada014aedfd75aa1d79//end of API Credentialscustomer.ip=1.1.1.1</code></p><p><code>customer.email=<test@test.com></code></p><p><code>merchantTransactionID=1234 //this value will show up on settlement reports and serves as your reference for this transaction</code></p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### **Successful Response** <a href="#paysafecard-successfulresponse" id="paysafecard-successfulresponse"></a>

\
**Response Checkout**

| <p><code>{</code>  </p><p>   <code>"result":{</code></p><p>ㅤㅤㅤ<code>"code":"000.200.100",</code></p><p>ㅤㅤㅤ<code>"description":"successfully created checkout"</code></p><p>  <code>},</code>  </p><p>ㅤ<code>"buildNumber":"beb408d1f2c902bfb8665e2b4e268f1039848d03\@2016-02-16 12:49:58 +0000",</code>  </p><p>ㅤ<code>"timestamp":"2016-02-16 13:25:09+0000",</code>  </p><p>ㅤ<code>"ndc":"DA84DCEB01BD28810E992D9EC8085985.sbg-vm-tx01",</code>                      ㅤㅤㅤㅤㅤㅤ<code>"id":"DA84DCEB01BD28810E992D9EC8085985.sbg-vm-tx01"</code></p><p><code>}</code></p> |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### **Create the Hosted Payment Page / Payment Form** <a href="#paysafecard-createthehostedpaymentpage-paymentform" id="paysafecard-createthehostedpaymentpage-paymentform"></a>

\
**Payment Form**

| <p><code>\<script> // Display the CPF number and set language to Portuguese</code></p><p>   <code>var</code> <code>wpwlOptions ={ showTaxNumberField:true, locale:"pt"}</code></p><p><code>\</script></code></p><p><code>\<scriptsrc=</code> "<a href="https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=75E53EDE2467B24C179501962555376C.sbg-vm-tx02%22"><https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=75E53EDE2467B24C179501962555376C.sbg-vm-tx02>"</a><code>></code></p><p><code>\</script></code></p><p><code>\<form action=" {shopperResultUrl}"</code> <code>class="paymentWidgets">PAYSAFECARD\</form>    // Define the brand PAYSAFECARD and also set the shopper result URL in which the shopper is being redirected to once the payment is conclueded</code></p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

**You will be re-directed to paysafecard. Please use this code to complete the payment: 1000009011101219**

### **Get the payment status** <a href="#paysafecard-getthepaymentstatus" id="paysafecard-getthepaymentstatus"></a>

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

**Important**: The baseUrl must end in a "/", e.g. "<https://test.oppwa.com/>".

Then, to get the status of the payment, you should make a GET request to the baseUrl + resourcePath, including your authentication parameters.**Payment status**

| <p><code>//GET Request to the following URL:</code></p><p><code>//</code><a href="https://test.oppwa.com/v1/checkouts/%7BcheckoutId%7D/payment"><code><https://test.oppwa.com/v1/checkouts/{checkoutId}/payment></code></a><code>//The id is what you receive in the previous response once a payment was initiated.</code> <code>authentication.userId=8a8294184e736012014e78a17a6a15b0</code></p><p><code>authentication.entityId=8a8294184e736012014e78a17a5615ac</code></p><p><code>authentication.password=f2FEKZqtBz</code></p> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

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

* ID(s)
* Amount
* Currency
* Brand
* Type

### **Field specifications** <a href="#paysafecard-fieldspecifications" id="paysafecard-fieldspecifications"></a>

| **Name**              | **Description**                                                                    | **Format**                          | **Example**                       |
| --------------------- | ---------------------------------------------------------------------------------- | ----------------------------------- | --------------------------------- |
| amount                | Amount of the payment request. The dot is used as a decimal separator.             | N13\[0- 9]{1,10}\\.\[0 -9]{2}       | 1.00                              |
| currency              | Currency Code according to ISO 4217 specifications of the payment request’s amount | A3 \[a-zA-Z]{3}                     | BRL                               |
| customer.email        | The (internal) email address of the customer                                       | AN128 \[\s\S]{6,12 8}               | <test@test.com>                   |
| customer.ip           | AN255 \[\s\S]{1,25 5}                                                              | AN255 \[\s\S]{1,25 5}               | 1.1.1.1                           |
| merchantTransactionID | Merchant-provided reference number                                                 | AN255 \[\s\S]{1,25 5}               | 1234                              |
| shopperResultUrl      | Result URL after payment is completet                                              | <p>AN2048</p><p>\[\s\S]{6,2048}</p> | <http://merchant.com/success.php> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.primeiropay.com/paysafecard-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
