Credit a PIN Debit EBT Purchase with SNAP Account {#pd-ebt-credit-task}
=======================================================================

This section describes how to credit a PIN debit EBT purchase with a SNAP account.

Fields Specific to This Use Case
--------------------------------

These API request fields and values are specific to this use case:

processingInformation.electronicBenefitsTransfer.category
:
Set the value to `FOOD`.

processingInformation.purchaseOptions.isElectronicBenefitsTransfer
:
Set the value to `true`.

Endpoint {#pd-ebt-credit-task_d7e169}
-------------------------------------

**Production:** `POST ``https://api.cybersource.com``/pts/v2/credits/`{#pd-ebt-credit-task_d7e178}  
**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/credits/`{#pd-ebt-credit-task_d7e188}

Required Fields to Credit a PIN Debit EBT Purchase with SNAP Account {#pd-ebt-snap-credit-req-fields}
=====================================================================================================

[clientReferenceInformation.code](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-code.md "")
:

[clientReferenceInformation.partner.thirdPartyCertificationNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-partner-third-party-certnum.md "")
:
`Cybersource` provides the value for this field.

[merchantInformation.categoryCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/merch-info-aa/merch-info-category-code-a.md "")
:

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

[paymentInformation.card.sourceAccountType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-source-acct-type-a.md "")
:
Set the value to `UA`.

[paymentInformation.card.type](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-type-a.md "")
:

[paymentInformation.card.useAs](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-use-as.md "")
:
Leave this field blank.

[paymentInformation.paymentType.name](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-type-name.md "")
:
Set the value to `CARD`.

[paymentInformation.paymentType.subTypeName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-type-sub-type-name.md "")
:
Set the value to `DEBIT`.

[pointOfSaleInformation.encryptedKeySerialNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-encrypted-key-serial-num.md "")
:

[pointOfSaleInformation.encryptedPin](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-encrypted-pin.md "")
:

[pointOfSaleInformation.entryMode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-entry-mode.md "")
:
Set the value to `swiped`.

[pointOfSaleInformation.pinBlockEncodingFormat](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-pin-block-encoding-format.md "")
:
Set the value to `1`.

[pointOfSaleInformation.terminalCapability](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-terminal-capability.md "")
:

[pointOfSaleInformation.trackData](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/pos-info-aa/pos-info-track-data.md "")
:

[processingInformation.commerceIndicator](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-commerce-ind.md "")
:
Set the value to `retail`.

[processingInformation.electronicBenefitsTransfer.category](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-electronic-benifts-transfer-catego.md "")
:
Set the value to `FOOD`.

[processingInformation.purchaseOptions.isElectronicBenefitsTransfer](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-purchase-options-is-ebt.md "")
:
Set the value to `true`.

REST Example: Credit a PIN Debit EBT Purchase with SNAP Account {#pd-ebt-snap-credit-ex-rest}
=============================================================================================

Request

```
{
  "clientReferenceInformation": {
    "code": "ABC1234", 
    "partner": {
      "thirdPartyCertificationNumber": "PTP1234"
    }
  },
  "processingInformation": {
    "commerceIndicator": "retail",
    "networkRoutingOrder": "K",
    "purchaseOptions": {
      "isElectronicBenefitsTransfer": true
    },
    "electronicBenefitsTransfer": {
      "category": "FOOD"
    }
  },
  "paymentInformation": {
    "card": {
      "type": "001"
    },
    "paymentType": {
      "name": "CARD",
      "subTypeName": "DEBIT"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "204.00",
      "currency": "USD"
    },
    "card": {
      "useAs": "",
      "sourceAccountType": "UA"
    }
  },
  "merchantInformation": {
    "categoryCode": "5411"
  },
  "pointOfSaleInformation": {
    "entryMode": "swiped",
    "terminalCapability": 4,
    "trackData": "%B4111111111111111^JONES/JONES ^3312101976110000868000000?;4111111111111111=33121019761186800000?",
    "pinBlockEncodingFormat": 1,
    "encryptedPin": "52F20658C04DB351",
    "encryptedKeySerialNumber": "FFFF1B1D140000000005"
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "void": {
      "method": "POST",
      "href": "/pts/v2/credits/6898900347906058304951/voids"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/credits/6898900347906058304951"
    }
  },
  "clientReferenceInformation": {
    "code": "Merchandise Return / Credit Voucher from SNAP"
  },
  "creditAmountDetails": {
    "currency": "usd",
    "creditAmount": "204.00"
  },
  "id": "6898900347906058304951",
  "orderInformation": {
    "amountDetails": {
      "currency": "usd"
    }
  },
  "processingInformation": {
    "reconciliationId": "6898900347906058304951"
  },
  "processorInformation": {
    "systemTraceAuditNumber": "188586",
    "routing": {
      "network": "0029"
    },
    "approvalCode": "831000",
    "retrievalReferenceNumber": "123456188586",
    "transactionId": "000000000000000",
    "responseCode": "00"
  },
  "reconciliationId": "6898900347906058304951",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-07-20T21:53:55Z"
}
```

