# Deposit via Payment Page Endpoint: POST /v1/widget/sessions Version: v1 Security: bearerAuth ## Request fields (application/json): - `depositId` (string, required) A UUIDv4 based ID specified by you, that uniquely identifies the deposit. Example: "" - `returnUrl` (string, required) The URL to which the user will be redirected after completion of the operation. Example: "https://merchant.com/paymentProcessed" - `statementDescription` (string) Short description for the transaction. Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history. Must be between 4 and 22 alphanumeric characters. Example: "Note of 4 to 22 chars" - `amount` (string) If specified, the amount will be displayed to the customer as the payment amount. For example, when paying for specific goods or services. If not specified, the customer will have to specify the amount they wish to pay. For example, when depositing money into their eWallet. Amount must follow below requirements or the request will be rejected: * Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all [MMO supported decimal places](https://docs.transaction-monitor.io/using_the_api#correspondents). * The minimum and maximum amounts depend on the limits of the specific MMO. You can find them from the [Active Configuration](#/paths/~1active-conf/get) endpoint. * Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied. * Trailing zeroes are permitted. Valid examples: 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5 Not valid examples: 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32 Example: "15" - `msisdn` (string) If specified, this phone number will be used to collect the deposit. If not specified, the customer paying can specify the phone number that they want to pay from. The format is described in [Wikipedia](https://en.wikipedia.org/wiki/MSISDN). MSISDN validation has following rules: * Only digits without whitespaces or any other separators or prefixes like '+'. * Should not start with zero. * Country code is mandatory. * Should not exceed or be less than the valid length of specified country. Valid examples for Zambia: 260763456789 Not valid examples for Zambia: +260763456789, 260 763 456789, 260-7634-56789, 0260763456789, 2607634567, 260763456789543, 999558708954, 37255870895 Example: "260763456789" - `language` (string) The language in which the Payment Page will be presented to the customer. If the user has explicitly changed their languages preferences, their selection will override this parameter. Enum: "EN", "FR" - `country` (string) If specifified, allows payment from phone numbers only from a specific country. If not specified, the customer can select any country that is configured for your account in Blu Penguin. You can use the [active configuration](#operation/active-conf) endpoint to verify which counrties and MMOs have been configured for your account. Format must be the ISO 3166-1 alpha-3, three character country code in upper case. Read more from [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements). Example: "ZMB" - `reason` (string) Optional text which will be displayed to the customer on the payment page to specify what they are paying for. Example: "Ticket to festival" - `metadata` (array) A list of metadata that you can attach to the payment for providing additional context about the payment. For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to. Metadata will not be visible to the customer that is party to this payment. It will be visible in the Blu Penguin Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation. It is also possible to search for recent payments in the Blu Penguin Dashboard using global search based on the values of metadata. Up to 10 metadata fields can be attached to a payment. Example: [{"fieldName":"orderId","fieldValue":"ORD-123456789"},{"fieldName":"customerId","fieldValue":"customer@email.com","isPII":true}] - `metadata.fieldName` (string, required) The name of the metadata that you are attaching to the payment. For example orderId. Example: "orderId" - `metadata.fieldValue` (string, required) The value for this metadata field. For example ORD-123456789. Example: "ORD-123456789" - `metadata.isPII` (boolean) Indicates whether the field contains personally identifiable information. Used for enabling compliance with GDPR or other relevant data privacy laws. Example: true ## Response 200 fields (application/json): - `redirectUrl` (string) The unique URL of the payment page for this specific payment session. Customer has to be forwarded to this URL where they can complete the payment. The session is valid for 15 minutes for the customer to complete the payment. Please note! The URL is valid for 5 minutes. Example: "https://paywith.transaction-monitor.io/?token=example-token" ## Response 400 fields (application/json): - `errorId` (string, required) A unique error ID in the Blu Penguin platform. Example: "63743264-7292-11ea-bc55-0242ac130003" - `errorCode` (integer, required) Blu Penguin internal error code. Example: 1 - `errorMessage` (string, required) Error message. Example: "Internal error" ## Response 401 fields (application/json): - `errorId` (string, required) A unique error ID in the Blu Penguin platform. Example: "63743264-7292-11ea-bc55-0242ac130003" - `errorCode` (integer, required) Blu Penguin internal error code. Example: 1 - `errorMessage` (string, required) Error message. Example: "Internal error" ## Response 403 fields (application/json): - `errorId` (string, required) A unique error ID in the Blu Penguin platform. Example: "63743264-7292-11ea-bc55-0242ac130003" - `errorCode` (integer, required) Blu Penguin internal error code. Example: 1 - `errorMessage` (string, required) Error message. Example: "Internal error" ## Response 500 fields (application/json): - `errorId` (string, required) A unique error ID in the Blu Penguin platform. Example: "63743264-7292-11ea-bc55-0242ac130003" - `errorCode` (integer, required) Blu Penguin internal error code. Example: 1 - `errorMessage` (string, required) Error message. Example: "Internal error"