# /paymentmethods/idealqr/v1/bulk

Allows the creation of idealQR transactions in **bulk**.
Since this is a bulk operation the following rules apply:
- if at least 1 qr code was created, the response status of the request wil be 200 (status 200 does not guarantee that all the Qr codes have been created, see the response body to get more details over which qr codes have been successfully created)
- In case none of the qr codes was created, if there is any scenario where the reason might be a request with a client error, then a status 400 wil be given as response code, otherwise a status 500 will be retrieved.
- The client always has to check the response body to see which Qr codes have been created successfully.

<br>

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Payments Gateway",
    "description": "Common payments API",
    "version": "1.23.0"
  },
  "security": [
    {
      "oAuth2ClientCredentials": []
    }
  ],
  "servers": [
    {
      "url": "/api/v1/"
    }
  ],
  "paths": {
    "/paymentmethods/idealqr/v1/bulk": {
      "post": {
        "description": "Allows the creation of idealQR transactions in **bulk**.\nSince this is a bulk operation the following rules apply:\n- if at least 1 qr code was created, the response status of the request wil be 200 (status 200 does not guarantee that all the Qr codes have been created, see the response body to get more details over which qr codes have been successfully created)\n- In case none of the qr codes was created, if there is any scenario where the reason might be a request with a client error, then a status 400 wil be given as response code, otherwise a status 500 will be retrieved.\n- The client always has to check the response body to see which Qr codes have been created successfully.\n",
        "tags": [
          "idealqr"
        ],
        "operationId": "bulkCreateIdealQROrdersController",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "qrcodes"
                    ],
                    "properties": {
                      "defaults": {
                        "$ref": "#/components/schemas/BulkDefaults"
                      },
                      "qrcodes": {
                        "$ref": "#/components/schemas/BulkQrCodesRequest"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkIdealQRResponse"
          },
          "400": {
            "$ref": "#/components/responses/BulkIdealQRResponse"
          },
          "500": {
            "$ref": "#/components/responses/BulkIdealQRResponse"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BulkDefaults": {
        "description": "Contains default values to create a QR code in bulk.",
        "allOf": [
          {
            "type": "object",
            "required": [
              "reference",
              "amount",
              "description",
              "expiresAt",
              "size"
            ],
            "properties": {
              "amountChangeable": {
                "$ref": "#/components/schemas/AmountChangeable"
              },
              "reference": {
                "$ref": "#/components/schemas/Reference"
              },
              "amount": {
                "$ref": "#/components/schemas/Amount"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency"
              },
              "purchaseId": {
                "description": "Identification of the transaction within the merchant's system. Letters and numbers only.\nUltimately appears on the payment confirmation (statement and confirmation screen).\n",
                "type": "string",
                "pattern": "^\\[a-zA-Z0-9]$",
                "maxLength": 35,
                "minLength": 1,
                "example": "order123"
              },
              "description": {
                "description": "Description of the underlying value or reason of the payment.\nUltimately appears on the payment confirmation (statement and confirmation screen).\n",
                "type": "string",
                "maxLength": 35,
                "example": "Order at yourdomain.tld"
              },
              "expiresAt": {
                "$ref": "#/components/schemas/Datetime"
              },
              "reusable": {
                "$ref": "#/components/schemas/Reusable"
              },
              "size": {
                "type": "integer",
                "minimum": 100,
                "maximum": 2000,
                "example": 200
              },
              "language": {
                "$ref": "#/components/schemas/Language"
              },
              "webhooks": {
                "$ref": "#/components/schemas/TransactionWebhooksQR"
              }
            }
          },
          {
            "$ref": "#/components/schemas/ReturnUrl"
          }
        ]
      },
      "BulkQrCodesRequest": {
        "description": "Array of qr code objects with values to overwrite defaults",
        "maximum": 100,
        "minimum": 1,
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/BulkQrCodeItemInRequest"
        }
      },
      "BulkQrCodeItemInRequest": {
        "description": "Contains values that will overwrite defaults when creating a QR code in bulk.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "amountChangeable": {
                "$ref": "#/components/schemas/AmountChangeable"
              },
              "reference": {
                "$ref": "#/components/schemas/Reference"
              },
              "amount": {
                "$ref": "#/components/schemas/Amount"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency"
              },
              "purchaseId": {
                "description": "Identification of the transaction within the merchant's system. Letters and numbers only.\nUltimately appears on the payment confirmation (statement and confirmation screen).\n",
                "type": "string",
                "pattern": "^\\[a-zA-Z0-9]$",
                "maxLength": 35,
                "minLength": 1,
                "example": "order123"
              },
              "description": {
                "description": "Description of the underlying value or reason of the payment.\nUltimately appears on the payment confirmation (statement and confirmation screen).\n",
                "type": "string",
                "maxLength": 35,
                "example": "Order at yourdomain.tld"
              },
              "expiresAt": {
                "$ref": "#/components/schemas/Datetime"
              },
              "reusable": {
                "$ref": "#/components/schemas/Reusable"
              },
              "size": {
                "type": "integer",
                "minimum": 100,
                "maximum": 2000,
                "example": 200
              },
              "language": {
                "$ref": "#/components/schemas/Language"
              },
              "webhooks": {
                "$ref": "#/components/schemas/TransactionWebhooksQR"
              }
            }
          },
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "returnUrls": {
                    "type": "object",
                    "required": [
                      "success",
                      "cancelled",
                      "expired",
                      "failed"
                    ],
                    "properties": {
                      "success": {
                        "type": "string",
                        "format": "url",
                        "maxLength": 2000,
                        "example": "https://yourdomain.tld/order/payment-success.html"
                      },
                      "cancelled": {
                        "type": "string",
                        "format": "url",
                        "maxLength": 2000,
                        "example": "https://yourdomain.tld/order/payment-cancelled.html"
                      },
                      "expired": {
                        "type": "string",
                        "format": "url",
                        "maxLength": 2000,
                        "example": "https://yourdomain.tld/order/payment-expired.html"
                      },
                      "failed": {
                        "type": "string",
                        "format": "url",
                        "maxLength": 2000,
                        "example": "https://yourdomain.tld/order/payment-failed.html"
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "returnUrl": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 2000,
                    "example": "https://yourdomain.tld/order/return?orderID=order123"
                  }
                }
              }
            ]
          }
        ]
      },
      "BulkIdealQRCodeErrorResponseItem": {
        "description": "provides details on errors while creating qr codes in bulk",
        "type": "object",
        "properties": {
          "error": {
            "description": "contains the details of an error",
            "type": "object",
            "required": [
              "id",
              "message"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the error",
                "example": "51365d8a-d3c1-4c5f-9556-e8d7ff383eee"
              },
              "message": {
                "type": "string",
                "description": "message indicating details of the error",
                "example": "Invalid request message"
              }
            }
          }
        }
      },
      "BulkIdealQRCodesResponseItem": {
        "description": "provides details qr codes (created or not) in bulk",
        "type": "object",
        "properties": {
          "qrcodes": {
            "description": "contains the details of the qr code transactions (created or not)",
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/BulkIdealQRCodesInResponseItem"
                }
              ]
            }
          }
        }
      },
      "BulkIdealQRCodesInResponseItem": {
        "description": "Contains details of a QR code created in bulk, or details of the error why it could not be created successfully.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/QRCodeTransactionInBulkResponseItem"
          },
          {
            "$ref": "#/components/schemas/ErrorInBulkResponseItem"
          }
        ]
      },
      "QRCodeTransactionInBulkResponseItem": {
        "description": "qr code transaction details of the created qr code",
        "type": "object",
        "properties": {
          "created": {
            "type": "boolean",
            "default": true
          },
          "transaction": {
            "type": "object",
            "required": [
              "id",
              "action"
            ],
            "properties": {
              "id": {
                "description": "ID of the transaction. It can be used to retrieve qr code transaction details by using it in combination with other endpoints provided in this api.",
                "type": "string",
                "format": "uuid",
                "minLength": 36,
                "maxLength": 36,
                "example": "8db1e7fa-ba8a-4189-92fd-67a20217443d"
              },
              "action": {
                "description": "Next action to be performed by merchant (or consumer) to complete the payment.",
                "type": "object",
                "nullable": true,
                "properties": {
                  "qrcode": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "ID of the QR Code known by the iDEAL QR Backend of CM.",
                        "type": "string"
                      },
                      "url": {
                        "description": "URL to QR code image to be scanned by consumer to perform the payment.",
                        "type": "string",
                        "format": "url",
                        "example": "https://qrbackend.tld/images/213981209381209390821.png"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ErrorInBulkResponseItem": {
        "description": "details of the error about why the requested qr code could not be created in bulk",
        "type": "object",
        "properties": {
          "created": {
            "type": "boolean",
            "default": false
          },
          "error": {
            "description": "contains the details of an error",
            "type": "object",
            "required": [
              "id",
              "message"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the error",
                "example": "51365d8a-d3c1-4c5f-9556-e8d7ff383eee"
              },
              "message": {
                "type": "string",
                "description": "message indicating details of the error",
                "example": "Invalid request message"
              }
            }
          }
        }
      },
      "AmountChangeable": {
        "description": "Contains the minimum and maximum values for the amount of a QR code that a consumer can set themselves after scanning the code.",
        "type": "object",
        "nullable": true,
        "properties": {
          "min": {
            "description": "Minimum of the amount. Must be higher than 0",
            "type": "integer",
            "example": 1
          },
          "max": {
            "description": "Maximum of the amount. Must be higher than the minimum and lower than 5000000.",
            "type": "integer",
            "example": 50000
          }
        }
      },
      "ReturnUrl": {
        "oneOf": [
          {
            "required": [
              "returnUrls"
            ],
            "type": "object",
            "properties": {
              "returnUrls": {
                "type": "object",
                "required": [
                  "success",
                  "cancelled",
                  "expired",
                  "failed"
                ],
                "properties": {
                  "success": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 2000,
                    "example": "https://yourdomain.tld/order/payment-success.html"
                  },
                  "cancelled": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 2000,
                    "example": "https://yourdomain.tld/order/payment-cancelled.html"
                  },
                  "expired": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 2000,
                    "example": "https://yourdomain.tld/order/payment-expired.html"
                  },
                  "failed": {
                    "type": "string",
                    "format": "url",
                    "maxLength": 2000,
                    "example": "https://yourdomain.tld/order/payment-failed.html"
                  }
                }
              }
            }
          },
          {
            "required": [
              "returnUrl"
            ],
            "type": "object",
            "properties": {
              "returnUrl": {
                "type": "string",
                "format": "url",
                "maxLength": 2000,
                "example": "https://yourdomain.tld/order/return?orderID=order123"
              }
            }
          }
        ]
      },
      "Reference": {
        "description": "Identifier from client. This value will be sent in the webhook payload alongside the ID you receive as part of the response of a transaction.",
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "example": 20210623130413,
        "default": ""
      },
      "Datetime": {
        "description": "ISO 8601 date and time",
        "type": "string",
        "format": "date-time",
        "minLength": 20,
        "example": "2006-01-02T15:04:05Z"
      },
      "Reusable": {
        "description": "Indicates the qr code's ability to accept multiple successful payments",
        "type": "boolean",
        "default": false,
        "example": false
      },
      "Amount": {
        "description": "Denomination in the smallest currency subunit, as for example eurocents.",
        "type": "integer",
        "minimum": 1,
        "maximum": 99999999,
        "example": 1200
      },
      "Currency": {
        "description": "ISO 4217 currency code",
        "type": "string",
        "minLength": 3,
        "maxLength": 3,
        "default": "EUR",
        "example": "EUR"
      },
      "Language": {
        "description": "Preferred language of the user interface",
        "type": "string",
        "example": "nl"
      },
      "TransactionWebhooksQR": {
        "description": "Webhooks enable receiving a web request once a given event occurs. \nWe won't do preventive rate-limiting in order to have the highest throughput possible. \nHowever, we will honor 429 (Too-many-requests) responses per callback. \nWe use the Retry-After header to retry after a certain period. If the header was not set we use our default exponential delay implementation.\n",
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "url",
            "events"
          ],
          "properties": {
            "url": {
              "description": "The URL the request must be send to.",
              "type": "string",
              "format": "url",
              "example": "https://yourdomain.tld/webhooks?purchaseId=order123"
            },
            "events": {
              "description": "The events when this URL must be requested.",
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/components/schemas/TransactionWebhookQREvents"
              }
            }
          }
        },
        "example": [
          {
            "url": "https://yourdomain.tld/order-webhooks?purchaseId=order123",
            "events": [
              "FINALSTATUS"
            ]
          },
          {
            "url": "https://yourdomain.tld/order-webhooks?purchaseId=order123",
            "events": [
              "STATUS_CHANGE"
            ]
          },
          {
            "url": "https://yourdomain.tld/payment-webhooks?purchaseId=order123",
            "events": [
              "QR_PAYMENT_CREATED"
            ]
          }
        ]
      },
      "TransactionWebhookQREvents": {
        "description": "* `FINALSTATUS` - When the status of the transaction becomes final; it is no longer `OPEN`.\n* `STATUS_CHANGE` - When the status of the transaction changes to any other value.\n* `QR_PAYMENT_CREATED` - When a new payment is created using the qr code.\n",
        "type": "string",
        "enum": [
          "FINALSTATUS",
          "STATUS_CHANGE",
          "QR_PAYMENT_CREATED"
        ],
        "example": "FINALSTATUS"
      },
      "Digest": {
        "description": "Digest of whole message body",
        "type": "string",
        "example": "sha-256=OWM5MDc3ODYwNzdjYjE5NjU0Y2NjMDM4MzEyYzMxZTA5MTAzMDBjYWM1Y2I1ODM4NTdlMDU2MzhiMzE1ZDhjNw==",
        "externalDocs": {
          "description": "Instance Digests in HTTP",
          "url": "https://datatracker.ietf.org/doc/html/rfc3230"
        }
      }
    },
    "responses": {
      "BulkIdealQRResponse": {
        "description": "iDEAL-QR details when created in bulk. Depending on the scenario, the response might include an error or the array of Qr codes indicating details regarding which qr codes have been successfully created and which ones not. **A 200 response status code does not guarantee that all Qr codes have been created, the client must check the response body**.",
        "headers": {
          "Digest": {
            "$ref": "#/components/headers/Digest"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BulkIdealQRCodesResponseItem"
                },
                {
                  "$ref": "#/components/schemas/BulkIdealQRCodeErrorResponseItem"
                }
              ]
            }
          }
        }
      }
    },
    "headers": {
      "Digest": {
        "description": "Digest of whole message body",
        "schema": {
          "$ref": "#/components/schemas/Digest"
        }
      }
    },
    "securitySchemes": {
      "oAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/api/v1/authorization/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 234,
      "2": 76,
      "3": 191,
      "4": 145,
      "5": 198,
      "6": 48,
      "7": 79,
      "8": 46,
      "9": 249,
      "10": 185,
      "11": 249
    }
  }
}
```