Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP-13084: Transactions can now have 15 metadata keys #976

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The data from this endpoint is ‘strongly consistent’, meaning it is updated
| `prefilled_cardholder_details.cardholder_name` (optional) | string | Prefills the paying user's cardholder name field when they make their payment.<br><br>Limited to 255 characters. |
| `prefilled_cardholder_details.billing_address` (optional) | object | An object that prefills the paying user's billing address.<br><br>`billing_address` can contain:<br><br><li>`line1` (the first line of the paying user’s address)<li>`line2` (the second line of the paying user’s address)<li>`postcode` (the paying user’s postcode)<li>`city` (the paying user’s city)<li>`country` (the paying user’s country, displayed as a 2-character [ISO-3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/))<br><br>Every parameter is optional.<br><br>If the `country` value is invalid or missing, the __Country/territory__ field on the user's payment page defaults to United Kingdom.<br><br>You can [read more about how to prefill cardholder details](/optional_features/prefill_user_details). |
| `language` (optional) | string | Sets the language of the user's payment page.<br><br>Available values are: <br><br><li>`en` (English)</li><li>`cy` (Welsh)</li> <br>`language` defaults to `en` if you do not include it in your request body.<br><br>You can [read more about using Welsh on your payment pages](/optional_features/welsh_language). |
| `metadata` (optional) | object | An object that adds custom metadata to a payment using parameter key-value pairs.<br><br>The `metadata` object must contain between 1 and 10 parameter keys. <br><br>Parameter keys are limited to 30 characters. Parameter values are limited to 100 characters. Parameter values can be empty.<br><br>You cannot add or change metadata keys or values after you've created the payment.<br><br>You can [read more about adding custom metadata to payments](/reporting/#add-additional-information-your-users-will-not-be-able-to-see-39-custom-metadata-39-or-39-reporting-columns-39). |
| `metadata` (optional) | object | An object that adds custom metadata to a payment using parameter key-value pairs.<br><br>The `metadata` object must contain between 1 and 15 parameter keys. <br><br>Parameter keys are limited to 30 characters. Parameter values are limited to 100 characters. Parameter values can be empty.<br><br>You cannot add or change metadata keys or values after you've created the payment.<br><br>You can [read more about adding custom metadata to payments](/reporting/#add-additional-information-your-users-will-not-be-able-to-see-39-custom-metadata-39-or-39-reporting-columns-39). |
| `moto` (optional) | boolean | You can use this parameter to designate a payment as a Mail Order / Telephone Order (MOTO) payment.<br><br>`moto` defaults to `false` if you do not include it in your request.<br><br>You must have MOTO payments turned on in your GOV.UK Pay account to use the `moto` parameter.<br><br>You can [read more about enabling taking payments over the phone](/moto_payments). |
| <nobr>`authorisation_mode`<nobr> | string | Sets how you intend to authorise the payment.<br><br>Available values are:<br><br><li>`web`<li>`moto_api`<li>`agreement`</li><br>Defaults to `web`.<br><br>Payments created with `web` mode follow the [standard GOV.UK Pay payment journey](/payment_flow). Paying users visit the `next_url` in the response to complete their payment.<br><br>Payments created with `agreement` mode are authorised with an agreement for recurring payments. If you create an `agreement` payment, you must also send an active `agreement_id`. You must not send `return_url`, `email`, or `prefilled_cardholder_details` or your request will fail.<br><br>You can [read more about recurring payments](/recurring_payments).<br><br>Payments created with `moto_api` mode return an `auth_url_post` object and a `one_time_token`. You can use `auth_url_post` and `one_time_token` to send the paying user’s card details through the API and complete the payment.<br><br>If you create a `moto_api` payment, do not send a `return_url` in your request.<br><br>You can [read more about authorising payments through the API](/moto_payments/moto_send_card_details_api).
| `agreement_id` | string | The unique ID GOV.UK Pay automatically associated with a recurring payments agreement.<br><br>Including `agreement_id` in your request tells the API to take this payment using the card details that are associated with this agreement.<br><br>`agreement_id` must match an active agreement ID.<br><br>You must set `authorisation_mode` to `agreement` for the API to accept `agreement_id`.<br><br>You can [read more about recurring payments](/recurring_payments). |
Expand Down
Loading