# Authorize order with payment (/limited-release/alternative-payment-methods/klarna/accept-klarna-payments/authorize-payment)



## Authorize order with payment [#authorize-order-with-payment]

After buyer approval, authorize the order with Klarna as the payment source to finalize the payment through PayPal and make it ready for capture. This step is specific to the manual authorization flow.

Before authorizing, verify that the buyer has completed approval by checking if the order status is `APPROVED`. You can track the status in two ways:

* **Poll for updates:** Call GET `/v2/checkout/orders/{order_id}` until status changes from `PAYER_ACTION_REQUIRED` to `APPROVED`.
* **Use webhooks:** Subscribe to CHECKOUT.ORDER.APPROVED webhook for immediate notification.

After the order status is `APPROVED`, use a [valid access token](/api/rest/#3-get-access-token) and send a POST request to `/v2/checkout/orders/{order_id}/authorize`.

#### Sample request

```text lineNumbers
curl -X POST https://api.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T/authorize \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "PayPal-Request-Id: <UNIQUE_REQUEST_ID>" \
  -d '{
    "payment_source": {
        "klarna": {
            "authorization_context": {
                "expiration_time": "2023-10-08T23:37:39Z"
            },
            "country_code": "UK",
            "billing_address": {
                "address_line_1": "Schönhauser Allee 84",
                "admin_area_2": "London",
                "admin_area_1": "Province",
                "postal_code": "10439",
                "country_code": "UK"
            },
            "name": {
                "given_name": "John",
                "surname": "Doe"
            },
            "email": "buyer@example.com",
            "phone": {
                "national_number": "6912345678",
                "country_code": "49"
            },
            "experience_context": {
                "locale": "en-UK",
                "intent": "buy",
                "acquiring_channel": "ECOMMERCE"
            }
        }
    }
}'
```

#### Sample response

```text lineNumbers
{
  "id": "5O190127TN364715T",
  "status": "COMPLETED",
  "payment_source": {
    "klarna": {
      "authorization_context": {
        "expiration_time": "2023-10-08T23:37:39Z"
      },
      "country_code": "UK",
      "billing_address": {
        "address_line_1": "Schönhauser Allee 84",
        "admin_area_2": "London",
        "admin_area_1": "Province",
        "postal_code": "10439",
        "country_code": "UK"
      },
      "name": {
        "given_name": "John",
        "surname": "Doe"
      },
      "email": "buyer@example.com",
      "phone": {
        "national_number": "6912345678",
        "country_code": "49"
      },
      "experience_context": {
        "locale": "en-UK",
        "intent": "buy",
        "acquiring_channel": "ECOMMERCE"
      }
    }
  },
  "purchase_units": [
    {
      "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b",
      "payments": {
        "authorizations": [
          {
            "id": "0AW2184448108334S",
            "status": "CREATED",
            "amount": {
              "currency_code": "GBP",
              "value": "100.00"
            },
            "expiration_time": "2022-04-01T21:20:49Z",
            "create_time": "2022-03-01T21:20:49Z",
            "update_time": "2022-03-01T21:20:49Z",
            "links": [
              {
                "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S",
                "rel": "self",
                "method": "GET"
              },
              {
                "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/capture",
                "rel": "capture",
                "method": "POST"
              },
              {
                "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/void",
                "rel": "void",
                "method": "POST"
              },
              {
                "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/reauthorize",
                "rel": "reauthorize",
                "method": "POST"
              }
            ]
          }
        ]
      }
    }
  ],
  "links": [
    {
      "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
      "rel": "self",
      "method": "GET"
    }
  ]
}
```

#### Request parameters

| Parameter name                                                                             | Description                                                                           |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| `payment_source.klarna`<br />                 object                                       | Klarna payment source information including buyer details and authorization settings. |
| `payment_source.klarna.authorization_context`<br />                 object                 | Payment authorization settings with expiration time.                                  |
| `payment_source.klarna.authorization_context.expiration_time`<br />                 string | Timestamp of when the authorization expires, specified in UTC format.                 |
| `payment_source.klarna.country_code`<br />                 Required,string                 | Country code required for Klarna payments, specified in the ISO 3166-1 format.        |
| `payment_source.klarna.name`<br />                 Required,object                         | Name of the buyer.                                                                    |
| `payment_source.klarna.name.given_name`<br />                 Required,string              | First name of the buyer.                                                              |
| `payment_source.klarna.name.surname`<br />                 string                          | Last name of the buyer                                                                |
| `payment_source.klarna.email`<br />                 Required,string                        | Email address of the buyer.                                                           |
| `payment_source.klarna.phone`<br />                 object                                 | Details of the buyer's phone number.                                                  |
| `payment_source.klarna.experience_context`<br />                 object                    | Experience context for the payment.                                                   |
| `payment_source.klarna.experience_context.locale`<br />                 Required,object    | Locale code for the buyer's language and region preference.                           |

#### Response parameters

| Parameter name<br />                                    | Description<br />                                                                                                                                                                                                                                       |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`<br />                 string                       | Unique order ID for the authorization. Use this to track or reference the authorization in future API calls.                                                                                                                                            |
| `status`<br />                 string                   | Order status after authorization.<br /><br />                 **Possible values**:                 COMPLETED: Order authorization completed successfullyCREATED: Order created but authorization pendingAPPROVED: Order approved but not yet authorized |
| `links[].rel: self`<br />                 object        | URL to retrieve order details. Use this link to get updated order information.                                                                                                                                                                          |
| `links[].rel: capture`<br />                 object     | URL to capture the authorized payment. Use this link to capture funds from the authorization.                                                                                                                                                           |
| `links[].rel: void`<br />                 object        | URL to void the authorization. Use this link to cancel the authorization and release the hold on funds.                                                                                                                                                 |
| `links[].rel: reauthorize`<br />                 object | URL to reauthorize the payment. Use this link if the authorization expires before capture.                                                                                                                                                              |
