public static final class PaymentService.PaymentCreateRequest extends IdempotentPostRequest<Payment>
Request class for PaymentService.create()
.
This fails with a mandate_is_inactive
error if the linked mandate is cancelled or has failed. Payments can be created against mandates with status of: pending_customer_approval
, pending_submission
, submitted
, and active
.
Modifier and Type | Class and Description |
---|---|
static class |
PaymentService.PaymentCreateRequest.Currency |
static class |
PaymentService.PaymentCreateRequest.Links |
Modifier and Type | Method and Description |
---|---|
PaymentService.PaymentCreateRequest |
withAmount(java.lang.Integer amount)
Amount in pence (GBP), cents (AUD/EUR), öre (SEK), or øre (DKK).
|
PaymentService.PaymentCreateRequest |
withAppFee(java.lang.Integer appFee)
The amount to be deducted from the payment as the OAuth app’s fee, in pence/cents/öre/øre.
|
PaymentService.PaymentCreateRequest |
withChargeDate(java.lang.String chargeDate)
A future date on which the payment should be collected.
|
PaymentService.PaymentCreateRequest |
withCurrency(PaymentService.PaymentCreateRequest.Currency currency)
ISO 4217 currency code.
|
PaymentService.PaymentCreateRequest |
withDescription(java.lang.String description)
A human-readable description of the payment.
|
PaymentService.PaymentCreateRequest |
withHeader(java.lang.String headerName,
java.lang.String headerValue) |
PaymentService.PaymentCreateRequest |
withIdempotencyKey(java.lang.String idempotencyKey) |
PaymentService.PaymentCreateRequest |
withLinks(PaymentService.PaymentCreateRequest.Links links) |
PaymentService.PaymentCreateRequest |
withLinksMandate(java.lang.String mandate)
ID of the mandate against which this payment should be collected.
|
PaymentService.PaymentCreateRequest |
withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data.
|
PaymentService.PaymentCreateRequest |
withMetadata(java.lang.String key,
java.lang.String value)
Key-value store of custom data.
|
PaymentService.PaymentCreateRequest |
withReference(java.lang.String reference)
An optional payment reference that will appear on your customer’s bank statement.
|
execute
executeWrapped
public PaymentService.PaymentCreateRequest withAmount(java.lang.Integer amount)
Amount in pence (GBP), cents (AUD/EUR), öre (SEK), or øre (DKK).
public PaymentService.PaymentCreateRequest withAppFee(java.lang.Integer appFee)
The amount to be deducted from the payment as the OAuth app’s fee, in pence/cents/öre/øre.
public PaymentService.PaymentCreateRequest withChargeDate(java.lang.String chargeDate)
A future date on which the payment should be collected. If not specified, the payment will be collected as soon as possible. This must be on or after the mandate’s next_possible_charge_date
, and will be rolled-forwards by GoCardless if it is not a working day.
public PaymentService.PaymentCreateRequest withCurrency(PaymentService.PaymentCreateRequest.Currency currency)
ISO 4217 currency code. Currently “AUD”, “DKK”, “EUR”, “GBP”, “NZD” and “SEK” are supported.
public PaymentService.PaymentCreateRequest withDescription(java.lang.String description)
A human-readable description of the payment. This will be included in the notification email GoCardless sends to your customer if your organisation does not send its own notifications (see compliance requirements).
public PaymentService.PaymentCreateRequest withLinks(PaymentService.PaymentCreateRequest.Links links)
public PaymentService.PaymentCreateRequest withLinksMandate(java.lang.String mandate)
ID of the mandate against which this payment should be collected.
public PaymentService.PaymentCreateRequest withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public PaymentService.PaymentCreateRequest withMetadata(java.lang.String key, java.lang.String value)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public PaymentService.PaymentCreateRequest withReference(java.lang.String reference)
An optional payment reference that will appear on your customer’s bank statement. For Bacs payments this can be up to 10 characters, for SEPA payments the limit is 140 characters, for Betalingsservice or BECS payments the limit is 30 characters and for Autogiro payments the limit is 11 characters.
Restricted: You can only specify a payment reference for Bacs payments (that is, when collecting from the UK) if you’re on the GoCardless Plus or Pro packages.
public PaymentService.PaymentCreateRequest withIdempotencyKey(java.lang.String idempotencyKey)
public PaymentService.PaymentCreateRequest withHeader(java.lang.String headerName, java.lang.String headerValue)