> ## Documentation Index
> Fetch the complete documentation index at: https://developer.tazapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payin

> Payin allows businesses to collect payments from customers globally. It facilitates cross-border payments by enabling payments through various methods such as credit/debit cards, local payment methods, bank transfers, or e-wallets, depending on the supported payment options in the region.

A payin refers to the process through which a merchant collects payments through Tazapay’s cross-border payment platform. This can be done through various methods such as credit/debit cards, local payment methods, bank transfers, or e-wallets, depending on the supported payment options in the region.

## Object Structure

```json JSON theme={null}
{
  "amount": 100,
  "amount_paid": 0,
  "billing_details": {
          "address": {
              "city": "Singapore",
              "country": "SG",
              "line1": "1st Street",
              "line2": "2nd Avenue",
              "postal_code": "43004",
              "state": "Singapore"
            },
          "label": "Home",
          "name": "Andrea Lark",
          "phone": {
              "calling_code": "65",
              "number": "87654321"
            }
        },
  "cancel_url": "https://mystore.com/try_again",
  "cancelled_at": null,
  "client_token": "JsU19R_Li9cwVksJGUfAajZ3r2A9ArU7Qk3j5r0cpVg=",
  "confirm": false,
  "created_at": "2024-10-07T07:10:21.894488Z",
  "customer": "cus_crtqrhth90j0121gpt50",
  "customer_details": {
          "country": "SG",
          "email": "andrea@example.com",
          "name": "Andrea Lark",
          "phone": {
              "calling_code": "65",
              "number": "87654321"
            }
        },
  "holding_currency": "INR",
  "id": "pay_cs1oina7a5ng2a3ng12g",
  "invoice_currency": "INR",
  "items": [],
  "latest_payment_attempt": "",
  "latest_payment_attempt_data": null,
  "metadata": {
          "key1": "value1",
          "key2": "value2",
          "key3": "value3"
        },
  "object": "payin",
  "paid_in_excess": false,
  "partially_paid": false,
  "payment_attempts": [],
  "payment_method_details": {
          "paynow_sgd": {},
          "type": "paynow_sgd"
        },
  "reference_id": "123",
  "shipping_details": {
          "address": {
              "city": "Singapore",
              "country": "SG",
              "line1": "1st Street",
              "line2": "2nd Avenue",
              "postal_code": "43004",
              "state": "Singapore"
            },
          "label": "Home",
          "name": "Andrea Lark",
          "phone": {
              "calling_code": "65",
              "number": "87654321"
            }
        },
  "statement_descriptor": "tzp*string",
  "status": "requires_payment_method",
  "status_description": "",
  "reversed_at": null,
  "risk_check": null,
  "success_url": "https://mystore.com/success_page",
  "transaction_data": [],
  "transaction_description": "test",
  "transaction_documents": [],
  "webhook_url": "https://mystore.com/internal/webhook",
  "on_behalf_of": "ent_d3inm6ami8u10oqfm"
}
```

## Object Parameters

### Payin

