Wirecard Custom Boon Payments
Activating the Voucher with required payment Info
Here, we need the level 2 token and client Id of the sender, and we pass these when activating the voucher
{
    "type": "BOON",
    "module": "CALLBACK",
    "voucherInfo": {
      "accessKey" : "292749827398472397293874 ",
      "clientId" : "123456"
    }
}
Android Example
Map<String, String> voucherInfo = new HashMap<>();
voucherInfo.put("accessKey", "292749827398472397293874 ");
voucherInfo.put("clientId", "123456");
PaymentInfoSource paymentInfoSource = PaymentInfoSource.callback("BOON", voucherInfo);
paymentInfoSource.setApproved(true);
Receiver Limit Errors in the Success Response
When getting the returned voucher for a successful call, but where the receiver has limits - inside voucher.paymentInfo.destInfo.voucherInfo, look for the following fields.
Max account limit exceeded, DE Receiver, non KYC3.
{
  "paymentInfo" : {
    "destInfo": {
       "voucherInfo": {
          "receiverLimitError": "LIMITED_UPGRADE"
       }
    }
  }
}
Android example
voucher.getPaymentInfo().getPaymentDestInfo().getVoucherInfo().get("receiverLimitError")
Max account limit exceeded, non KYC3.
{
  "paymentInfo" : {
    "destInfo": {
       "voucherInfo": {
          "receiverLimitError": "LIMITED_UPGRADE_RESET"
       }
    }
  }
}
Max account limit exceeded, KYC3 user.
{
  "paymentInfo" : {
    "destInfo": {
       "voucherInfo": {
          "receiverLimitError": "LIMITED_RESET"
       }
    }
  }
}
Activate Error Handling:
Android Example
        voucherManager.activateVoucher(voucherId, paymentSource)
                .subscribe(new Subscriber<Voucher>() {
                    @Override
                    public void onError(Throwable e) {
                        if (e instanceof PaymentError) {
                            ((PaymentError) e).getRawError().getErrorFields().get("accessKey").getErrorEnum();
                        }
                    }
                });
Invalid Token
{
     "error": {
        "errorEnum": "PAYMENT_CREATOR_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "accessKey",
              "errorEnum": "INVALID_TOKEN"
            }
        ]
     
     }
}
Invalid Recipient (missing msisdn)
{
     "error": {
        "errorEnum": "PAYMENT_CREATOR_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "recipient",
              "errorEnum": "INVALID"
            }
        ]
     
     }
}
Debit Declined
{
     "error": {
        "errorEnum": "PAYMENT_CREATOR_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "transfer",
              "errorEnum": "DEBIT_DECLINED"
          }
        ]
     
     }
}
Claiming the Voucher with required Info
Here, we need the level 2 token and client Id of the receiver during the claim call. (Client update coming soon)
{
    "type": "BOON",
    "module": "CALLBACK",
    "voucherInfo": {
      "accessKey": "2394187193847983749732987",
      "clientId": "123456"
    }
}
Android Example
Create a custom PaymentOption
public class CallbackPaymentOption extends PaymentOption.Default {
    @Override
    public boolean handlesPaymentType(@NonNull String type, String module) {
        return "BOON".equals(module);
    }
    @Override
    public Observable<PaymentInfoDest> getPaymentInfoDest(@NonNull Voucher voucher, @NonNull LoadingBaseActivity activity) {
        Map<String, String> voucherInfo = new HashMap<>();
        voucherInfo.put("accessKey", "2394187193847983749732987 ");
        voucherInfo.put("clientId", "123456");
        return Observable.just(PaymentInfoDest.callback("BOON", voucherInfo));
    }
}
Then add it to your Engine setup
Engine.Builder builder = new Engine.Builder(serverUrl, sdkId);
builder.addPaymentOption(new CallbackPaymentOption());
builder.build();
Claim Error Handling
Limits Exceeded
{
     "error": {
        "errorEnum": "PAYMENT_CLAIMER_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "recipient",
              "errorEnum": "LIMITS_EXCEEDED"
          }
        ]
     
     }
}
Invalid Token
{
     "error": {
        "errorEnum": "PAYMENT_CLAIMER_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "accessKey",
              "errorEnum": "INVALID_TOKEN"
            }
        ]
     
     }
}
Debit Declined
{
     "error": {
        "errorEnum": "PAYMENT_CREATOR_ERROR",
        "httpStatus": "400",
        "errorFields": [
          {
              "fieldKey": "transfer",
              "errorEnum": "CREDIT_DECLINED"
          }
        ]
     
     }
}
