Requests

      Requests


        Article Summary

        Paymentinvitation

        The paymentinvitation action is the only action provided by the PayPerEmail service, it is also the default action. The action is used to register a payment invitation and it will result in a paylink that is either sent via email by Buckaroo, or that is returned in the response message, so the merchant can send it via email.

        Payment invitation request

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        CustomerGenderDecimalRequiredGender of the customer, possible values: 1: Male, 2: Female, 0: Unknown, 9: Not applicable.
        CustomerEmailStringRequired when MerchantSendsEmail = TrueThe e-mail address of the customer.
        CustomerFirstNameStringRequiredThe first name of the customer.
        CustomerLastNameStringRequiredThe last name of the customer.
        MerchantSendsEmailBoolean valueFalse: Buckaroo will send the e-mail to the customer. True: Buckaroo will not send the e-mail and will only provide the paylink in the response. Default value is false.
        ExpirationDateStringThe expiration date (dd-mm-yyy) for the paylink. From this date onwards, the paylink will no longer work. (Please note that if a ‘delayed’ payment has been chosen (like bank transfer) on the paylink page before this expiration date, the payment for that payment can still arrive and be accepted.
        PaymentMethodsAllowedStringA comma separated list of service codes specifying which services (that support the Pay action) can be used to pay the PayPerEmail with. The order in which the payment methods are listed also determines the order in which they are displayed to the customer on the Buckaroo checkout page. If no service code is provided, all services the merchant has a valid subscription for are offered to the customer. Please note: if you are sending the service Credit Management in the request as well, this parameter won't work. Instead you can use the "AllowedServices" and "AllowedServicesAfterDueDate" parameters within the Credit Management service. See the Credit Management documentation for more information.
        Basic parameters

        Example request

        {
          "Currency": "EUR",
          "AmountDebit": 10.00,
          "Invoice": "testinvoice 123",
          "Services": {
            "ServiceList": [
              {
                "Name": "payperemail",
                "Action": "PaymentInvitation",
                "Parameters": [
                  {
                    "Name": "customergender",
                    "Value": "1"
                  },
                  {
                    "Name": "MerchantSendsEmail",
                    "Value": "false"
                  },
                  {
                    "Name": "ExpirationDate",
                    "Value": "2017-10-01"
                  },
                  {
                    "Name": "PaymentMethodsAllowed",
                    "Value": "ideal,mastercard,paypal"
                  },
                  {
                    "Name": "Attachment",
                    "Value": ""
                  },
                  {
                    "Name": "CustomerEmail",
                    "Value": "johnsmith@gmail.com"
                  },
                  {
                    "Name": "CustomerFirstName",
                    "Value": "John"
                  },
                  {
                    "Name": "CustomerLastName",
                    "Value": "Smith"
                  }
                ]
              }
            ]
          }
        }
        

        Paymentinvitation response

        If the request has a valid structure and a valid signature, a transaction will be created in the Payment Engine and a response will be returned. In this case, a pay link will be returned. This link can then be forwarded to the customer per email.

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        PayLinkStringRequiredThe URL where the customer can complete the payment for the PayPerEmail.
        ExpirationDateStringRequiredIf no expiration date is given in the request, the default is one year.
        Basic parameters

        Example response

        {
            "Key": "DB65C22E81EE4409B27A60A6C2XXXXXX",
            "Status": {
                "Code": {
                    "Code": 792,
                    "Description": "Waiting for consumer"
                },
                "SubCode": null,
                "DateTime": "2017-05-18T11:45:44+02:00"
            },
            "RequiredAction": null,
            "Services": [
                {
                    "Name": "payperemail",
                    "Action": null,
                    "Parameters": [
                        {
                            "Name": "PayLink",
                            "Value": "https://testcheckout.buckaroo.nl/html/?brq_paydirect_trx=DB65C22E81EE4409B27A60A6C2XXXXXX"
                        },
                        {
                            "Name": "ExpirationDate",
                            "Value": "2017-10-01"
                        }
                    ]
                }
            ],
            "CustomParameters": null,
            "AdditionalParameters": null,
            "RequestErrors": null,
            "Invoice": "testinvoice 123",
            "ServiceCode": "payperemail",
            "IsTest": true,
            "Currency": "EUR",
            "AmountDebit": 10,
            "TransactionType": "I100",
            "MutationType": 3,
            "RelatedTransactions": null,
            "ConsumerMessage": {
                "MustRead": false,
                "CultureName": "en-US",
                "Title": null,
                "PlainText": "An invitation to pay has been sent to your e-mail address.",
                "HtmlText": null
            },
            "Order": null,
            "IssuingCountry": null,
            "StartRecurrent": false,
            "Recurring": false,
            "CustomerName": "John Smith",
            "PayerHash": null,
            "PaymentKey": null
        }
        

        Paymentinvitation push

        The initial transaction status will be 'pending', which will be pushed first. When the customer uses the paylink to complete the payment, a transaction is created for the chosen service. For more information about these transactions, please refer to the implementation manual for their respective service.

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        PayLinkStringRequiredThe URL where the customer can complete the payment for the PayPerEmail.
        ExpirationDateStringRequiredIf no expiration date is given in the request, the default is one year.
        Basic parameters

        Example response

        
        {
          "Transaction": {
            "Key": "DB65C22E81EE4409B27A60A6C2XXXXXX",
            "Invoice": "testinvoice 123",
            "ServiceCode": "payperemail",
            "Status": {
              "Code": {
                "Code": 792,
                "Description": "Waiting for consumer"
              },
              "SubCode": null,
              "DateTime": "2017-05-18T11:45:44"
            },
            "IsTest": true,
            "Order": null,
            "Currency": "EUR",
            "AmountDebit": 10,
            "TransactionType": "I100",
            "Services": [
              {
                "Name": "payperemail",
                "Action": null,
                "Parameters": [
                  {
                    "Name": "PayLink",
                    "Value": "https://testcheckout.buckaroo.nl/html/?brq_paydirect_trx=DB65C22E81EE4409B27A60A6C2XXXXXX"
                  },
                  {
                    "Name": "ExpirationDate",
                    "Value": "2017-10-01"
                  }
                ],
                "VersionAsProperty": 1
              }
            ],
            "CustomParameters": null,
            "AdditionalParameters": null,
            "MutationType": 3,
            "RelatedTransactions": null,
            "IsCancelable": true,
            "IssuingCountry": null,
            "StartRecurrent": false,
            "Recurring": false,
            "CustomerName": "John Smith",
            "PayerHash": null,
            "PaymentKey": null
          }
        }
        

        Once the payment has been fulfilled (for example with iDEAL),
        a new push response will follow with a succes status:

        {
           "Transaction": {
              "Key": "8E61753006BC468CB3349011EE19Cxxx",
              "Invoice": "testinvoice 1235",
              "ServiceCode": "payperemail",
              "Status": {
                 "Code": {
                    "Code": 190,
                    "Description": "Succes"
                 },
                 "SubCode": {
                    "Code": "S001",
                    "Description": "Transactie succesvol uitgevoerd"
                 },
                 "DateTime": "2018-03-09T12:19:37"
              },
              "IsTest": true,
              "Order": null,
              "Currency": "EUR",
              "AmountDebit": 10,
              "TransactionType": "I100",
              "Services": [
                 {
                    "Name": "payperemail",
                    "Action": null,
                    "Parameters": [
                       {
                          "Name": "PayLink",
                          "Value": "https://testcheckout.buckaroo.nl/html/?brq_paydirect_trx=8E61753006BC468CB3349011EE19Cxxx"
                       },
                       {
                          "Name": "ExpirationDate",
                          "Value": "2019-10-01"
                       }
                    ],
                    "VersionAsProperty": 1
                 },
                 {
                    "Name": "ideal",
                    "Action": null,
                    "Parameters": [
                       {
                          "Name": "consumerIssuer",
                          "Value": "ABN Amro Bank"
                       },
                       {
                          "Name": "transactionId",
                          "Value": "0000000000000001"
                       },
                       {
                          "Name": "consumerName",
                          "Value": "J. de Tèster"
                       },
                       {
                          "Name": "consumerIBAN",
                          "Value": "NL44RABO0123456789"
                       },
                       {
                          "Name": "consumerBIC",
                          "Value": "RABONL2U"
                       }
                    ],
                    "VersionAsProperty": 2
                 }
              ],
              "CustomParameters": null,
              "AdditionalParameters": null,
              "MutationType": 3,
              "RelatedTransactions": null,
              "IsCancelable": false,
              "IssuingCountry": null,
              "StartRecurrent": false,
              "Recurring": false,
              "CustomerName": "John Smith",
              "PayerHash": "xxxxxxxxxxxxxxxxxxxxx",
              "PaymentKey": "593EA66D43414C428BBFE20391C8Exxx"
           }
        }
        

        Attachment

        3. Attachments

        It is possible to let the Payment Engine send emails that include attachment. However, the attachment must first be uploaded to the Buckaroo SFTP server. Please contact your sales contact for information about our SFTP service. If an attachment is not available at the time of requesting a PayPerEmail, the PaymentInvitation request will fail.

        3.1 Uploading your attachments

        Your attachment need to be uploaded in the subfolder of your sftp home folder: ~/uploads/attachments/

        At this time, only PDF files are allowed to be uploaded. There is a maximum file size of 300kB and all files need to be virus free. After your files have been uploaded, allow at least 30 minutes for us to verify your files conform to our guidelines. Once the attachments folder is empty, your files will have been processed and is available for use. Please note: attachments are only available for 2 weeks, after 2 weeks, attachments will be removed.

        Attachment request

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        attachmentStringRequiredFile name of the attachment. Needs to be a PDF file.
        Basic parameters

        Example request

        {
           "Currency": "EUR",
           "AmountDebit": 10,
           "Invoice": "testinvoice 123",
           "Services": {
              "ServiceList": [
                 {
                    "Name": "payperemail",
                    "Action": "PaymentInvitation",
                    "Parameters": [
                       {
                          "Name": "customergender",
                          "Value": "1"
                       },
                       {
                          "Name": "MerchantSendsEmail",
                          "Value": "false"
                       },
                       {
                          "Name": "ExpirationDate",
                          "Value": "2019-10-01"
                       },
                       {
                          "Name": "PaymentMethodsAllowed",
                          "Value": "ideal,mastercard,paypal"
                       },
                       {
                          "Name": "Attachment",
                          "Value": ""
                       },
                       {
                          "Name": "CustomerEmail",
                          "Value": "johnsmith@gmail.com"
                       },
                       {
                          "Name": "CustomerFirstName",
                          "Value": "John"
                       },
                       {
                          "Name": "CustomerLastName",
                          "Value": "Smith"
                       },
                       {
                          "Name": "attachment",
                          "GroupType": "",
                          "GroupID": "1",
                          "Value": "bijlage1.pdf"
                       },
                       {
                          "Name": "attachment",
                          "GroupType": "",
                          "GroupID": "2",
                          "Value": "bijlage2.pdf"
                       }
                    ]
                 }
              ]
           }
        }
        

        Was dit artikel nuttig?

        What's Next