| Field                          | Subfield    | Type                   | Description                                                                                                                                               |
| :----------------------------- | :---------- | :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount                         |             | number                 | The total amount of the payin transaction.                                                                                                                |
| amount\_paid                   |             | number                 | The amount that has already been paid.                                                                                                                    |
| billing\_details               |             | object                 | The billing information for the transaction.                                                                                                              |
|                                | address     | object                 | The address associated with the billing details. [Address Object](/api-reference/tazapay-api/address-object)                                              |
|                                | label       | string                 | A label for the billing address (e.g., Home, Office).                                                                                                     |
|                                | name        | string                 | The name associated with the billing details.                                                                                                             |
|                                | phone       | object                 | The phone details associated with the billing address. (See Phone Table).                                                                                 |
| cancel\_url                    |             | string                 | The URL to redirect the user to if the transaction is canceled.                                                                                           |
| cancelled\_at                  |             | string(ISO timestamp)  | The timestamp when the transaction was canceled, if applicable.                                                                                           |
| client\_token                  |             | string                 | The client token associated with the payin.                                                                                                               |
| confirm                        |             | boolean                | Indicates if the transaction is confirmed.                                                                                                                |
| created\_at                    |             | string (ISO timestamp) | The timestamp when the transaction was created.                                                                                                           |
| customer                       |             | string                 | The unique identifier for the customer.                                                                                                                   |
| customer\_details              |             | object                 | The customer details related to the transaction.                                                                                                          |
|                                | country     | string                 | The country of the customer.                                                                                                                              |
|                                | email       | string                 | The email address of the customer.                                                                                                                        |
|                                | name        | string                 | The name of the customer.                                                                                                                                 |
|                                | phone       | object                 | The phone details of the customer. [Phone Object.](/api-reference/tazapay-api/phone-object)                                                               |
| holding\_currency              |             | string                 | The holding currency used for the transaction (e.g., INR).                                                                                                |
| id                             |             | string                 | The unique Tazapay identifier for the payin transaction.                                                                                                  |
| invoice\_currency              |             | string                 | The invoice currency for the transaction.                                                                                                                 |
| items                          |             | array                  | The list of items related to the transaction.                                                                                                             |
| latest\_payment\_attempt       |             | string                 | The Tazapay ID of the latest payment attempt.                                                                                                             |
| latest\_payment\_attempt\_data |             | object/null            | Data related to the latest payment attempt, if available.                                                                                                 |
| metadata                       |             | object                 | Set of key-value pairs attached to the transaction.                                                                                                       |
| object                         |             | string                 | The type of object, which is "payin".                                                                                                                     |
| paid\_in\_excess               |             | boolean                | Indicates if the payment was made in excess.                                                                                                              |
| partially\_paid                |             | boolean                | Indicates if the payment was partially paid.                                                                                                              |
| payment\_attempts              |             | array                  | The list of payment attempts for this transaction.                                                                                                        |
| payment\_method\_details       |             | object                 | The details of the payment method used.                                                                                                                   |
|                                | paynow\_sgd | object                 | Details of the paynow\_sgd payment method                                                                                                                 |
|                                | type        | string                 | The type of payment method used (e.g., paynow\_sgd).                                                                                                      |
| reference\_id                  |             | string                 | The reference ID for the transaction.                                                                                                                     |
| shipping\_details              |             | object                 | Shipping information for the transaction.                                                                                                                 |
|                                | address     | object                 | The address associated with the shipping details. [Address object](/api-reference/tazapay-api/address-object)                                             |
|                                | label       | string                 | A label for the shipping address (e.g., Home, Office).                                                                                                    |
|                                | name        | string                 | The name associated with the shipping details.                                                                                                            |
|                                | phone       | object                 | The phone details associated with the shipping address. [Phone Object](/api-reference/tazapay-api/phone-object)                                           |
| statement\_descriptor          |             | string                 | The descriptor to appear on the customer’s statement.                                                                                                     |
| status                         |             | string                 | The current status of the transaction. Possible values: `requires_payment_method`, `requires_action`, `processing`, `succeeded`, `cancelled`, `reversed`. |
| status\_description            |             | string                 | A description of the transaction status, if available.                                                                                                    |
| reversed\_at                   |             | string (ISO timestamp) | The timestamp when the payin was reversed. `null` unless `status` is `reversed`.                                                                          |
| risk\_check                    |             | object / null          | Result of the automated payer name verification check. `null` when no name match check was performed.                                                     |
|                                | result      | string                 | Match outcome between buyer name and PSP-returned payer name. Values: `FULL_MATCH`, `PARTIAL_MATCH`, `NO_MATCH`, `EMAIL`.                                 |
|                                | buyer\_name | string                 | Name provided by the buyer at checkout.                                                                                                                   |
|                                | payer\_name | string                 | Name returned by the PSP after payment.                                                                                                                   |
|                                | checked\_at | string (ISO timestamp) | Timestamp when the risk check was performed.                                                                                                              |
| success\_url                   |             | string                 | The URL to redirect the user to upon a successful transaction.                                                                                            |
| transaction\_data              |             | array                  | Additional data related to the transaction.                                                                                                               |
| transaction\_description       |             | string                 | A description of the transaction.                                                                                                                         |
| transaction\_documents         |             | array                  | List of transaction-related documents.                                                                                                                    |
| webhook\_url                   |             | string                 | The URL for webhook notifications related to this transaction.                                                                                            |
| on\_behalf\_of                 |             | string                 | ID of the entity on whose behalf the payin was created. Automatically inherited from the associated checkout session when applicable. Format: `ent_*`     |
