Forward

Forward an API request

Forwards an API request to a third-party endpoint.

For example, you can <a href="https://www.checkout.com/docs/payments/manage-payments/forward-stored-payment-credentials" target="_blank\">forward payment credentials</a> you've stored in our Vault to a third-party payment processor.

post/forward

Request

Request body

referencestring

The unique reference for the forward request.

processing_channel_idstring

The processing channel ID to associate the billing for the forward request with.

Example request

{
  "source": {
    "type": "id",
    "id": "src_wmlfc3zyhqzehihu7giusaaawu",
    "cvv_token": "tok_wnw2grxl4hbufp7q55tw2pb2t4",
    "pin_token": "tok_wnw2grxl4hbufp7q55tw2pb2t4"
  },
  "reference": "ORD-5023-4E89",
  "processing_channel_id": "pc_azsiyswl7bwe2ynjzujy7lcjca",
  "network_token": {
    "enabled": true
  },
  "destination_request": {
    "url": "https://example.com/payments",
    "method": "POST",
    "headers": {
      "encrypted": "<JWE encrypted JSON object with string values>",
      "raw": {
        "Idempotency-Key": "xe4fad12367dfgrds",
        "Content-Type": "application/json"
      }
    },
    "body": "{\"amount\": 1000, \"currency\": \"USD\", \"reference\": \"some_reference\", \"source\": {\"type\": \"card\", \"number\": \"{{card_number}}\", \"expiry_month\": \"{{card_expiry_month}}\", \"expiry_year\": \"{{card_expiry_year_yyyy}}\", \"card_pin\": \"{{card_pin}}\", \"name\": \"Ali Farid\"}, \"payment_type\": \"Regular\", \"authorization_type\": \"Final\", \"capture\": true, \"processing_channel_id\": \"pc_xxxxxxxxxxx\", \"risk\": {\"enabled\": false}, \"merchant_initiated\": true}",
    "signature": {
      "type": "dlocal"
    },
    "variables": [
      {
        "name": "card_data",
        "value": "{\"card_number\":\"{{card_number}}\",\"expiry\":\"{{card_expiry_month}}\"}"
      },
      {
        "name": "public_key",
        "value": "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"use\":\"enc\",\"kid\":\"key-001\"}"
      }
    ],
    "query": [
      {
        "name": "api_key",
        "value": "1234567890"
      },
      {
        "name": "user_id",
        "value": "1234567890"
      }
    ]
  }
}

Response

The request was successfully forwarded.

request_idstring required

The unique identifier for the forward request.

Example response

{
  "request_id": "fwd_01HK153X00VZ1K15Z3HYC0QGPN",
  "destination_response": {
    "status": 201,
    "headers": {
      "Cko-Request-Id": [
        "5fa7ee8c-f82d-4440-a6dc-e8c859b03235"
      ],
      "Content-Type": [
        "application/json"
      ]
    },
    "body": "{\"id\": \"pay_mbabizu24mvu3mela5njyhpit4\", \"action_id\": \"act_mbabizu24mvu3mela5njyhpit4\", \"amount\": 6540, \"currency\": \"USD\", \"approved\": true, \"status\": \"Authorized\", \"auth_code\": \"770687\", \"response_code\": \"10000\", \"response_summary\": \"Approved\", \"_links\": {\"self\": {\"href\": \"https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4\"}, \"action\": {\"href\": \"https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions\"}, \"void\": {\"href\": \"https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids\"}, \"capture\": {\"href\": \"https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures\"}}}"
  },
  "source": {
    "id": "src_evls5rkafabudm3x6gejc4bbo4",
    "bin": "45434748",
    "last4": "9996",
    "fingerprint": "B086A9386241A0BDCBEFAFC1E4FD5C3DD04684AAD21A126CB426C05555AC86A9"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.