Streamline payment processing for intangible goods with auto-capture by setting capture to NOW, ensuring instant transactions and real-time tracking via webhooks.
In the request to authorizePayment, setting the
capture parameter to NOW in the request_payment_transaction object automatically captures the transaction upon creation, making it ideal for intangible goods where immediate provisioning is expected.
Sample request
curl https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/authorize \
-H 'Authorization: Basic <API key>' \
-H 'Content-Type: application/json' \
-H 'Klarna-Payment-Token: krn:payment:eu1:payment-token:...' \
-d '{
"currency": "USD",
"request_payment_transaction": {
"amount": 11800,
"payment_transaction_reference": "acquiring-partner-transaction-reference-1234"
"capture": "NOW"
}
}'The response includes the payment_capture_id. Store it for future reference.
Sample response
{
"payment_transaction_response": {
"result": "APPROVED",
"payment_transaction": {
"payment_transaction_id": "krn:payment:eu1:transaction:6debe89e-98c0-[...]",
"payment_transaction_reference": "acquiring-partner-transaction-reference-1234",
"amount": 11800,
"currency": "USD",
"payment_funding": {...},
"payment_pricing": {...},
"payment_captures": [
{Every successful payment capture operation triggers a Payment Transaction captured webhook to which you subscribe.
| Event name | When |
|---|---|
payment.transaction.captured | To track successful payment capture, whether autocapture or manual, ensuring proper record-keeping. |
Related articles