---
# System prepended metadata

title: MobilePay GiftCards

---

# MobilePay GiftCards

Questions

* Do we need quantities for products? How do we handle them?
* How do we handle different languages?
* Product reference can only contain a-z, A-Z, 0-9, _ or -, is that OK?
* Should we display the value/discount of the product you are buying?

Notes
* API to update purchase terms per Marketplace Seller, must be versioned
* Expiration date should be after delivery time
* We need to be able to refund up to 14 days after gift card purchase, probably needs a cancel endpoint
* Do we wanna go for no status updates or balance checks or put it as a hard requirement

## MobilePay Marketplace API

Owned by MobilePay called by Marketplace Seller

<details>
<summary><b>POST products</b></summary>

Adds a new product to the Marketplace

##### Request
```json
{
    "productReference": "Uy9C9PB9kqU8M2tep5MAA", // We will be idempotent on this value
    "productDetails": {
        {
            "language": "DA",
            "productName": "Matas Gavekort",
            "productDescroption": "Et gavekort til Matas, der kan bruges I alle Matas butikker.",
            "productImageUrls": [
                "https://gogift.dk/matas/image1.png",
                "https://gogift.dk/matas/image2.png"
            ],
            "detailsUrl": "https://matas.dk/gavekort",
            "validity": "Gælder 2 år fra købsdato"
        },
        {
            "language": "EN"
            "productName": "Matas Gift Card",
            "productDescroption": "A gift card for Matas that can be used in all Matas stores.",
            "productImageUrls": [
                "https://gogift.dk/matas/image1.png",
                "https://gogift.dk/matas/image2.png"
            ],
            "detailsUrl": "https://matas.dk/gavekort",
            "validity": "Valid 2 years from purchase"
        }
    }
    "currencyCode": "DKK",
    "configuration": {
        "incremental": {
            "minimum": 100,
            "maximum": 10000,
            "increment": 50,
            "pricePer": 0.90,
            "vatPer": 0.10,
            "type": "amount | quantity"
        }
    },
    "unwrappingLogoUrl": "https://gogift.dk/assets/matas-logo",
    "marketplaceImageUrl": "https://gogift.dk/assets/matas-logo",
    "expirationDate": "2011-02-29 12:43:00"
}
```

##### Response 200 OK
</details>


<details>
<summary><b>PATCH products/:productReference</b></summary>

Updates a product on the Marketplace

##### Request
```json
{
    "productDetails": {
        {
            "language": "DA",
            "productName": "Matas Gavekort",
            "productDescroption": "Et gavekort til Matas, der kan bruges I alle Matas butikker.",
            "productImageUrls": [
                "https://gogift.dk/matas/image1.png",
                "https://gogift.dk/matas/image2.png"
            ],
            "detailsUrl": "https://matas.dk/gavekort"
        },
        {
            "language": "EN"
            "productName": "Matas Gift Card",
            "productDescroption": "A gift card for Matas that can be used in all Matas stores.",
            "productImageUrls": [
                "https://gogift.dk/matas/image1.png",
                "https://gogift.dk/matas/image2.png"
            ],
            "detailsUrl": "https://matas.dk/gavekort"
        }
    },
    "validityMonthsFromPurchase": 24
}
```

##### Response 200 OK

##### Response 404 NotFound
</details>

<details>
<summary><b>GET products/:productReference</b></summary>

Returns details for a product on the Marketplace

##### Response 200 OK - Same as POST products request
</details>


<details>
<summary><b>GET products</b></summary>

Returns details for all products on the Marketplace owned by the calling Marketplace Seller

##### Response 200 OK - Same as POST products request
</details>


<details>
<summary><b>DELETE products/:productReference</b></summary>

Removes a product from the Marketplace

##### Response 200 OK
</details>



## Marketplace API

Owned by Marketplace Seller called by MobilePay

<details>
<summary><b>POST orders</b></summary>

Creates a new order for a specific configuration of a product

##### POST orders
```json
{
	"orderId": "fc6b8155-624a-4d10-9aad-c1df10809913", // You must be idempotent on this id
	"productReference": "Uy9C9PB9kqU8M2tep5MAA",
	"configuration": {
        "fixed": {
            "id": "49e93bf3-07df-4bdb-af7c-500318814cfa" 
        },
        "incremental": {
            "amount": 100
        }
    }
}
```

#### Response 200 OK
```json
{
	"orderReference": "UxKD92jdNDjapqld"
}
```
</details>


<details>
<summary><b>GET orders/:orderReference</b></summary>

Returns details for a specific order

#### Response 200 OK
```json
{
	"productReferenceId": "Uy9C9PB9kqU8M2tep5MAA",
	"expiryDate": "2011-02-29 12:43:00",
	"completelyUsed": "true",
	"remainingValue": "230 kr.",
	"barcodes": [
		{
            "id": "jdkIDJWkw928wJDlda"
			"url": "https://gogift.dk/code/917238273/1",
			"title": "1x Popcorn",
			"description": "Vis denne og få 1,5L popcorn!"
		}
	]
}
```
</details>